接口对接修改
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<input
|
||||
class="login-box-input-main"
|
||||
maxlength="11"
|
||||
v-model="yzmForm.phone"
|
||||
v-model="phone"
|
||||
placeholder="请输入手机号"
|
||||
/>
|
||||
</view>
|
||||
@@ -33,7 +33,7 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="login-box-input mt100">
|
||||
<input class="login-box-input-main" maxlength="11" v-model="pwdForm.phone" placeholder="请输入账号" />
|
||||
<input class="login-box-input-main" maxlength="11" v-model="phone" placeholder="请输入账号" />
|
||||
</view>
|
||||
<view class="login-box-input mt40">
|
||||
<input
|
||||
@@ -78,15 +78,14 @@ export default {
|
||||
return {
|
||||
loading: false,
|
||||
loginType: 'pwd',
|
||||
phone:'13999999999',
|
||||
pwdForm: {
|
||||
phone: '13888888888',
|
||||
pwd: 'gwo6H8Kb',
|
||||
pwd: '',
|
||||
imgCode: '',
|
||||
},
|
||||
yzmForm: {
|
||||
phone: '',
|
||||
code: '',
|
||||
imgCode: '',
|
||||
imgCode: '123456789',
|
||||
},
|
||||
waitTime: 0,
|
||||
tenantId: '',
|
||||
@@ -96,14 +95,14 @@ export default {
|
||||
components: {},
|
||||
methods: {
|
||||
getCode() {
|
||||
if (!this.yzmForm.phone) {
|
||||
if (!this.phone) {
|
||||
return this.$util.toast('请输入手机号!')
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '请稍等',
|
||||
})
|
||||
apiGetYms({
|
||||
phone: this.yzmForm.phone,
|
||||
phone: this.phone,
|
||||
type: 0,
|
||||
})
|
||||
.then((res) => {
|
||||
@@ -132,10 +131,12 @@ export default {
|
||||
}
|
||||
},
|
||||
pwdLogin() {
|
||||
if (!this.pwdForm.phone && !this.pwdForm.pwd) {
|
||||
if (!this.phone && !this.pwdForm.pwd) {
|
||||
return this.$util.toast('请填写登录信息!')
|
||||
}
|
||||
let loginName = encrypt(this.pwdForm.phone)
|
||||
console.log(this.phone);
|
||||
let loginName = encrypt(this.phone)
|
||||
console.log(loginName);
|
||||
gongkey({ loginName }).then((response) => {
|
||||
let publicKey = response.data
|
||||
let sm3Pwd = sm3Digest(this.pwdForm.pwd)
|
||||
@@ -152,11 +153,11 @@ export default {
|
||||
})
|
||||
},
|
||||
yzmLogin() {
|
||||
if (!this.yzmForm.phone && !this.yzmForm.code) {
|
||||
if (!this.phone && !this.yzmForm.code) {
|
||||
return this.$util.toast('请填写登录信息!')
|
||||
}
|
||||
apiYsmLogin({
|
||||
phone: this.yzmForm.phone,
|
||||
phone: this.phone,
|
||||
smsCode: this.yzmForm.code,
|
||||
}).then((res) => {
|
||||
this.$util.loginSuccess(res.data)
|
||||
@@ -165,7 +166,8 @@ export default {
|
||||
},
|
||||
onLoad(o) {
|
||||
// 移除所有的缓存
|
||||
uni.clearStorageSync()
|
||||
// uni.clearStorageSync()
|
||||
uni.removeStorageSync('access_token')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user