添加租赁需要实名校验
This commit is contained in:
parent
d48615c30c
commit
62ea84fd78
|
|
@ -186,6 +186,7 @@ import {
|
||||||
} from '@/api/lease/lease.js'
|
} from '@/api/lease/lease.js'
|
||||||
import { checkLoginStatus } from '../../utils/checkLogin'
|
import { checkLoginStatus } from '../../utils/checkLogin'
|
||||||
import { isSignProtocolInstallation } from '../../api/protocol/protocol'
|
import { isSignProtocolInstallation } from '../../api/protocol/protocol'
|
||||||
|
import { getIsRealName } from '../../api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LeasePage',
|
name: 'LeasePage',
|
||||||
|
|
@ -224,6 +225,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isRealName: false,
|
||||||
isLogin: false,
|
isLogin: false,
|
||||||
hasAgreed: false,
|
hasAgreed: false,
|
||||||
formData: {
|
formData: {
|
||||||
|
|
@ -440,7 +442,33 @@ export default {
|
||||||
uni.$uv.debounce(this.handlePayment, 1000, true)
|
uni.$uv.debounce(this.handlePayment, 1000, true)
|
||||||
},
|
},
|
||||||
|
|
||||||
handlePayment() {
|
async goToRealName() {
|
||||||
|
const res = await getIsRealName()
|
||||||
|
if (!res.data) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '需要租赁,请先实名',
|
||||||
|
showCancel: true,
|
||||||
|
confirmText: '去实名',
|
||||||
|
cancelText: '暂不',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/realNameAuthentication/realNameAuthentication',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.isRealName = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async handlePayment() {
|
||||||
|
await this.goToRealName()
|
||||||
|
if (!this.isRealName) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.formData.payAmount = this.payAmount
|
this.formData.payAmount = this.payAmount
|
||||||
if (checkLoginStatus()) {
|
if (checkLoginStatus()) {
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user