diff --git a/config.js b/config.js index d6720f9..1692a89 100644 --- a/config.js +++ b/config.js @@ -4,9 +4,8 @@ export default { uploadQiNiuDomain: 'https://upload-z2.qiniup.com', // baseUrl: 'https://vue.ruoyi.vip/prod-api', // baseUrl: 'http://47.93.242.168:8080', - baseUrl: 'http://47.93.242.168:8080', - // baseUrl: 'http://localhost:8080', - // baseUrl: 'http://47.93.242.168:8080', + // baseUrl: 'http://47.93.242.168:8080', + baseUrl: 'http://localhost:8080', // 应用信息 appInfo: { // 应用名称 diff --git a/main.js b/main.js index c6877c5..3ff3274 100644 --- a/main.js +++ b/main.js @@ -12,6 +12,7 @@ export function createApp() { app.config.globalProperties.iconConfig = iconConfig app.use(uviewPlus) app.use(store) + // app.use(uView) install(app) return { diff --git a/package.json b/package.json index 7cf09d4..0927339 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "dayjs": "^1.11.11", "qiniu": "^7.12.0", "qiniu-js": "^3.4.2", + "quill": "^1.3.7", "uview-plus": "^3.2.15" } } diff --git a/pages.json b/pages.json index 958769e..923dcc5 100644 --- a/pages.json +++ b/pages.json @@ -77,6 +77,14 @@ "navigationBarTextStyle": "white" } } + , { + "path": "pages/activity/publish", + "style": { + "navigationBarTitleText": "发布活动", + "navigationStyle": "custom", + "navigationBarTextStyle": "white" + } + } , { "path": "pages/work/index", "style": { diff --git a/pages/activity/info.vue b/pages/activity/info.vue index a6a52e5..5afaf0d 100644 --- a/pages/activity/info.vue +++ b/pages/activity/info.vue @@ -177,9 +177,7 @@ function cancel () { .btnText { font-weight: 400; width: 120rpx; - - font-size: 30rpx; - + font-size: 30rpx; color: #00CCBE !important; } } diff --git a/pages/activity/publish.vue b/pages/activity/publish.vue new file mode 100644 index 0000000..e1c92e0 --- /dev/null +++ b/pages/activity/publish.vue @@ -0,0 +1,174 @@ + + + \ No newline at end of file diff --git a/pages/common/activityList/index.vue b/pages/common/activityList/index.vue index 604a63d..05f81c7 100644 --- a/pages/common/activityList/index.vue +++ b/pages/common/activityList/index.vue @@ -43,6 +43,12 @@ import { useStore } from 'vuex'; const emit = defineEmits(['scrolltolower']); const { proxy } = getCurrentInstance(); +const iconConfig = proxy.iconConfig; +const tu21 = iconConfig.tu21; +const tu22 = iconConfig.tu22; +const tu51 = iconConfig.tu51; +const tu52 = iconConfig.tu52; +const tu53 = iconConfig.tu53; const props = defineProps({ modelValue: Array }); diff --git a/pages/common/file/fileUpload/index.vue b/pages/common/file/fileUpload/index.vue index 1ed96a2..b881eb6 100644 --- a/pages/common/file/fileUpload/index.vue +++ b/pages/common/file/fileUpload/index.vue @@ -10,7 +10,10 @@ name="fileInfowx" multiple :previewFullImage="true" - > + > + + @@ -24,7 +27,8 @@ import * as qiniu from 'qiniu-js' const emit = defineEmits(); const { proxy } = getCurrentInstance(); const uploadQiNiuDomain = config1.uploadQiNiuDomain; - +const iconConfig = proxy.iconConfig; +const tu2x = iconConfig.tu2x; const props = defineProps({ modelValue: [String, Object, Array], fileTypeInfo: { @@ -109,6 +113,7 @@ const afterRead = async (event) => { }; const uploadFilePromise = async (fileInfo1, name) => { + console.log("fileInfo1:",fileInfo1); // 主要目的的拼名字,大小,类型 let fileNameOld = [0, 1]; if (fileInfo1.name !== undefined) { @@ -118,12 +123,14 @@ const uploadFilePromise = async (fileInfo1, name) => { fileInfo.name = fileNameOld[0] + "_" + store.state.user.phoneType + "_" + name; let extension1 = fileInfo1.url.split('.'); + // 防止 h5 报错 - if (extension1[1] == null) { - extension1[1] = fileNameOld[1]; + if (extension1[1] === undefined) { + extension1[1] = fileNameOld[fileNameOld.length-1]; //保证取最后一个 } //主要是为了拼接文件type(video/mp4),因为各端传入的type各有不同 - fileInfo.type = fileInfo1.type + "/" + extension1[1]; + fileInfo.type = fileInfo1.type + "/" + extension1[extension1.length-1]; + console.log("fileInfo.type:",fileInfo); fileInfo.extension = extension1[1]; try { const tokenData = await getQNtoken(fileInfo); diff --git a/pages/index.vue b/pages/index.vue index ab30ab4..cc3157a 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -10,7 +10,7 @@ - {{item}} + {{item.lable}} @@ -239,7 +239,7 @@ lefther: 0, searchPrerequisite: '热门', postTypeOpen: false, - postTypeList: ['发布话题', '发布活动'], + postTypeList: [{lable:'发布话题',id:1}, {lable:'发布活动',id:2}], bgColor: 'rgba(170, 0, 0, 0)', searchPrerequisiteList: [ '热门', '最新', '筛选3', '筛选4', '筛选5', '筛选6', '筛选7', '筛选8', '筛选9' @@ -362,6 +362,14 @@ console.log() this.$tab.navigateTo('/pages/search/index') }, + publishTalk(item){ + console.log() + if(item.id === 2){ + //todo 判断用户是否有增加活动的接口调用权限 + this.$tab.navigateTo('/pages/activity/publish') + } + + }, rightClick() { console.log('rightClick'); }, diff --git a/pages/loginInfo/login.vue b/pages/loginInfo/login.vue index a68802d..61b5425 100644 --- a/pages/loginInfo/login.vue +++ b/pages/loginInfo/login.vue @@ -85,7 +85,7 @@ const loginSuccess = async () => { await store.dispatch('GetInfo') await store.dispatch('getQNDomainInfo') proxy.$tab.reLaunch('/pages/index'); - // await store.dispatch('GetUserInfo'); + store.dispatch('GetUserInfo'); } catch (error) { console.log("获取用户信息失败", error) } diff --git a/pages/work/index.vue b/pages/work/index.vue index 4d36ed7..dc2b817 100644 --- a/pages/work/index.vue +++ b/pages/work/index.vue @@ -79,10 +79,13 @@ + +