页面接口推介
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<view class="login-box-input-img"></view>
|
||||
</view> -->
|
||||
<view class="login-box-input mt40">
|
||||
<input class="login-box-input-main" v-model="yzmForm.code" placeholder="手机验证码" />
|
||||
<input class="login-box-input-main" v-model="yzmForm.code" placeholder="手机验证码" />
|
||||
<view
|
||||
class="ml40"
|
||||
style="font-size: 28rpx; color: #666; width: 200rpx; text-align: center"
|
||||
@@ -33,7 +33,12 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="login-box-input mt100">
|
||||
<input class="login-box-input-main" maxlength="11" v-model="phone" placeholder="请输入账号" />
|
||||
<input
|
||||
class="login-box-input-main"
|
||||
maxlength="11"
|
||||
v-model="phone"
|
||||
placeholder="请输入手机号"
|
||||
/>
|
||||
</view>
|
||||
<view class="login-box-input mt40">
|
||||
<input
|
||||
@@ -59,7 +64,9 @@
|
||||
<navigator url="/pages/user/register" hover-class="none">快速注册</navigator>
|
||||
</view>
|
||||
<view class="login-box-tips">
|
||||
<view style="color: #999">点击登录即表示同意</view>
|
||||
<view style="color: #999"
|
||||
><checkbox :checked="checkbox" @click="checkbox = !checkbox" /> 我已阅读并同意</view
|
||||
>
|
||||
<navigator url="/pages/mine/agreement" hover-class="none">《用户协议》</navigator>
|
||||
<navigator url="/pages/mine/policy" hover-class="none">《个人信息保护政策》</navigator>
|
||||
</view>
|
||||
@@ -76,16 +83,17 @@ import { sm3Digest } from '@/common/js/sm3.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
checkbox: false,
|
||||
loading: false,
|
||||
loginType: 'pwd',
|
||||
phone:'13999999999',
|
||||
phone: '',
|
||||
pwdForm: {
|
||||
pwd: '',
|
||||
imgCode: '',
|
||||
},
|
||||
yzmForm: {
|
||||
code: '',
|
||||
imgCode: '123456789',
|
||||
code: '123456789',
|
||||
imgCode: '',
|
||||
},
|
||||
waitTime: 0,
|
||||
tenantId: '',
|
||||
@@ -123,6 +131,9 @@ export default {
|
||||
})
|
||||
},
|
||||
login() {
|
||||
if (!this.checkbox) {
|
||||
return this.$util.toast('请先阅读并同意用户协议和个人信息保护政策!')
|
||||
}
|
||||
console.log(this.loginType)
|
||||
if (this.loginType == 'pwd') {
|
||||
this.pwdLogin()
|
||||
@@ -134,9 +145,9 @@ export default {
|
||||
if (!this.phone && !this.pwdForm.pwd) {
|
||||
return this.$util.toast('请填写登录信息!')
|
||||
}
|
||||
console.log(this.phone);
|
||||
console.log(this.phone)
|
||||
let loginName = encrypt(this.phone)
|
||||
console.log(loginName);
|
||||
console.log(loginName)
|
||||
gongkey({ loginName }).then((response) => {
|
||||
let publicKey = response.data
|
||||
let sm3Pwd = sm3Digest(this.pwdForm.pwd)
|
||||
@@ -167,7 +178,8 @@ export default {
|
||||
onLoad(o) {
|
||||
// 移除所有的缓存
|
||||
// uni.clearStorageSync()
|
||||
uni.removeStorageSync('access_token')
|
||||
uni.removeStorageSync(this.$cacheKey.access_token)
|
||||
uni.removeStorageSync(this.$cacheKey.engineering)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -269,6 +281,7 @@ export default {
|
||||
margin-top: 60rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user