no message

This commit is contained in:
wangdongbo 2026-02-09 16:08:45 +08:00
parent 62b03f8343
commit dcb3dda5c0
7 changed files with 69 additions and 61 deletions

View File

@ -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

View File

@ -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

4
.env.production Normal file
View File

@ -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

View File

@ -27,6 +27,12 @@
"env": {
"UNI_PLATFORM": "mp-weixin"
}
},
"pro": {
"title": "线上",
"env": {
"UNI_PLATFORM": "mp-weixin"
}
}
}
},

View File

@ -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);
}

View File

@ -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) {