From 1595789b1aa441ef695e1de80976c99ef9bebfda Mon Sep 17 00:00:00 2001 From: zsk <710162063@qq.com> Date: Thu, 8 Aug 2024 18:25:34 +0800 Subject: [PATCH] 1 --- app.js | 26 ++++++++++++++++++++++++-- pages/index/index.js | 1 + pages/index/index.wxml | 5 ++--- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 4f30300..e6dd88e 100644 --- a/app.js +++ b/app.js @@ -2,7 +2,7 @@ App({ globalData: { userInfo: null, // ip: 'https://test.renminshitang.com.cn/daotian/api_dev', - ip: "https://daotian.matripe.com.cn", + ip: "", // ip: 'http://localhost:8001', sessionId: "", header: { @@ -58,7 +58,29 @@ App({ // } // }, onLaunch() { - let that = this; + let that = this; + + const envVersion = wx.getAccountInfoSync().miniProgram.envVersion; +// export let baseUrl = "" +// 判断当前环境 + +console.log(envVersion) +if (envVersion === 'develop') { + console.log('当前是开发环境'); + // baseUrl = "https://test.renminshitang.com.cn/zhuchangtong/api_dev" + that.globalData.ip = 'https://test.renminshitang.com.cn/daotian/api_dev' + // that.globalData.ip = 'https://daotian.matripe.com.cn' + // that.globalData.ip = 'https://daotian.matripe.com.cn' +} else if (envVersion === 'trial') { + console.log('当前是体验环境'); + that.globalData.ip = "https://test.renminshitang.com.cn/daotian/api_dev" +} else if (envVersion === 'release') { + console.log('当前是正式环境'); + that.globalData.ip = 'https://daotian.matripe.com.cn' + // baseUrl = "https://test.renminshitang.com.cn/zhuchangtong/api_dev" +} + + wx.hideShareMenu(); Array.prototype.logResult = function (data) { console.log("Array"); diff --git a/pages/index/index.js b/pages/index/index.js index d4066dd..3ba98d1 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -2829,6 +2829,7 @@ Page({ * */ modalMove () { + console.log("123") return false; }, /** diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 24becf6..3a90fbb 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -13,8 +13,7 @@ - - + - +