This commit is contained in:
caolc
2023-06-12 14:42:21 +08:00
parent 7be1d39055
commit 41dbc836d3
9 changed files with 265 additions and 178 deletions

View File

@@ -1,5 +1,5 @@
<template>
<view class="login-page bg-white">
<view v-if="loginType" class="login-page bg-white">
<view class="image login-bg">
<!-- <image :src="imgURL+'login-bg.png'" mode="widthFix"></image> -->
<!-- <image src="../../../BagStation/static/img/LV.png" mode="widthFix"></image> -->
@@ -73,6 +73,7 @@
},
data() {
return {
loginType:false,
// imgsrc:require('../../../BagStation/static/img/login-bg.png'),
checked: false,
userHandle: false,
@@ -91,7 +92,11 @@
loginOut: uni.getStorageSync('loginOut') ? true : false
}
},
onLoad() {
onLoad(e) {
if(e.loginType){
this.loginType = Boolean(e.loginType);
console.log(e.loginType,'e.loginType')
}
uni.clearStorageSync()
// this.refreshLocation()
uni.login({
@@ -138,6 +143,7 @@
this.checked = val
},
refuseLogin() {
uni.setStorageSync('loginType',false)
uni.switchTab({
url: '/pages/tabbar/home/home'
})
@@ -200,8 +206,7 @@
oilIdentityApi.bindLoginByPhone(data, url).then(res => {
console.log(res)
if (res.code == 20000) {
this.loginSuccess(res)
this.loginSuccess(res)
}
})
}
@@ -233,7 +238,11 @@
uni.switchTab({
url: '/pages/tabbar/home/home'
})
}else{
}else{
console.log(this.loginType,'loginTypeloginTypeloginType')
if(!this.loginType){
this.refuseLogin()
}
console.log('禁摩登录i失败==================')
}
},