更新
This commit is contained in:
@@ -6,7 +6,7 @@ export default {
|
||||
latitude: 39.5426,
|
||||
longitude: 116.23292,
|
||||
},
|
||||
appId: "wx9995c9f495efa82e",
|
||||
appId: "wxed3e2914d6aa4d52",
|
||||
hasLocationAuth: true,
|
||||
},
|
||||
onLaunch: function () {
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
/* 快应用特有相关 */
|
||||
},
|
||||
"mp-weixin": {
|
||||
/* 微信小程序特有相关 */ "appid": "wx9995c9f495efa82e",
|
||||
/* 微信小程序特有相关 */ "appid": "wxed3e2914d6aa4d52",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
},
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user