|
|
@@ -96,13 +96,13 @@
|
|
|
<Iconfont icon="g-icon-certification">实名认证</Iconfont>
|
|
|
</template>
|
|
|
</Cell>
|
|
|
- <Cell is-link :to="{ name: 'bank-sign' }" v-if="authStatus === AuthStatus.Certified && hasSignContract">
|
|
|
- <template #title>
|
|
|
+ <Cell is-link :to="{ name: 'bank-sign' }" v-if="authStatus === AuthStatus.Certified && ((hasAQAuth && hasSignContract) || !hasAQAuth)">
|
|
|
+ <template #title>
|
|
|
<Iconfont icon="g-icon-sign">银行签约</Iconfont>
|
|
|
</template>
|
|
|
</Cell>
|
|
|
<Cell is-link :to="{ name: 'account-protocol', query: { memberUserId: getMemberUserId() } }"
|
|
|
- v-if="userStore.userType != 2 && authStatus === AuthStatus.Certified && currentAccount.signstatus !== 4">
|
|
|
+ v-if="userStore.userType != 2 && authStatus === AuthStatus.Certified && hasAQAuth">
|
|
|
<template #title>
|
|
|
<Iconfont icon="g-icon-order--line">入市协议</Iconfont>
|
|
|
</template>
|
|
|
@@ -146,7 +146,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, onActivated, computed } from 'vue'
|
|
|
+import { shallowRef, onActivated, computed, ref } from 'vue'
|
|
|
import { Cell, CellGroup, Button, Icon } from 'vant'
|
|
|
import { parsePercent } from '@/filters'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
@@ -164,11 +164,14 @@ const loginStore = useLoginStore()
|
|
|
const userStore = useUserStore()
|
|
|
const accountStore = useAccountStore()
|
|
|
const { currentAccount } = accountStore.$toRefs()
|
|
|
-/// 判断是否能签约
|
|
|
-const hasSignContract = shallowRef(false)
|
|
|
const headerRef = shallowRef<HTMLDivElement>()
|
|
|
+
|
|
|
// 实名认证状态
|
|
|
const authStatus = computed(() => userStore.userAccount.hasauth)
|
|
|
+/// 是否爱签实名认证
|
|
|
+const hasAQAuth = ref(false)
|
|
|
+/// 是否签署合同
|
|
|
+const hasSignContract = shallowRef(false)
|
|
|
|
|
|
const onReady = (el: HTMLDivElement) => {
|
|
|
// 设置背景图位置
|
|
|
@@ -186,25 +189,25 @@ const doInOutMoney = (tab: string) => {
|
|
|
/// 判断当前有签约
|
|
|
if (signstatus && signstatus === 4) {
|
|
|
/// 已实名未签合同
|
|
|
- // if (!hasSignContract.value) {
|
|
|
- // dialog({
|
|
|
- // message: '根据平台规定,请先通过《入市协议》签署协议,谢谢!',
|
|
|
- // showCancelButton: true,
|
|
|
- // cancelButtonText: '暂不签署',
|
|
|
- // confirmButtonText: '立即签署'
|
|
|
- // })
|
|
|
- // .then(() => {
|
|
|
- // router.push({ name: 'account-protocol', query: { memberUserId: getMemberUserId() } })
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // router.push({ name: 'bank-wallet', query: { tab } })
|
|
|
- // })
|
|
|
- // } else {
|
|
|
+ if (hasAQAuth.value && !hasSignContract.value) {
|
|
|
+ dialog({
|
|
|
+ message: '根据平台规定,请先通过《入市协议》签署协议,谢谢!',
|
|
|
+ showCancelButton: true,
|
|
|
+ cancelButtonText: '暂不签署',
|
|
|
+ confirmButtonText: '立即签署'
|
|
|
+ }).then(() => {
|
|
|
+ router.push({ name: 'account-protocol', query: { memberUserId: getMemberUserId() } })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ router.push({ name: 'bank-wallet', query: { tab } })
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
router.push({ name: 'bank-wallet', query: { tab } })
|
|
|
- // }
|
|
|
+ }
|
|
|
} else {
|
|
|
/// 未签约
|
|
|
- if (!hasSignContract.value) {
|
|
|
+ if (hasAQAuth.value && !hasSignContract.value) {
|
|
|
dialog({
|
|
|
message: '根据平台规定,请先通过《入市协议》签署协议,谢谢!',
|
|
|
showCancelButton: true,
|
|
|
@@ -266,11 +269,12 @@ onActivated(() => {
|
|
|
data: {
|
|
|
userId: loginStore.userId,
|
|
|
memberUserId: getMemberUserId(),
|
|
|
- templatetype: 2
|
|
|
}
|
|
|
}).then((res) => {
|
|
|
- /// 判断是否能签约
|
|
|
- hasSignContract.value = res.data.some(e => e.recordstatus === 3)
|
|
|
+ /// 如果是有实名认证协议 并且 已签署
|
|
|
+ hasAQAuth.value = res.data.some(e => e.templatetype === 1 && e.recordstatus === 3)
|
|
|
+ /// 是否签署合同
|
|
|
+ hasSignContract.value = res.data.some(e => e.templatetype === 2 && e.recordstatus === 3)
|
|
|
})
|
|
|
})
|
|
|
</script>
|