2026-11-05 17:17:29 +03:30
|
|
|
<template>
|
|
|
|
|
<a-modal
|
2026-11-10 11:48:28 +03:30
|
|
|
:open="requiresKyc"
|
2026-11-05 17:17:29 +03:30
|
|
|
:closable="false"
|
|
|
|
|
:mask-closable="false"
|
|
|
|
|
:keyboard="false"
|
|
|
|
|
:footer="null"
|
|
|
|
|
:centered="true"
|
2026-11-10 11:48:28 +03:30
|
|
|
:z-index="APP_Z_MODAL"
|
2026-11-05 17:17:29 +03:30
|
|
|
:width="modalWidth"
|
2026-11-10 11:48:28 +03:30
|
|
|
:get-container="getModalContainer"
|
2026-11-05 17:17:29 +03:30
|
|
|
class="required-kyc-modal"
|
|
|
|
|
wrap-class-name="required-kyc-modal-wrap"
|
|
|
|
|
>
|
2026-11-10 14:28:32 +03:30
|
|
|
<div class="kyc-modal-content text-center py-2" dir="rtl">
|
|
|
|
|
<!-- Icon with soft glowing background -->
|
|
|
|
|
<div class="inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-amber-50 text-amber-600 border border-amber-200 mb-4 shadow-sm">
|
|
|
|
|
<BasicIcon icon="vuesax-bold:security-user" size="36" color="#d97706" />
|
|
|
|
|
</div>
|
2026-11-05 17:17:29 +03:30
|
|
|
|
2026-11-10 14:28:32 +03:30
|
|
|
<!-- Title -->
|
|
|
|
|
<h2 class="text-base font-bold text-slate-800 mb-2">
|
|
|
|
|
احراز هویت الزامی است
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
<!-- Description: شیک، کوتاه، مختصر و مفید -->
|
|
|
|
|
<p class="text-xs text-slate-600 leading-6 max-w-xs mx-auto mb-5">
|
|
|
|
|
کاربر گرامی، جهت استفاده از کلیه امکانات سامانه و شروع معاملات، لطفاً ابتدا فرایند احراز هویت خود را تکمیل فرمایید.
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<!-- Tip info box -->
|
|
|
|
|
<div class="bg-amber-50/70 border border-amber-200/80 rounded-xl p-3 text-right text-xs text-amber-900 mb-5 space-y-1.5">
|
|
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
|
<BasicIcon icon="vuesax-linear:tick-circle" size="16" color="#d97706" class="shrink-0" />
|
|
|
|
|
<span>استعلام و تایید آنی مشخصات از طریق سامانه جیبیت</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
|
<BasicIcon icon="vuesax-linear:tick-circle" size="16" color="#d97706" class="shrink-0" />
|
|
|
|
|
<span>کد ملی وارد شده باید متعلق به مالک شماره موبایل باشد</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Action buttons -->
|
|
|
|
|
<div class="flex flex-col gap-2.5">
|
|
|
|
|
<BasicButton
|
|
|
|
|
type="primary"
|
|
|
|
|
class="w-full h-11 text-sm font-semibold !rounded-xl flex items-center justify-center gap-2"
|
|
|
|
|
@click="goToKyc"
|
2026-11-05 17:17:29 +03:30
|
|
|
>
|
2026-11-10 14:28:32 +03:30
|
|
|
<span>تکمیل و احراز هویت</span>
|
|
|
|
|
<BasicIcon icon="vuesax-linear:arrow-left" size="16" />
|
|
|
|
|
</BasicButton>
|
2026-11-05 17:17:29 +03:30
|
|
|
|
2026-11-10 14:28:32 +03:30
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="text-xs text-red-600 hover:text-red-700 flex items-center justify-center gap-1.5 py-1.5 cursor-pointer transition-colors"
|
|
|
|
|
@click="onLogout"
|
|
|
|
|
>
|
|
|
|
|
<BasicIcon icon="vuesax-linear:logout" size="14" color="#dc2626" />
|
|
|
|
|
<span>خروج از حساب کاربری</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-11-05 17:17:29 +03:30
|
|
|
</div>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2026-11-10 14:28:32 +03:30
|
|
|
import { computed } from 'vue'
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
2026-11-05 17:17:29 +03:30
|
|
|
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
|
|
|
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
|
|
|
|
import { useUserStore } from '@/store/userStore'
|
|
|
|
|
import { getToken } from '@/utils'
|
|
|
|
|
import { performUserLogout } from '@/utils/authSession'
|
|
|
|
|
import { useDesktopBreakpoint } from '@/layouts/composables/useAppLayout'
|
2026-11-10 11:48:28 +03:30
|
|
|
import { isCustomerIdentityVerified } from '@/utils/customerIdentity'
|
|
|
|
|
import { APP_Z_MODAL, getModalContainer } from '@/utils/zIndex'
|
2026-11-05 17:17:29 +03:30
|
|
|
|
|
|
|
|
const route = useRoute()
|
2026-11-10 14:28:32 +03:30
|
|
|
const router = useRouter()
|
2026-11-05 17:17:29 +03:30
|
|
|
const userStore = useUserStore()
|
|
|
|
|
const isDesktop = useDesktopBreakpoint()
|
|
|
|
|
|
2026-11-10 14:28:32 +03:30
|
|
|
const modalWidth = computed(() => (isDesktop.value ? '420px' : '90vw'))
|
2026-11-05 17:17:29 +03:30
|
|
|
|
2026-11-10 11:48:28 +03:30
|
|
|
const requiresKyc = computed(() => {
|
2026-11-05 17:17:29 +03:30
|
|
|
if (!getToken()) return false
|
2026-11-10 14:28:32 +03:30
|
|
|
if (
|
|
|
|
|
route.name === 'login' ||
|
|
|
|
|
route.name === 'tvMonitor' ||
|
|
|
|
|
route.name === 'aboutSoftware' ||
|
|
|
|
|
route.name === 'user'
|
|
|
|
|
) {
|
2026-11-05 17:17:29 +03:30
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
const info = userStore.userInfo
|
|
|
|
|
if (!info) return false
|
2026-11-10 11:48:28 +03:30
|
|
|
return !isCustomerIdentityVerified(info.is_legal)
|
2026-11-05 17:17:29 +03:30
|
|
|
})
|
|
|
|
|
|
2026-11-10 14:28:32 +03:30
|
|
|
function goToKyc() {
|
|
|
|
|
void router.push({ name: 'user', query: { showEdit: 'true' } })
|
2026-11-05 17:17:29 +03:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function onLogout() {
|
|
|
|
|
await performUserLogout()
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-11-10 11:48:28 +03:30
|
|
|
<style lang="less">
|
|
|
|
|
.required-kyc-modal-wrap {
|
|
|
|
|
.ant-modal-content {
|
2026-11-10 14:28:32 +03:30
|
|
|
border-radius: 20px;
|
|
|
|
|
padding: 24px 20px;
|
2026-11-10 11:48:28 +03:30
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
2026-11-05 17:17:29 +03:30
|
|
|
<style scoped>
|
|
|
|
|
.kyc-modal-content {
|
|
|
|
|
font-family: inherit;
|
|
|
|
|
}
|
|
|
|
|
</style>
|