develop
xiaozhiyong 10 months ago
parent 4fd0b3eed1
commit 8afc6deaf8
  1. 2
      src/App.vue
  2. 8
      src/api/login/index.js
  3. 2
      src/manifest.json
  4. 49
      src/subPackages/login/login/index.vue
  5. 4
      src/utils/request.js

@ -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";

Loading…
Cancel
Save