mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 16:56:43 +08:00
hotfix:内外勤判断调整 --提交人:阳华祥
This commit is contained in:
@@ -126,7 +126,8 @@ export default {
|
||||
async checkModelFilter() {
|
||||
const agentInfoRes = await getCheckModelAgentInfo({})
|
||||
if (agentInfoRes.result == 0) {
|
||||
if (!/^N{1}/.test(agentInfoRes.branchType)) {
|
||||
if (/^[0-9][0-9]*$/.test(agentInfoRes.branchType)) {
|
||||
// 内勤 并且手机号码正确
|
||||
this.checkModel.mobile = agentInfoRes.phoneNo
|
||||
this.checkModel.show = true
|
||||
this.isShowSms = false
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<div class="insured-info-container">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-if="clickMobileDisabled"
|
||||
:value="logoutDTO.mobile | dataMaskingMobile"
|
||||
clearable
|
||||
required
|
||||
@@ -11,7 +12,16 @@
|
||||
v-validate="'required|mobile'"
|
||||
:disabled="true"
|
||||
/>
|
||||
<van-field v-model="logoutDTO.smsCode" required center label="验证码" clearable placeholder="请输入短信验证码" @input="validateNext">
|
||||
<van-field
|
||||
v-if="clickMobileDisabled"
|
||||
v-model="logoutDTO.smsCode"
|
||||
required
|
||||
center
|
||||
label="验证码"
|
||||
clearable
|
||||
placeholder="请输入短信验证码"
|
||||
@input="validateNext"
|
||||
>
|
||||
<van-button type="danger" slot="button" size="small" @click="getCode" :disabled="codeDisabled" v-no-more-click="1000">
|
||||
{{ codeDisabled ? `${countDown}s后重新获取` : '获取验证码' }}
|
||||
</van-button>
|
||||
@@ -65,7 +75,8 @@ export default {
|
||||
countDown: 60, // 倒计时
|
||||
codeDisabled: true, // 获取验证码按钮是否禁用
|
||||
branchType: null,
|
||||
checkNextDisabled: true // 禁用修改
|
||||
checkNextDisabled: true, // 禁用修改
|
||||
clickMobileDisabled: false // 手机号是否存在
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@@ -73,10 +84,11 @@ export default {
|
||||
// 获取代理人信息
|
||||
const res = await getAgentInfo({ '89': '890' })
|
||||
if (res.result == 0) {
|
||||
this.branchType = /^N{1}/.test(res.branchType) ? '1' : '0' //res.branchType 以N打头的是内勤 其他是外勤
|
||||
if (this.branchType == '0') {
|
||||
if (/^[0-9][0-9]*$/.test(res.branchType)) {
|
||||
// 内勤 手机号格式正确
|
||||
this.logoutDTO.mobile = res.phoneNo
|
||||
this.codeDisabled = false
|
||||
this.clickMobileDisabled = true
|
||||
}
|
||||
} else {
|
||||
return this.$toast(res.resultMessage)
|
||||
@@ -127,9 +139,11 @@ export default {
|
||||
},
|
||||
//操作下一步按钮状态
|
||||
validateNext() {
|
||||
if (!this.logoutDTO.smsCode || this.logoutDTO.smsCode == '') {
|
||||
this.checkNextDisabled = true
|
||||
return
|
||||
if (this.clickMobileDisabled) {
|
||||
if (!this.logoutDTO.smsCode || this.logoutDTO.smsCode == '') {
|
||||
this.checkNextDisabled = true
|
||||
return
|
||||
}
|
||||
}
|
||||
// 2、判断密码是否一致
|
||||
if (!this.logoutDTO.pwd || this.logoutDTO.pwd == '') {
|
||||
@@ -150,12 +164,14 @@ export default {
|
||||
// 注销
|
||||
logoutAgent() {
|
||||
// 1、判断计时器
|
||||
if (!this.codeDisabled) {
|
||||
return this.$toast('请先获取验证码')
|
||||
}
|
||||
//
|
||||
if (!this.logoutDTO.smsCode || this.logoutDTO.smsCode == '') {
|
||||
return this.$toast('请输入短信验证码')
|
||||
if (this.clickMobileDisabled) {
|
||||
if (!this.codeDisabled) {
|
||||
return this.$toast('请先获取验证码')
|
||||
}
|
||||
//
|
||||
if (!this.logoutDTO.smsCode || this.logoutDTO.smsCode == '') {
|
||||
return this.$toast('请输入短信验证码')
|
||||
}
|
||||
}
|
||||
// 2、判断密码是否一致
|
||||
if (!this.logoutDTO.pwd || this.logoutDTO.pwd == '') {
|
||||
@@ -185,6 +201,7 @@ export default {
|
||||
this.$toast('用户注销成功')
|
||||
// 跳转登陆页面
|
||||
this.$CacheUtils.removeLocItem('token')
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('bridge', { flag: 'login' })
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
|
||||
Reference in New Issue
Block a user