|
@@ -4,7 +4,7 @@
|
|
|
<view class="experFrame">
|
|
<view class="experFrame">
|
|
|
<view>
|
|
<view>
|
|
|
<view style="text-align:center;margin-bottom:20upx;">
|
|
<view style="text-align:center;margin-bottom:20upx;">
|
|
|
- <image :src="`${constant.imgUrl}/logo4.png`" class="logo" mode="widthFix"></image>
|
|
|
|
|
|
|
+ <image :src="`${constant.imgUrl}/logo4.png`" class="logo" mode="widthFix"></image>
|
|
|
</view>
|
|
</view>
|
|
|
<view style="color:#666666;text-align:center;margin-bottom:50upx;font-size:35upx;">花掌柜</view>
|
|
<view style="color:#666666;text-align:center;margin-bottom:50upx;font-size:35upx;">花掌柜</view>
|
|
|
<view>
|
|
<view>
|
|
@@ -18,7 +18,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
<view style="margin-top:55upx;">
|
|
<view style="margin-top:55upx;">
|
|
|
- <button class="admin-button-com small buttonText" style="background-color:#2BA245;border-color:#2BA245;color:white;"
|
|
|
|
|
|
|
+ <button class="admin-button-com small buttonText" style="background-color:#2BA245;border-color:#2BA245;color:white;"
|
|
|
open-type="getPhoneNumber" @getphonenumber="wxPhoneLogin">微信手机号一键登录</button>
|
|
open-type="getPhoneNumber" @getphonenumber="wxPhoneLogin">微信手机号一键登录</button>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
@@ -58,7 +58,7 @@ import { phoneLogin,wxMobileLogin } from "@/api/auth";
|
|
|
export default {
|
|
export default {
|
|
|
name: "login",
|
|
name: "login",
|
|
|
components: {
|
|
components: {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
mixins: [],
|
|
mixins: [],
|
|
|
data() {
|
|
data() {
|
|
@@ -191,10 +191,10 @@ export default {
|
|
|
|
|
|
|
|
if(this.agree == 0){
|
|
if(this.agree == 0){
|
|
|
this.$msg('请同意并勾选服务协议和隐私政策')
|
|
this.$msg('请同意并勾选服务协议和隐私政策')
|
|
|
- return false
|
|
|
|
|
|
|
+ return false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- uni.showLoading({mask:true})
|
|
|
|
|
|
|
+ //uni.showLoading({mask:true})
|
|
|
uni.preLogin({
|
|
uni.preLogin({
|
|
|
provider: 'univerify',
|
|
provider: 'univerify',
|
|
|
success:()=>{
|
|
success:()=>{
|
|
@@ -203,7 +203,7 @@ export default {
|
|
|
// 自定义登录框样式
|
|
// 自定义登录框样式
|
|
|
univerifyStyle: {
|
|
univerifyStyle: {
|
|
|
"fullScreen": true,
|
|
"fullScreen": true,
|
|
|
- "privacyTerms": {
|
|
|
|
|
|
|
+ "privacyTerms": {
|
|
|
"defaultCheckBoxState":false,
|
|
"defaultCheckBoxState":false,
|
|
|
"checkBoxSize":18
|
|
"checkBoxSize":18
|
|
|
}
|
|
}
|
|
@@ -214,7 +214,7 @@ export default {
|
|
|
let access_token = res.authResult.access_token
|
|
let access_token = res.authResult.access_token
|
|
|
phoneLogin({openid,access_token}).then(subRes=>{
|
|
phoneLogin({openid,access_token}).then(subRes=>{
|
|
|
let token = subRes.data.token || ''
|
|
let token = subRes.data.token || ''
|
|
|
- uni.hideLoading()
|
|
|
|
|
|
|
+ //uni.hideLoading()
|
|
|
if (that.$util.isEmpty(token)) {
|
|
if (that.$util.isEmpty(token)) {
|
|
|
that.$msg('请先注册')
|
|
that.$msg('请先注册')
|
|
|
return false
|
|
return false
|
|
@@ -254,7 +254,7 @@ export default {
|
|
|
// 登录失败
|
|
// 登录失败
|
|
|
//关闭一键登录弹出窗口
|
|
//关闭一键登录弹出窗口
|
|
|
uni.closeAuthView()
|
|
uni.closeAuthView()
|
|
|
- uni.hideLoading()
|
|
|
|
|
|
|
+ //uni.hideLoading()
|
|
|
setTimeout(function(){
|
|
setTimeout(function(){
|
|
|
//uni.showToast({ title: '登录失败,请打开流量,关闭wifi,再登录', duration: 3000, icon:'none' })
|
|
//uni.showToast({ title: '登录失败,请打开流量,关闭wifi,再登录', duration: 3000, icon:'none' })
|
|
|
},1000)
|
|
},1000)
|
|
@@ -262,7 +262,7 @@ export default {
|
|
|
complete: (res) => {
|
|
complete: (res) => {
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
uni.closeAuthView()
|
|
uni.closeAuthView()
|
|
|
- uni.hideLoading()
|
|
|
|
|
|
|
+ //uni.hideLoading()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -271,6 +271,10 @@ export default {
|
|
|
// 预登录失败
|
|
// 预登录失败
|
|
|
//如果手机没有插入有效的sim卡,或者手机蜂窝数据网络关闭
|
|
//如果手机没有插入有效的sim卡,或者手机蜂窝数据网络关闭
|
|
|
//都有可能造成预登录校验失败
|
|
//都有可能造成预登录校验失败
|
|
|
|
|
+ if (res.code == 30005) {
|
|
|
|
|
+ //that.$msg('登录失败,请打开流量,再登录')
|
|
|
|
|
+ uni.showToast({title: '登录失败,请打开流量,或安装上手机卡', duration: 3000, icon:'none'})
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -280,7 +284,7 @@ export default {
|
|
|
let password = this.password
|
|
let password = this.password
|
|
|
if(that.agree == 0){
|
|
if(that.agree == 0){
|
|
|
this.$msg('请同意并勾选服务协议和隐私政策')
|
|
this.$msg('请同意并勾选服务协议和隐私政策')
|
|
|
- return false
|
|
|
|
|
|
|
+ return false
|
|
|
}
|
|
}
|
|
|
if (that.$util.isEmpty(mobile)) {
|
|
if (that.$util.isEmpty(mobile)) {
|
|
|
this.$msg('请输入手机号')
|
|
this.$msg('请输入手机号')
|
|
@@ -401,4 +405,4 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|