diff --git a/.env.development b/.env.development index d530c68..44fa76f 100644 --- a/.env.development +++ b/.env.development @@ -2,3 +2,4 @@ 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 caeee5d..5c8f00a 100644 --- a/.env.localhost +++ b/.env.localhost @@ -2,3 +2,4 @@ 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 index a25b0cd..62fd542 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ -MP_API_BASE_URL=https://patient.youcan365.com -MP_CACHE_PREFIX=development +MP_API_BASE_URL=https://ykt.youcan365.com +MP_CACHE_PREFIX=production MP_WX_APP_ID=production MP_TIM_SDK_APP_ID=1600123876 +MP_CORP_ID=wwe3fb2faa52cf9dfb \ No newline at end of file diff --git a/store/account.js b/store/account.js index bab20ef..c43d123 100644 --- a/store/account.js +++ b/store/account.js @@ -7,6 +7,7 @@ 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); @@ -26,7 +27,8 @@ export default defineStore("accountStore", () => { const res = await api('wxAppLogin', { appId: appid, phoneCode, - code + code, + corpId }); loading.value = false if (res.success && res.data && res.data.mobile) { @@ -109,6 +111,8 @@ export default defineStore("accountStore", () => { const corpId = account.value?.corpId; const unionid = account.value?.unionid; const openid = account.value?.openid; + console.clear() + console.log('corpId', corpId, ',unionid', unionid, ',openid', openid) if (!(corpId && unionid && openid) || externalUserId.value) return; const res = await api('getUnionidToExternalUserid', { unionid, openid, corpId }, false); if (res && res.success && typeof res.data === 'string' && res.data.trim()) {