From eda54d3cf8ce0cf2896e2f122cb90c332833a924 Mon Sep 17 00:00:00 2001 From: corala <18339694416@163.com> Date: Thu, 28 Apr 2022 19:53:41 +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 --- pages/index/index.js | 2 +- pages/login/index.js | 14 ++++++++++++-- project.private.config.json | 6 ++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 694994a..79922cb 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -29,7 +29,7 @@ Page({ if (res.data.code == 0) { let data = res.data.data // gameVersion为指定发版,和后台是否保持一致,方便提审通过,后续只需更改1为2,3,4,5... - if(data.miniType==0&&data.gameVersion==1){ + if(data.miniType==0&&data.gameVersion==2){ getApp().globalData.gameurl = data.linkUrl that.tabindex(data.linkUrl) }else{ diff --git a/pages/login/index.js b/pages/login/index.js index 9d123bd..c333c07 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -103,7 +103,8 @@ Page({ Authorization: 'bearer '+ that.data.token }, success(res) { - if (res.statusCode == 200) { + console.log(res) + if (res.data.code==0) { that.setData({ avatarModal: false, step: 2 @@ -113,6 +114,11 @@ Page({ phoneModal: true }) } + }else{ + wx.showToast({ + icon: 'none', + title: res.data.msg + }) } } }) @@ -125,7 +131,6 @@ Page({ // console.log(res) that.bindNickname(res.userInfo) getApp().globalData.userInfo.userWxName = res.userInfo.nickName - console.log(2121212) console.log(getApp().globalData.userInfo) } }) @@ -161,6 +166,11 @@ Page({ getApp().globalData.userInfo.phone = res.data.data console.log(getApp().globalData.userInfo) that.leave() + }else{ + wx.showToast({ + icon: 'none', + title: res.data.msg + }) } } }) diff --git a/project.private.config.json b/project.private.config.json index 2f348c6..6f2c7ad 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -27,6 +27,12 @@ "pathName": "pages/index/index", "query": "id=70", "scene": null + }, + { + "name": "pages/index/index", + "pathName": "pages/index/index", + "query": "id=77", + "scene": null } ] }