2026-06-16 19:47:28 +03:30
|
|
|
<template>
|
|
|
|
|
<BasicModal
|
|
|
|
|
v-model:visible="localVisible"
|
|
|
|
|
custom-footer
|
|
|
|
|
:closable="false"
|
|
|
|
|
wrap-class-name="deposit-guide-modal-wrap"
|
|
|
|
|
width="min(92vw, 380px)"
|
|
|
|
|
>
|
|
|
|
|
<div class="deposit-guide">
|
|
|
|
|
<div class="deposit-guide__icon-wrap" aria-hidden="true">
|
|
|
|
|
<BasicIcon icon="vuesax-linear:empty-wallet-add" size="34" color="#16a34a" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h2 class="deposit-guide__title">{{ title }}</h2>
|
|
|
|
|
|
|
|
|
|
<div class="deposit-guide__body">
|
|
|
|
|
<slot />
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-07-23 14:10:40 +02:00
|
|
|
<div class="deposit-guide__accounts">
|
2026-09-02 08:26:52 -04:00
|
|
|
<div v-if="hasDepositCardValue" class="deposit-guide__account-row">
|
2026-07-23 14:10:40 +02:00
|
|
|
<span class="deposit-guide__account-label">{{ depositCardLabel }}</span>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="deposit-guide__account-value"
|
|
|
|
|
:aria-label="`کپی ${depositCardLabel}`"
|
|
|
|
|
@click="copyDepositCardNumber"
|
|
|
|
|
>
|
|
|
|
|
<span class="deposit-guide__account-text" dir="ltr">{{ depositCardNumber }}</span>
|
|
|
|
|
<BasicIcon
|
|
|
|
|
icon="vuesax-linear:copy"
|
|
|
|
|
size="18"
|
|
|
|
|
color="#15803d"
|
|
|
|
|
class="deposit-guide__copy-icon"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-09-02 08:26:52 -04:00
|
|
|
<div v-if="hasDepositAccountNumberValue" class="deposit-guide__account-row">
|
|
|
|
|
<span class="deposit-guide__account-label">{{ depositAccountNumberLabel }}</span>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="deposit-guide__account-value"
|
|
|
|
|
:aria-label="`کپی ${depositAccountNumberLabel}`"
|
|
|
|
|
@click="copyDepositAccountNumber"
|
|
|
|
|
>
|
|
|
|
|
<span class="deposit-guide__account-text" dir="ltr">{{ depositAccountNumber }}</span>
|
|
|
|
|
<BasicIcon
|
|
|
|
|
icon="vuesax-linear:copy"
|
|
|
|
|
size="18"
|
|
|
|
|
color="#15803d"
|
|
|
|
|
class="deposit-guide__copy-icon"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="hasDepositShebaValue" class="deposit-guide__account-row">
|
2026-07-23 14:10:40 +02:00
|
|
|
<span class="deposit-guide__account-label">{{ depositShebaLabel }}</span>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="deposit-guide__account-value"
|
|
|
|
|
:aria-label="`کپی ${depositShebaLabel}`"
|
|
|
|
|
@click="copyDepositShebaNumber"
|
|
|
|
|
>
|
|
|
|
|
<span class="deposit-guide__account-text" dir="ltr">{{ depositSheba }}</span>
|
|
|
|
|
<BasicIcon
|
|
|
|
|
icon="vuesax-linear:copy"
|
|
|
|
|
size="18"
|
|
|
|
|
color="#15803d"
|
|
|
|
|
class="deposit-guide__copy-icon"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a
|
|
|
|
|
v-if="hasMessengerLink"
|
|
|
|
|
ref="supportMessengerTriggerEl"
|
|
|
|
|
class="deposit-guide__support-link"
|
|
|
|
|
href="#"
|
|
|
|
|
@click.prevent="onDepositSupportClick"
|
|
|
|
|
>
|
2026-06-16 19:47:28 +03:30
|
|
|
<span class="deposit-guide__support-btn">
|
|
|
|
|
<BasicIcon icon="vuesax-linear:headphone" size="18" color="#16a34a" />
|
|
|
|
|
<span>پیام به پشتیبانی</span>
|
|
|
|
|
</span>
|
2026-07-23 14:10:40 +02:00
|
|
|
</a>
|
2026-06-16 19:47:28 +03:30
|
|
|
|
2026-07-23 14:10:40 +02:00
|
|
|
<a
|
|
|
|
|
v-if="smsLink"
|
|
|
|
|
class="deposit-guide__support-link"
|
|
|
|
|
:class="{ 'deposit-guide__support-link--spaced': hasMessengerLink }"
|
|
|
|
|
:href="smsLink"
|
|
|
|
|
>
|
2026-06-16 19:47:28 +03:30
|
|
|
<span class="deposit-guide__support-btn">
|
|
|
|
|
<BasicIcon icon="vuesax-linear:direct-inbox" size="18" color="#16a34a" />
|
|
|
|
|
<span>پیام به پشتیبانی (sms)</span>
|
|
|
|
|
</span>
|
2026-07-23 14:10:40 +02:00
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-06-16 19:47:28 +03:30
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
<BasicButton type="primary" class="deposit-guide__confirm w-full" @click="localVisible = false">
|
|
|
|
|
متوجه شدم
|
|
|
|
|
</BasicButton>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicModal>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2026-07-23 14:10:40 +02:00
|
|
|
import { computed, ref, watch } from 'vue'
|
2026-06-16 19:47:28 +03:30
|
|
|
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
|
|
|
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
|
|
|
|
import BasicModal from '@/components/BasicPacks/BasicModal.vue'
|
2026-07-23 14:10:40 +02:00
|
|
|
import { useSupportMessenger } from '@/composables/useSupportMessenger'
|
|
|
|
|
import { loadSupportMessengerFromSettings } from '@/utils/supportMessenger'
|
2026-06-16 19:47:28 +03:30
|
|
|
|
|
|
|
|
const props = withDefaults(
|
|
|
|
|
defineProps<{
|
|
|
|
|
visible: boolean
|
|
|
|
|
title?: string
|
|
|
|
|
supportLink?: string
|
|
|
|
|
smsLink?: string
|
|
|
|
|
}>(),
|
|
|
|
|
{
|
|
|
|
|
title: 'راهنمای شارژ حساب',
|
|
|
|
|
supportLink: '',
|
|
|
|
|
smsLink: '',
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|
2026-07-23 14:10:40 +02:00
|
|
|
const {
|
|
|
|
|
depositCardNumber,
|
2026-09-02 08:26:52 -04:00
|
|
|
depositAccountNumber,
|
2026-07-23 14:10:40 +02:00
|
|
|
depositSheba,
|
|
|
|
|
depositCardLabel,
|
2026-09-02 08:26:52 -04:00
|
|
|
depositAccountNumberLabel,
|
2026-07-23 14:10:40 +02:00
|
|
|
depositShebaLabel,
|
|
|
|
|
hasDepositCardValue,
|
2026-09-02 08:26:52 -04:00
|
|
|
hasDepositAccountNumberValue,
|
2026-07-23 14:10:40 +02:00
|
|
|
hasDepositShebaValue,
|
|
|
|
|
copyDepositCardNumber,
|
2026-09-02 08:26:52 -04:00
|
|
|
copyDepositAccountNumber,
|
2026-07-23 14:10:40 +02:00
|
|
|
copyDepositShebaNumber,
|
|
|
|
|
hasMessengerLink,
|
|
|
|
|
openDepositSupportMessenger,
|
|
|
|
|
} = useSupportMessenger()
|
|
|
|
|
|
|
|
|
|
const supportMessengerTriggerEl = ref<HTMLElement | null>(null)
|
|
|
|
|
|
|
|
|
|
function onDepositSupportClick() {
|
|
|
|
|
void openDepositSupportMessenger(supportMessengerTriggerEl.value)
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-16 19:47:28 +03:30
|
|
|
const emit = defineEmits<{
|
|
|
|
|
'update:visible': [value: boolean]
|
|
|
|
|
}>()
|
|
|
|
|
|
|
|
|
|
const localVisible = computed({
|
|
|
|
|
get: () => props.visible,
|
|
|
|
|
set: (value: boolean) => emit('update:visible', value),
|
|
|
|
|
})
|
2026-07-23 14:10:40 +02:00
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => props.visible,
|
|
|
|
|
(visible) => {
|
|
|
|
|
if (visible) {
|
|
|
|
|
void loadSupportMessengerFromSettings(true)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
)
|
2026-06-16 19:47:28 +03:30
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
|
|
.deposit-guide {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 0.25rem 0.5rem 0.5rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__icon-wrap {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
width: 4.5rem;
|
|
|
|
|
height: 4.5rem;
|
|
|
|
|
border-radius: 9999px;
|
|
|
|
|
background: #ecfdf3;
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__title {
|
|
|
|
|
margin: 0 0 0.75rem;
|
|
|
|
|
font-size: 1.05rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: #111827;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__body {
|
|
|
|
|
width: 100%;
|
|
|
|
|
font-size: 0.92rem;
|
|
|
|
|
line-height: 1.9;
|
|
|
|
|
color: #4b5563;
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-23 14:10:40 +02:00
|
|
|
.deposit-guide__accounts {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 0.75rem;
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-top: 0.85rem;
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__account-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 0.35rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__account-label {
|
|
|
|
|
font-size: 0.78rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: #6b7280;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__account-value {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
gap: 0.75rem;
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-height: 2.75rem;
|
|
|
|
|
padding: 0.65rem 0.85rem;
|
|
|
|
|
border: 1px solid #bbf7d0;
|
|
|
|
|
border-radius: 0.75rem;
|
|
|
|
|
background: #f0fdf4;
|
|
|
|
|
color: #111827;
|
|
|
|
|
font-size: 0.88rem;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background 0.15s ease, border-color 0.15s ease;
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
|
|
&:hover:not(.deposit-guide__account-value--empty) {
|
|
|
|
|
background: #dcfce7;
|
|
|
|
|
border-color: #86efac;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--empty {
|
|
|
|
|
color: #9ca3af;
|
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__account-text {
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__copy-icon {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
|
|
|
|
&--disabled {
|
|
|
|
|
opacity: 0.45;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-16 19:47:28 +03:30
|
|
|
.deposit-guide__support-link {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-top: 1.25rem;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
|
|
&--spaced {
|
|
|
|
|
margin-top: 0.65rem;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__support-btn {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
gap: 0.5rem;
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-height: 2.75rem;
|
|
|
|
|
padding: 0.65rem 1rem;
|
|
|
|
|
border: 1px solid #bbf7d0;
|
|
|
|
|
border-radius: 0.75rem;
|
|
|
|
|
background: #f0fdf4;
|
|
|
|
|
color: #15803d;
|
|
|
|
|
font-size: 0.92rem;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deposit-guide__confirm {
|
|
|
|
|
min-height: 2.75rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
|
.deposit-guide-modal-wrap {
|
|
|
|
|
.ant-modal-content {
|
|
|
|
|
border-radius: 1rem;
|
|
|
|
|
padding-top: 1rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ant-modal-header {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ant-modal-footer {
|
|
|
|
|
border-top: none;
|
|
|
|
|
padding-top: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|