chenjj hace 3 meses
padre
commit
5653f8eda3
Se han modificado 3 ficheros con 12 adiciones y 4 borrados
  1. 2 1
      App.vue
  2. 9 2
      config.js
  3. 1 1
      pages/mine/index.vue

+ 2 - 1
App.vue

@@ -8,7 +8,8 @@ export default {
 		userId: uni.getStorageSync('userId') //读取本地存储
 	},
 	onLaunch: function () {
-		console.log('App Launch')
+		//develop:开发版 trial:体验版  release:正式版
+		console.log('App Launch',uni.getAccountInfoSync().miniProgram.envVersion)
 		console.log("App Launch");
 		uni.loadFontFace({
 			family: "uicon-iconfont",

+ 9 - 2
config.js

@@ -1,11 +1,18 @@
+const base_url = {
+  develop:'http://192.168.100.128:9527',//开发版 
+  trial: 'https://zybooks.tech/prod-api',//体验版
+  release: 'https://goldshulin.com/prod-api',//正式版
+}
+
+const env = uni.getAccountInfoSync().miniProgram.envVersion
 // 应用全局配置
 const config = {
   // baseUrl: 'https://vue.ruoyi.vip/prod-api',
   //cloud后台网关地址
   // baseUrl: 'http://192.168.100.139:9527', //嵘哥
-  // baseUrl: 'http://192.168.100.128:9527',//龙哥
+  baseUrl: base_url[env],//龙哥
   // baseUrl: 'http://192.168.100.122:9527',
-  baseUrl: 'https://goldshulin.com/prod-api',
+  // baseUrl: 'https://goldshulin.com/prod-api',
   mapKey: 'KFEBZ-P2GKZ-A5PX4-7Q6Y7-KXOBF-XCB4C',
   appName: '金邻助家',
   // 应用信息

+ 1 - 1
pages/mine/index.vue

@@ -452,7 +452,7 @@ const getNav = async () => {
     globalData.value = res;
     console.log("TCL: getNav -> res", res)
   } catch (error) {
-
+	  console.log("TCL: getNav -> error", error)
   }
 }