要搞直接登录
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<view class="title text-black">工号</view>
|
||||
<input v-model="oilSiteNo" placeholder="请输入云站编号" name="input"></input>
|
||||
</view> -->
|
||||
|
||||
|
||||
<view class="cu-form-group">
|
||||
<view class="title text-black">手机号</view>
|
||||
<input type="number" v-model="auth.phone" placeholder="请输入手机号" name="input"></input>
|
||||
@@ -55,6 +55,9 @@
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-part">
|
||||
<service-hotline />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -94,7 +97,6 @@
|
||||
console.log(code)
|
||||
const data2 = {
|
||||
code: code,
|
||||
idCard: this.auth.idNumber,
|
||||
name: this.auth.userName,
|
||||
phone: this.auth.phone,
|
||||
oilSiteCode: this.oilSiteNo
|
||||
@@ -105,7 +107,7 @@
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
@@ -133,7 +135,7 @@
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
if(res.code ===20000){
|
||||
if (res.code === 20000) {
|
||||
this.loginWeixin()
|
||||
uni.setStorage({
|
||||
key: 'Authorization',
|
||||
@@ -149,10 +151,13 @@
|
||||
console.log('deviceopenid', res.data.openid)
|
||||
}
|
||||
})
|
||||
uni.setStorageSync('userMenu',res.data.loginUser.procedureAuthList)
|
||||
uni.setStorageSync('loginUser',{id:res.data.loginUser.id,name:res.data.loginUser.name})
|
||||
uni.setStorageSync('userMenu', res.data.loginUser.procedureAuthList)
|
||||
uni.setStorageSync('loginUser', {
|
||||
id: res.data.loginUser.id,
|
||||
name: res.data.loginUser.name
|
||||
})
|
||||
uni.reLaunch({
|
||||
url:'/pages/index/index',
|
||||
url: '/pages/index/index',
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
},
|
||||
@@ -201,13 +206,16 @@
|
||||
console.log('deviceopenid', res.data.openid)
|
||||
}
|
||||
})
|
||||
uni.setStorageSync('userMenu',res.data.loginUser.procedureAuthList)
|
||||
uni.setStorageSync('loginUser',{id:res.data.loginUser.id,name:res.data.loginUser.name})
|
||||
uni.setStorageSync('userMenu', res.data.loginUser.procedureAuthList)
|
||||
uni.setStorageSync('loginUser', {
|
||||
id: res.data.loginUser.id,
|
||||
name: res.data.loginUser.name
|
||||
})
|
||||
} else {
|
||||
console.log('res', res.code)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
@@ -232,7 +240,7 @@
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
if (!this.auth.captcha) {
|
||||
uni.showToast({
|
||||
title: '请输入短信验证码',
|
||||
|
||||
Reference in New Issue
Block a user