diff --git a/.env.production b/.env.production index d08d18a..9161c39 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,5 @@ MP_API_BASE_URL=https://ykt.youcan365.com MP_CACHE_PREFIX=production MP_WX_APP_ID=wx6ee11733526b4f04 MP_TIM_SDK_APP_ID=1600136080 -MP_CORP_ID=wpLgjyawAA8N0gWmXgyJq8wpjGcOT7fg \ No newline at end of file +MP_CORP_ID=wpLgjyawAA8N0gWmXgyJq8wpjGcOT7fg +MP_VERIFY_IM_CORP_ID=YES \ No newline at end of file diff --git a/components/form-template/form-cell/form-positive-find.vue b/components/form-template/form-cell/form-positive-find.vue index 3ff8c3a..ce04d01 100644 --- a/components/form-template/form-cell/form-positive-find.vue +++ b/components/form-template/form-cell/form-positive-find.vue @@ -18,7 +18,7 @@ - {{ idx + 1 }}、处理意见 + 处理意见 diff --git a/components/form-template/form-cell/form-upload.vue b/components/form-template/form-cell/form-upload.vue index 1296be0..29655f3 100644 --- a/components/form-template/form-cell/form-upload.vue +++ b/components/form-template/form-cell/form-upload.vue @@ -74,7 +74,11 @@ function addFile() { } }, fail: (err) => { - toast('上传失败') + if(/cancel/i.test(err.errMsg)){ + toast('用户取消选择文件') + } else { + toast('上传失败') + } } }) } diff --git a/pages/article/article-list.vue b/pages/article/article-list.vue index fa30aba..bddd0bd 100644 --- a/pages/article/article-list.vue +++ b/pages/article/article-list.vue @@ -203,7 +203,7 @@ function goToDetail(item) { finderUserName: item.articleInfo.wechatChannels.finderUserName, feedId: item.articleInfo.wechatChannels.feedId, success: () => { - markArticleRead(item._id); + markArticleRead(item._id, item.articleId); }, fail: err => { const errMsg = err.errMsg || ''; @@ -222,7 +222,7 @@ function isWechatChannels(item) { return item?.wechatChannels?.finderUserName && item?.wechatChannels?.feedId; } -async function markArticleRead(sendId) { +async function markArticleRead(sendId, articleId) { const unionid = account.value?.unionid; if (!unionid || !articleId) return; try { diff --git a/pages/message/components/message-types.vue b/pages/message/components/message-types.vue index 14dfd3d..36612a7 100644 --- a/pages/message/components/message-types.vue +++ b/pages/message/components/message-types.vue @@ -44,7 +44,7 @@ {{ getArticleData(message).title }} {{ getArticleData(message).desc }} - diff --git a/store/account.js b/store/account.js index 303e8de..570cc40 100644 --- a/store/account.js +++ b/store/account.js @@ -14,7 +14,13 @@ export default defineStore("accountStore", () => { const openid = ref(""); const externalUserId = ref(''); const teams = ref([]); - const hasImCorpId = computed(() => teams.value.some(i => i.corpId === 'wpLgjyawAA8N0gWmXgyJq8wpjGcOT7fg')); + const hasImCorpId = computed(() => { + // 正式环境IM账号优先 暂时只有wpLgjyawAA8N0gWmXgyJq8wpjGcOT7fg机构的才开启IM账号 + if (env.MP_VERIFY_IM_CORP_ID === 'YES') { + return teams.value.some(i => i.corpId === 'wpLgjyawAA8N0gWmXgyJq8wpjGcOT7fg') + } + return true + }); const teamsPromise = ref(null); async function login(phoneCode = '') {