diff --git a/src/App.vue b/src/App.vue index 5340c70..f90c767 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,7 +6,7 @@ export default { latitude: 39.5426, longitude: 116.23292, }, - appId: "wx9995c9f495efa82e", + appId: "wxed3e2914d6aa4d52", hasLocationAuth: true, }, onLaunch: function () { diff --git a/src/api/login/index.js b/src/api/login/index.js index 663813c..4c14c8e 100644 --- a/src/api/login/index.js +++ b/src/api/login/index.js @@ -25,17 +25,17 @@ export default { }); }, // 获取短信验证码 - verifyCodeLoginCheckAccountPersonal(params) { + getVerifyCode(params) { return request({ - url: "/guest-identity/unionAuth/verifyCodeLoginCheckAccountPersonal", + url: "/guest-identity/unionAuth/getVerifyCode", method: "post", data: params, }); }, // 验证码登录 - verifyCodeLoginPersonal(params) { + verifyCodeRegister(params) { return request({ - url: "/guest-identity/unionAuth/verifyCodeLoginPersonal", + url: "/guest-identity/unionAuth/verifyCodeRegister", method: "post", data: params, }); diff --git a/src/manifest.json b/src/manifest.json index 5fb2f35..f20915f 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -57,7 +57,7 @@ /* 快应用特有相关 */ }, "mp-weixin": { - /* 微信小程序特有相关 */ "appid": "wx9995c9f495efa82e", + /* 微信小程序特有相关 */ "appid": "wxed3e2914d6aa4d52", "setting": { "urlCheck": false }, diff --git a/src/subPackages/login/login/index.vue b/src/subPackages/login/login/index.vue index 1731cfe..12716a4 100644 --- a/src/subPackages/login/login/index.vue +++ b/src/subPackages/login/login/index.vue @@ -125,26 +125,24 @@ export default { obtainCode() { if (this.countdown.num != 60) return; if (!this.checkParams(["username"])) return; + serve.getVerifyCode({ username: this.params.username }).then((res) => { + if (res.code == 20000) { + uni.showToast({ + title: res.msg, + icon: "none", + }); + this.params.verifyCodeToken = res.data.verifyCodeToken; - let instance = setInterval(() => { - if (!this.countdown.num) { - clearInterval(instance); - this.countdown.num = 60; - return; + let instance = setInterval(() => { + if (!this.countdown.num) { + clearInterval(instance); + this.countdown.num = 60; + return; + } + this.countdown.num -= 1; + }, 1000); } - this.countdown.num -= 1; - }, 1000); - - serve - .verifyCodeLoginCheckAccountPersonal({ username: this.params.username }) - .then((res) => { - if (res.code == 20000) { - uni.showToast({ - title: res.msg, - }); - this.params.verifyCodeToken = res.data.verifyCodeToken; - } - }); + }); }, // 自动登录 loginPersonal() { @@ -183,11 +181,16 @@ export default { realLogin() { if (!this.checkParams(["username", "verifyCode"])) return; - serve.verifyCodeLoginPersonal(this.params).then((res) => { - if (res.code === 20000) { - this.callbackLogin(res); - } - }); + serve + .verifyCodeRegister({ + unionId: uni.getStorageSync("unionid"), + ...this.params, + }) + .then((res) => { + if (res.code === 20000) { + this.callbackLogin(res); + } + }); }, bindLoginByPhonePersonal(detail) { const params = { diff --git a/src/utils/request.js b/src/utils/request.js index b90a180..8b3b431 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -3,8 +3,8 @@ import axiosMiniprogramAdapter from "axios-miniprogram-adapter"; import utils from "@/utils/encode"; let env; env = "test"; -env = "production"; -let testUrl = "http://192.168.110.77:38080"; +// env = "production"; +let testUrl = "http://192.168.110.230:38080"; let productUrl = "http://uat.xingoil.com/guest-api"; // let productUrl = "https://www.xingoil.com/adminapi";