diff --git a/.cursor/skills/abshode-domain-lookup/learned-notes.md b/.cursor/skills/abshode-domain-lookup/learned-notes.md index f0db15f..ffed5ad 100644 --- a/.cursor/skills/abshode-domain-lookup/learned-notes.md +++ b/.cursor/skills/abshode-domain-lookup/learned-notes.md @@ -3,6 +3,7 @@ فرمت هر خط: - YYYY-MM-DD | موضوع | مسیر فایل(ها) | نکتهٔ ۱ خطی +- 2026-10-25 | انتخاب روش واریز | `WalletDepositMethodModal.vue` بعد از دکمهٔ واحد واریز | آنی = `INSTANT_DEPOSIT_PAYMENT_URL`؛ حساب = مودال کارت/شبا - 2026-10-22 | addon اینپوت | `assets/css/main.less` | پس‌زمینه addon = secondary تم، نه primary (سبز tenant) - 2026-10-21 | نمودار خانه = لندینگ | `LandingLiveChartMain.vue` + `useLandingLiveChart` + `zaarboxPriceHistory`؛ جایگزین `PriceChart` در PriceChartSection/DesktopChart* | همان `dlanding-live__main` SVG؛ داده از zaarbox + `/api/price/last` - 2026-10-20 | ظاهر خرید اقساطی | `views/base/installment/InstallmentPanel.vue` | دسکتاپ کلاس‌های `dgift` مثل کارت هدیه؛ موبایل کارت `rounded-xl` و توضیح بالای فرم diff --git a/src/utils/config.ts b/src/utils/config.ts index 7a96dc6..6ee97fe 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -35,6 +35,13 @@ export function isBazretalaProject() { const WALLET_DEPOSIT_QUICK_AMOUNTS_RIAL = [10_000_000, 50_000_000, 100_000_000] as const +/** آدرس صفحهٔ پرداخت آنی واریز. خالی بماند تا لینک درگاه آماده شود. */ +export const INSTANT_DEPOSIT_PAYMENT_URL = '' + +export function getInstantDepositPaymentUrl(): string { + return INSTANT_DEPOSIT_PAYMENT_URL.trim() +} + export function getWalletDepositQuickAmountsRial(): readonly number[] { return WALLET_DEPOSIT_QUICK_AMOUNTS_RIAL } diff --git a/src/views/base/wallet/components/WalletDepositMethodModal.vue b/src/views/base/wallet/components/WalletDepositMethodModal.vue new file mode 100644 index 0000000..74d447a --- /dev/null +++ b/src/views/base/wallet/components/WalletDepositMethodModal.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/src/views/base/wallet/composables/useWalletPage.ts b/src/views/base/wallet/composables/useWalletPage.ts index 817aad1..dc82104 100644 --- a/src/views/base/wallet/composables/useWalletPage.ts +++ b/src/views/base/wallet/composables/useWalletPage.ts @@ -14,6 +14,7 @@ import { useUserStore } from '@/store/userStore' import { isCustomerIdentityVerified } from '@/utils/customerIdentity' import { useConfigStore } from '@/store/configStore' import { + getInstantDepositPaymentUrl, getWalletDepositQuickAmountsRial, } from '@/utils/config' import { useDesktopBreakpoint } from '@/layouts/composables/useAppLayout' @@ -35,6 +36,7 @@ export interface WalletPageContext { config: ReturnType showAddCard: Ref chargeAccountModal: Ref + depositMethodVisible: Ref showConfirmCode: Ref withdrawInfModal: Ref infoVisible: Ref @@ -63,6 +65,9 @@ export interface WalletPageContext { formatter: (value: number) => string percentChange: (val: number) => void ok: () => Promise + openInstantDepositPayment: () => void + chooseInstantDeposit: () => void + chooseAccountDeposit: () => void addCard: () => Promise getCards: () => Promise handleOnComplete: (value: string) => Promise @@ -84,6 +89,7 @@ export function useWalletPage() { } = useSupportMessenger() const showAddCard = ref(false) const chargeAccountModal = ref(false) + const depositMethodVisible = ref(false) const showConfirmCode = ref(false) const withdrawInfModal = ref(false) const identityRequiredVisible = ref(false) @@ -198,6 +204,25 @@ export function useWalletPage() { else form.value.value = undefined } + function openInstantDepositPayment() { + const url = getInstantDepositPaymentUrl() + if (!url) { + message.info('لینک پرداخت آنی هنوز تنظیم نشده است') + return + } + window.location.assign(url) + } + + function chooseInstantDeposit() { + depositMethodVisible.value = false + openInstantDepositPayment() + } + + function chooseAccountDeposit() { + depositMethodVisible.value = false + chargeAccountModal.value = true + } + async function ok() { if (!ensureIdentity()) return try { @@ -208,7 +233,7 @@ export function useWalletPage() { showConfirmCode.value = true } if (isDeposit.value) { - chargeAccountModal.value = true + depositMethodVisible.value = true } } else { message.error('ابتدا مبلغ را وارد کنید') @@ -279,6 +304,7 @@ export function useWalletPage() { config, showAddCard, chargeAccountModal, + depositMethodVisible, showConfirmCode, withdrawInfModal, infoVisible, @@ -307,6 +333,9 @@ export function useWalletPage() { formatter, percentChange, ok, + openInstantDepositPayment, + chooseInstantDeposit, + chooseAccountDeposit, addCard, getCards, handleOnComplete, diff --git a/src/views/base/wallet/index.vue b/src/views/base/wallet/index.vue index 0cfeb1c..7afe707 100644 --- a/src/views/base/wallet/index.vue +++ b/src/views/base/wallet/index.vue @@ -80,6 +80,12 @@ + +