From 7d8f971852cf320869eb009ffa06d104ece49457 Mon Sep 17 00:00:00 2001 From: SelfRidicule Date: Thu, 25 Apr 2024 13:46:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=8F=E8=BF=B0:=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miniprogram/app.js | 2 ++ miniprogram/pages/login/login.js | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/miniprogram/app.js b/miniprogram/app.js index 6cbde29..ef463f9 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -1,5 +1,7 @@ App({ + // 郑州小程序配置信息 APPID: 'wx5582a07c1fbbcf06', + APPSECRET: 'ad24130a8919c613efd9538f69abafd3', // 本地测试时不用加/api DOMAIN_NAME: 'http://192.168.0.11:9227', //接口域名 IMG_NAME: 'http://192.168.0.11:9227', diff --git a/miniprogram/pages/login/login.js b/miniprogram/pages/login/login.js index 244099b..d7d5f86 100644 --- a/miniprogram/pages/login/login.js +++ b/miniprogram/pages/login/login.js @@ -30,6 +30,8 @@ Page({ wx.login({ success(wxRes) { loginRq({ + "appId": app.APPID, + "appSecret": app.APPSECRET, "jsCode": wxRes.code }).then(res => { console.log('loginRq', res); @@ -51,6 +53,8 @@ Page({ let _this = this; console.log('getPhoneNumber', e) registerPhone({ + "appId": app.APPID, + "appSecret": app.APPSECRET, "code": e.detail.code, "openid": _this.data.openid }).then(res => { @@ -59,7 +63,7 @@ Page({ // 跳转首页 _this.jumpIndex(res.openid, res.user, res.token.token) } else { - app.selfShowMsg(res.msg) + app.selfShowMsg(res.msg) } }) },