feat: 默认测试环境并优化出仓与网络提示

This commit is contained in:
2026-09-24 17:56:06 +08:00
parent 53a059f16b
commit 26c7085ab2
10 changed files with 182 additions and 43 deletions
+5 -12
View File
@@ -116,7 +116,7 @@
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
import config from '@/common/config.js';
import config, { getTestApiUrl } from '@/common/config.js';
import base64 from '@/common/base64.js';
import util from '@/common/util.js';
import md5 from '@/common/md5.js';
@@ -134,10 +134,7 @@ export default {
password: ""
},
showApiUrlPicker: false,
// 暂时在打包后也展示服务器选项;生产包默认正式环境
selectedApiUrl: config.isDevelopment
? config.devApiUrlOptions[0].value
: ((config.devApiUrlOptions.find(item => item.label === '正式环境') || {}).value || config.productionApiUrl),
selectedApiUrl: getTestApiUrl(),
customApiUrl: 'http://192.168.1.66:50002/hcscm_weave/pda/v1',
apiUrlList: config.devApiUrlOptions,
phoneNo: '',
@@ -168,13 +165,9 @@ export default {
},
onShow() {
uni.getStorage({
key: 'ApiUrl',
success: (e) => {
util.updateApiUrl(e.data);
this.selectedApiUrl = e.data;
}
});
const testUrl = getTestApiUrl();
util.updateApiUrl(testUrl);
this.selectedApiUrl = testUrl;
uni.getStorage({
key: 'UserInfo',