Ver código fonte

fix(user): 修正微信小程序跳转环境配置

- 去除 manifest.json 文件多余空行
- 优化 user store 中微信小程序跳转的 env_version 配置
- 通过注释切换 develop、trial 和 release 环境,默认使用 trial
- 保持跳转链接格式和参数编码的一致性
- 确保调用 uni.hideLoading 在跳转后执行
zhangtao 1 dia atrás
pai
commit
f3302f4a84
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      src/store/user.ts

+ 4 - 1
src/store/user.ts

@@ -531,7 +531,10 @@ export const useUserStore = defineStore('user', {
         .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
         .join('&')
       const path = 'subPack-common/threePay/index'
-      window.location.href = `weixin://dl/business/?appid=wx43b5b906cc30ed0b&path=${path}&query=${encodeURIComponent(queryString)}&env_version=develop`
+      // const env = 'develop'
+      const env = 'trial'
+      // const env = 'release'
+      window.location.href = `weixin://dl/business/?appid=wx43b5b906cc30ed0b&path=${path}&query=${encodeURIComponent(queryString)}&env_version=${env}`
       uni.hideLoading()
       // #endif
     },