From 6eb6b3a59e624eb043dd400d7d801cc01c8dbc3c Mon Sep 17 00:00:00 2001 From: corala <18339694416@163.com> Date: Wed, 27 Apr 2022 17:08:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 ++- pages/AR/index.js | 2 +- pages/index/index.js | 6 ++-- pages/login/index.js | 4 +-- pages/share/index.js | 2 +- project.private.config.json | 57 +------------------------------------ 6 files changed, 11 insertions(+), 64 deletions(-) diff --git a/app.js b/app.js index c591040..e96a3b6 100644 --- a/app.js +++ b/app.js @@ -20,6 +20,8 @@ App({ this.loginGettoken() }, globalData: { + httpurl: 'https://cktest.2weisou.com/meta/', // 生产 + // httpurl: 'http://192.168.31.172:9998/',// 柏伟 userInfo: null, token: '', gameurl: ''// 游戏链接 @@ -34,7 +36,7 @@ App({ if (res.code) { //发起网络请求 wx.request({ - url:'https://cktest.2weisou.com/meta/auth/mobile/token/social?grant_type=mobil&mobile=MINI_C@'+res.code+'@'+'', + url:that.globalData.httpurl+ 'auth/mobile/token/social?grant_type=mobil&mobile=MINI_C@'+res.code+'@'+'', method: "POST", data: { }, diff --git a/pages/AR/index.js b/pages/AR/index.js index a7f8a5c..4620b3b 100644 --- a/pages/AR/index.js +++ b/pages/AR/index.js @@ -234,7 +234,7 @@ Page({ queryToken: function() { // 获取token return new Promise((resolve, reject) => { wx.request({ - url: 'https://cktest.2weisou.com/meta/ar/ar/getToken', + url: getApp().globalData.httpurl +'ar/ar/getToken', method: 'get', data: {}, header: { diff --git a/pages/index/index.js b/pages/index/index.js index e755745..7840dc7 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -14,11 +14,11 @@ Page({ },1000) } }, + // 判断是跳转游戏还是静态页 panduanFun(){ let that = this wx.request({ - url: 'http://192.168.31.104:9998/ar/game/getOne', - // url: 'https://cktest.2weisou.com/meta/ar/game/getOne', + url: getApp().globalData.httpurl + 'ar/game/getOne', method: "get", data: {}, header: { @@ -51,7 +51,7 @@ Page({ let token = wx.getStorageSync('token') console.log(token) wx.request({ - url: 'https://cktest.2weisou.com/meta/ar/user/bindNShareUserId?shareUserId='+ id, + url: getApp().globalData.httpurl + 'ar/user/bindNShareUserId?shareUserId='+ id, method: "get", data: {}, header: { diff --git a/pages/login/index.js b/pages/login/index.js index fa0a8f0..f3f29ca 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -96,7 +96,7 @@ Page({ userVxGender: obj.gender } wx.request({ - url: 'https://cktest.2weisou.com/meta/ar/user/bindNickname', + url: getApp().globalData.httpurl +'ar/user/bindNickname', method: "POST", data: params, header: { @@ -140,7 +140,7 @@ Page({ encryptedData } = e.detail; wx.request({ - url: 'https://cktest.2weisou.com/meta/ar/user/bindMini', + url: getApp().globalData.httpurl + 'ar/user/bindMini', method: "POST", data: { encrypted: encryptedData, diff --git a/pages/share/index.js b/pages/share/index.js index e340af9..eef9936 100644 --- a/pages/share/index.js +++ b/pages/share/index.js @@ -78,7 +78,7 @@ Page({ shareFun(){ let token = getApp().globalData.token wx.request({ - url: 'https://cktest.2weisou.com/meta/ar/user/share', + url: getApp().globalData.httpurl +'ar/user/share', method: "POST", data: {}, header: { diff --git a/project.private.config.json b/project.private.config.json index 73c62ba..a868716 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -15,62 +15,7 @@ "list": [] }, "miniprogram": { - "list": [ - { - "name": "pages/open/index", - "pathName": "pages/open/index", - "query": "", - "scene": null - }, - { - "name": "pages/AR/index", - "pathName": "pages/AR/index", - "query": "", - "scene": null - }, - { - "name": "pages/login/index", - "pathName": "pages/login/index", - "query": "", - "scene": null - }, - { - "name": "pages/index/index", - "pathName": "pages/index/index", - "query": "id=68", - "scene": null - }, - { - "name": "pages/index/index", - "pathName": "pages/index/index", - "query": "id=83", - "scene": null - }, - { - "name": "pages/index/index", - "pathName": "pages/index/index", - "query": "", - "scene": null - }, - { - "name": "pages/index/index", - "pathName": "pages/index/index", - "query": "id=68", - "scene": null - }, - { - "name": "pages/share/index", - "pathName": "pages/share/index", - "query": "id=88", - "scene": null - }, - { - "name": "pages/index/index", - "pathName": "pages/index/index", - "query": "id=88", - "scene": null - } - ] + "list": [] } } } \ No newline at end of file