From dcb3dda5c0a0f8b0002a203f4b6fd018ef8fbbb9 Mon Sep 17 00:00:00 2001 From: wangdongbo <949818794@qq.com> Date: Mon, 9 Feb 2026 16:08:45 +0800 Subject: [PATCH] no message --- .env.development | 1 - .env.localhost | 1 - .env.production | 4 ++ index.html | 40 +++++++++--------- package.json | 72 +++++++++++++++++--------------- pages/article/article-detail.vue | 8 ++-- store/account.js | 4 +- 7 files changed, 69 insertions(+), 61 deletions(-) create mode 100644 .env.production diff --git a/.env.development b/.env.development index 44fa76f..d530c68 100644 --- a/.env.development +++ b/.env.development @@ -2,4 +2,3 @@ MP_API_BASE_URL=https://patient.youcan365.com MP_CACHE_PREFIX=development MP_WX_APP_ID=wx6ee11733526b4f04 MP_TIM_SDK_APP_ID=1600123876 -MP_CORP_ID=wwe3fb2faa52cf9dfb diff --git a/.env.localhost b/.env.localhost index 5c8f00a..caeee5d 100644 --- a/.env.localhost +++ b/.env.localhost @@ -2,4 +2,3 @@ MP_API_BASE_URL=http://localhost:8080 MP_CACHE_PREFIX=development MP_WX_APP_ID=wx6ee11733526b4f04 MP_TIM_SDK_APP_ID=1600123876 -MP_CORP_ID=wwe3fb2faa52cf9dfb diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..a25b0cd --- /dev/null +++ b/.env.production @@ -0,0 +1,4 @@ +MP_API_BASE_URL=https://patient.youcan365.com +MP_CACHE_PREFIX=development +MP_WX_APP_ID=production +MP_TIM_SDK_APP_ID=1600123876 diff --git a/index.html b/index.html index b5d330d..3b94251 100644 --- a/index.html +++ b/index.html @@ -1,20 +1,20 @@ - - - - - - - - - - -
- - - + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/package.json b/package.json index b382f07..2d8d0d9 100644 --- a/package.json +++ b/package.json @@ -1,34 +1,40 @@ -{ - "name": "医客通患者端", - "version": "1.0.0", - "description": "", - "main": "main.js", - "scripts": { - "prebuild": "node scripts/pre-build.js", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "dayjs": "^1.11.10", - "tim-upload-plugin": "^1.4.2", - "tim-wx-sdk": "^2.27.6" - }, - "uni-app": { - "scripts": { - "dev": { - "title": "测试", - "env": { - "UNI_PLATFORM": "mp-weixin" - } - }, - "localhost": { - "title": "本地", - "env": { - "UNI_PLATFORM": "mp-weixin" - } - } - } - }, - "devDependencies": {} +{ + "name": "医客通患者端", + "version": "1.0.0", + "description": "", + "main": "main.js", + "scripts": { + "prebuild": "node scripts/pre-build.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "dayjs": "^1.11.10", + "tim-upload-plugin": "^1.4.2", + "tim-wx-sdk": "^2.27.6" + }, + "uni-app": { + "scripts": { + "dev": { + "title": "测试", + "env": { + "UNI_PLATFORM": "mp-weixin" + } + }, + "localhost": { + "title": "本地", + "env": { + "UNI_PLATFORM": "mp-weixin" + } + }, + "pro": { + "title": "线上", + "env": { + "UNI_PLATFORM": "mp-weixin" + } + } + } + }, + "devDependencies": {} } \ No newline at end of file diff --git a/pages/article/article-detail.vue b/pages/article/article-detail.vue index 9ef3aaf..c319ceb 100644 --- a/pages/article/article-detail.vue +++ b/pages/article/article-detail.vue @@ -30,8 +30,6 @@ import api from "@/utils/api.js"; import { ref } from "vue"; import { storeToRefs } from "pinia"; import useAccountStore from "@/store/account.js"; -const env = __VITE_ENV__; -const corpId = env.MP_CORP_ID; const { account } = storeToRefs(useAccountStore()); const loading = ref(true); const error = ref(""); @@ -47,7 +45,11 @@ const markArticleRead = async () => { const unionid = account.value?.unionid; if (!unionid || !articleId) return; try { - await api("addArticleReadRecord", { corpId, articleId, unionid }, false); + await api( + "addArticleReadRecord", + { corpId: account.value?.corpId, articleId, unionid }, + false + ); } catch (err) { console.warn("markArticleRead failed:", err?.message || err); } diff --git a/store/account.js b/store/account.js index c43d123..087ce0a 100644 --- a/store/account.js +++ b/store/account.js @@ -7,7 +7,6 @@ const env = __VITE_ENV__; export default defineStore("accountStore", () => { const appid = env.MP_WX_APP_ID; - const corpId = env.MP_CORP_ID; const account = ref(null); const loading = ref(false) const isIMInitialized = ref(false); @@ -27,8 +26,7 @@ export default defineStore("accountStore", () => { const res = await api('wxAppLogin', { appId: appid, phoneCode, - code, - corpId + code }); loading.value = false if (res.success && res.data && res.data.mobile) {