|
|
|
|
@ -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");
|
|
|
|
|
|