Browse Source

小程序登录提示

大厂分支
zhichao lei 4 years ago
parent
commit
d44d894a0d
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue

+ 6
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue View File

@@ -138,7 +138,12 @@ export default {
// 不是小程序,则提交用户名、密码登录
// 是小程序,则申请授权码登录
if (!type) {
loginResult = await this.HTTP_POST('/user/login', { username, password: this.MD5(password) }, '登录时发生错误')
let postResult = await this.POST('/user/login', { username, password: this.MD5(password) })
if(postResult[1].data.code=='200'){
loginResult=postResult[1].data.data;
}else{
this.TOAST(postResult[1].data.info);
}
} else {
const [codeErr, { code } = {}] = await uni.login({ provider: type })
if (codeErr || !code) {
@@ -151,7 +156,6 @@ export default {
}

if (!loginResult) {
this.TOAST(loginResult);
return
}



Loading…
Cancel
Save