feat: 更新正式环境API地址并默认选用

This commit is contained in:
2026-10-30 11:59:10 +08:00
parent a4dbcbe504
commit b1404fdd89
7 changed files with 46 additions and 36 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
import config, { getTestApiUrl } from '@/common/config.js';
import config, { getDefaultApiUrl } from '@/common/config.js';
import util from '@/common/util.js';
import Vue from 'vue'
import Vuex from 'vuex'
@@ -19,15 +19,15 @@ try{
}
// 初始化API URL
// 初始化API URL(默认正式环境)
function initApiUrl() {
const testUrl = getTestApiUrl();
const defaultUrl = getDefaultApiUrl();
try {
uni.setStorageSync('ApiUrl', testUrl);
uni.setStorageSync('ApiUrl', defaultUrl);
} catch (e) {
console.log('写入测试环境地址失败', e);
console.log('写入正式环境地址失败', e);
}
return testUrl;
return defaultUrl;
}
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名