Merge remote-tracking branch 'getorigin/modular' into modular
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import useAxios from '@/utils/useAxios'
|
import useAxios from '@/utils/useAxios'
|
||||||
import type { Card, Wallet } from '@/models/wallet'
|
import type { Card, Wallet, WithdrawConfirm } from '@/models/wallet'
|
||||||
import type {Transaction} from '@/models/transaction'
|
import type {Transaction} from '@/models/transaction'
|
||||||
import type {Address} from "@/models/address";
|
import type {Address} from "@/models/address";
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,14 @@ export interface Test {
|
|||||||
percentWallet: number
|
percentWallet: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface WithdrawConfirm {
|
||||||
|
account_number?: string
|
||||||
|
bank_name?: string
|
||||||
|
birth_date?: string
|
||||||
|
cart_number?: string
|
||||||
|
shaba_number?: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface Card {
|
export interface Card {
|
||||||
id?: number
|
id?: number
|
||||||
birth_date: number
|
birth_date: number
|
||||||
|
|||||||
+160
-159
@@ -3,65 +3,66 @@
|
|||||||
<div class="absolute inset-0 bg-cover bg-center opacity-60" :style="{ backgroundImage: `url(${img})` }"></div>
|
<div class="absolute inset-0 bg-cover bg-center opacity-60" :style="{ backgroundImage: `url(${img})` }"></div>
|
||||||
<div class="bg-white py-3 px-3 text-primary font-bold drop-shadow z-[1999] wrap-fix">کیف پول</div>
|
<div class="bg-white py-3 px-3 text-primary font-bold drop-shadow z-[1999] wrap-fix">کیف پول</div>
|
||||||
<div
|
<div
|
||||||
class="bg-white wrap-fix py-3 top-11 px-3 text-primary font-bold flex justify-evenly z-[1999]"
|
class="bg-white wrap-fix py-3 top-11 px-3 text-primary font-bold flex justify-evenly z-[1999]"
|
||||||
>
|
>
|
||||||
<div class="flex justify-evenly w-full px-2 h-11 items-center bg-gray-50 relative rounded">
|
<div class="flex justify-evenly w-full px-2 h-11 items-center bg-gray-50 relative rounded">
|
||||||
<div
|
<div
|
||||||
:class="isDeposit ? 'text-primary' : 'text-gray-400'"
|
:class="isDeposit ? 'text-primary' : 'text-gray-400'"
|
||||||
class="w-full text-center z-2"
|
class="w-full text-center z-2"
|
||||||
@click="setIsDeposit(true)"
|
@click="setIsDeposit(true)"
|
||||||
>
|
>
|
||||||
واریز
|
واریز
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="!isDeposit ? 'text-primary' : 'text-gray-400'"
|
:class="!isDeposit ? 'text-primary' : 'text-gray-400'"
|
||||||
class="w-full text-center z-2"
|
class="w-full text-center z-2"
|
||||||
@click="setIsDeposit(false)"
|
@click="setIsDeposit(false)"
|
||||||
>
|
>
|
||||||
برداشت
|
برداشت
|
||||||
</div>
|
</div>
|
||||||
<!-- <div ref="bganim" class="absolute bg-white h-8 w-1/2 rounded-lg " :style="`transform: translateX(${isDeposit? '0':'-100%'}); left: ${isDeposit? '0':'100%'}`"></div>-->
|
<!-- <div ref="bganim" class="absolute bg-white h-8 w-1/2 rounded-lg " :style="`transform: translateX(${isDeposit? '0':'-100%'}); left: ${isDeposit? '0':'100%'}`"></div>-->
|
||||||
<div
|
<div
|
||||||
ref="bganim"
|
ref="bganim"
|
||||||
:style="useStyle()"
|
:style="useStyle()"
|
||||||
class="absolute bg-white h-8 w-1/2 rounded-lg animate right"
|
class="absolute bg-white h-8 w-1/2 rounded-lg animate right"
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-5 pt-26 pb-2">
|
<div class="px-5 pt-26 pb-2">
|
||||||
<a-form :model="form" class="!mt-5" name="basic" @finish="ok()">
|
<a-form :model="form" class="!mt-5" name="basic" @finish="ok()">
|
||||||
<div class="border-gray-200 border-1 rounded-xl p-5 trans h-40 relative">
|
<div class="border-gray-200 border-1 rounded-xl p-5 trans h-40 relative">
|
||||||
<bg_main/>
|
<bg_main />
|
||||||
<div class="z-100 relative">
|
<div class="z-100 relative">
|
||||||
<a-form-item :rules="[required()]">
|
<a-form-item :rules="[required()]">
|
||||||
<BasicInput
|
<BasicInput
|
||||||
v-model:value="form.value"
|
v-model:value="form.value"
|
||||||
addon-before="ریال"
|
addon-before="ریال"
|
||||||
:addon-bg-color="useConfigStore().config.color"
|
:addon-bg-color="useConfigStore().config.color"
|
||||||
addon-text-color="white"
|
addon-text-color="white"
|
||||||
place-holder="مبلغ"
|
place-holder="مبلغ"
|
||||||
size="large"
|
size="large"
|
||||||
type="price"
|
type="price"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<Transition mode="out-in" name="fade">
|
<Transition mode="out-in" name="fade">
|
||||||
<div v-if="!isDeposit">
|
<div v-if="!isDeposit">
|
||||||
|
<div class="text-red text-xs font-bold mb-2">حداقل برداشت 100 هزار تومان می باشد.</div>
|
||||||
<div class="font-bold text-xs">
|
<div class="font-bold text-xs">
|
||||||
{{
|
{{
|
||||||
`موجودی کیف پول: ${usePriceWithoutType(
|
`موجودی کیف پول: ${usePriceWithoutType(
|
||||||
walletStore?.walletInfo?.cash ?? 0
|
walletStore?.walletInfo?.cash ?? 0
|
||||||
)} ریال`
|
)} ریال`
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<a-form-item v-if="walletStore?.walletInfo" class="!mt-3">
|
<a-form-item v-if="walletStore?.walletInfo" class="!mt-3">
|
||||||
<a-slider
|
<a-slider
|
||||||
v-model:value="form.percentWallet"
|
v-model:value="form.percentWallet"
|
||||||
:disabled="walletStore?.walletInfo?.cash <= 0"
|
:disabled="walletStore?.walletInfo?.cash <= 0"
|
||||||
:max="100"
|
:max="100"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="10"
|
:step="10"
|
||||||
:tip-formatter="formatter"
|
:tip-formatter="formatter"
|
||||||
@change="percentChange"
|
@change="percentChange"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -81,34 +82,34 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<BasicButton
|
<BasicButton
|
||||||
:disabled="disableButton"
|
:disabled="disableButton"
|
||||||
class="w-full py-2 mt-5"
|
class="w-full py-2 mt-5"
|
||||||
html-type="submit"
|
html-type="submit"
|
||||||
type="primary"
|
type="primary"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<a-spin v-if="loading" size="small"/>
|
<a-spin v-if="loading" size="small" />
|
||||||
<div v-else>{{ isDeposit ? 'واریز' : 'برداشت' }}</div>
|
<div v-else>{{ isDeposit ? 'واریز' : 'برداشت' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</BasicButton>
|
</BasicButton>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<div
|
<div
|
||||||
v-if="isDeposit"
|
v-if="isDeposit"
|
||||||
ref="el"
|
ref="el"
|
||||||
:class="loading ? 'h-screen' : ''"
|
:class="loading ? 'h-screen' : ''"
|
||||||
class="px-3 overflow-y-scroll w-full h-[49vh] pb-16"
|
class="px-3 overflow-y-scroll w-full h-[49vh] pb-16"
|
||||||
style="max-height: calc(100vh - 50px)"
|
style="max-height: calc(100vh - 50px)"
|
||||||
>
|
>
|
||||||
<list-anim v-if="!loading" :numberItemsAnim="4">
|
<list-anim v-if="!loading" :numberItemsAnim="4">
|
||||||
<Item
|
<Item
|
||||||
v-for="item in isDeposit ? depositItems : withdrawItems"
|
v-for="item in isDeposit ? depositItems : withdrawItems"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:item="item"
|
:item="item"
|
||||||
/>
|
/>
|
||||||
<TransactionSkeleton v-if="loadingMore" class="mt-1 mb-8"/>
|
<TransactionSkeleton v-if="loadingMore" class="mt-1 mb-8" />
|
||||||
</list-anim>
|
</list-anim>
|
||||||
<TransactionSkeleton v-for="i in 13" v-else :key="i" class="mt-1"/>
|
<TransactionSkeleton v-for="i in 13" v-else :key="i" class="mt-1" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <Slider/>-->
|
<!-- <Slider/>-->
|
||||||
<Transition mode="out-in" name="fade">
|
<Transition mode="out-in" name="fade">
|
||||||
@@ -116,16 +117,16 @@
|
|||||||
<!-- <MySlider v-if="cardItems.length > 0" :items="cardItems" class="mt-[5vh] pb-[25vh] mb-[16vh]"
|
<!-- <MySlider v-if="cardItems.length > 0" :items="cardItems" class="mt-[5vh] pb-[25vh] mb-[16vh]"
|
||||||
style="touch-action: none"/>-->
|
style="touch-action: none"/>-->
|
||||||
<CardSlider
|
<CardSlider
|
||||||
v-if="cardItems.length > 0"
|
v-if="cardItems.length > 0"
|
||||||
:items="cardItems"
|
:items="cardItems"
|
||||||
v-model:id="form.card_id"
|
v-model:id="form.card_id"
|
||||||
class="card-slider-wrap mt-[2vh] px-3 fixed bottom-10 right-0 left-0"
|
class="card-slider-wrap mt-[2vh] px-3 fixed bottom-10 right-0 left-0"
|
||||||
style="touch-action: none"
|
style="touch-action: none"
|
||||||
@cardDeleted="getCards"
|
@cardDeleted="getCards"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-else-if="!loading && cardItems.length === 0"
|
v-else-if="!loading && cardItems.length === 0"
|
||||||
class="h-30 flex items-center justify-center"
|
class="h-30 flex items-center justify-center"
|
||||||
>
|
>
|
||||||
هیچ کارتی یافت نشد
|
هیچ کارتی یافت نشد
|
||||||
</div>
|
</div>
|
||||||
@@ -134,42 +135,42 @@
|
|||||||
</div>
|
</div>
|
||||||
<Transition mode="out-in" name="fade">
|
<Transition mode="out-in" name="fade">
|
||||||
<div
|
<div
|
||||||
v-if="!isDeposit"
|
v-if="!isDeposit"
|
||||||
class="add-card fixed bottom-0 h-[18vh] bg-[#FBFBFC] w-full shadow-lg rounded-3xl flex justify-center pt-3 z-200"
|
class="add-card fixed bottom-0 h-[18vh] bg-[#FBFBFC] w-full shadow-lg rounded-3xl flex justify-center pt-3 z-200"
|
||||||
style="box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 26px 11px"
|
style="box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 26px 11px"
|
||||||
@click="showAddCard = true"
|
@click="showAddCard = true"
|
||||||
>
|
>
|
||||||
<div>افزودن کارت جدید</div>
|
<div>افزودن کارت جدید</div>
|
||||||
<BasicIcon icon="vuesax-linear:add"/>
|
<BasicIcon icon="vuesax-linear:add" />
|
||||||
<BasicActionSheet v-model:show="showAddCard" class="!max-h-[95vh]">
|
<BasicActionSheet v-model:show="showAddCard" class="!max-h-[95vh]">
|
||||||
<div class="font-bold text-lg">افزودن کارت</div>
|
<div class="font-bold text-lg">افزودن کارت</div>
|
||||||
<div class="mt-4 text-red-600 font-bold">توجه : حتما شماره کارت صاحب حساب نرم افزار وارد شود.</div>
|
<div class="mt-4 text-red-600 font-bold">توجه : حتما شماره کارت صاحب حساب نرم افزار وارد شود.</div>
|
||||||
<div class="pb-20 mt-5">
|
<div class="pb-20 mt-5">
|
||||||
<a-form :model="cardForm">
|
<a-form :model="cardForm">
|
||||||
<a-form-item
|
<!-- <a-form-item
|
||||||
:rules="required()"
|
:rules="required()"
|
||||||
class="w-full gap-2 !flex-col"
|
class="w-full gap-2 !flex-col"
|
||||||
label="نام بانک"
|
label="نام بانک"
|
||||||
name="bank_name"
|
name="bank_name"
|
||||||
>
|
>
|
||||||
<BasicInput v-model:value="cardForm.bank_name"/>
|
<BasicInput v-model:value="cardForm.bank_name" />
|
||||||
|
</a-form-item>-->
|
||||||
|
<a-form-item
|
||||||
|
:rules="cardNumberValidation()"
|
||||||
|
class="w-full gap-2 !flex-col"
|
||||||
|
label="شماره کارت"
|
||||||
|
name="cart_number"
|
||||||
|
>
|
||||||
|
<BasicInput v-model:value="cardForm.cart_number" type="number" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- <a-form-item
|
<a-form-item
|
||||||
:rules="cardNumberValidation()"
|
|
||||||
class="w-full gap-2 !flex-col"
|
|
||||||
label="شماره کارت"
|
|
||||||
name="cart_number"
|
|
||||||
>
|
|
||||||
<BasicInput v-model:value="cardForm.cart_number" type="number" />
|
|
||||||
</a-form-item>-->
|
|
||||||
<!-- <a-form-item
|
|
||||||
v-if="walletStore.walletInfo"
|
v-if="walletStore.walletInfo"
|
||||||
class="w-full gap-2 !flex-col"
|
class="w-full gap-2 !flex-col"
|
||||||
label="تاریخ تولد"
|
label="تاریخ تولد"
|
||||||
name="cart_number"
|
name="cart_number"
|
||||||
>
|
>
|
||||||
<BaseDatePicker v-model:value="cardForm.birth_date" class="w-full" inputReadOnly/>
|
<BaseDatePicker v-model:value="cardForm.birth_date" class="w-full" inputReadOnly/>
|
||||||
</a-form-item>-->
|
</a-form-item>
|
||||||
<!-- <a-form-item
|
<!-- <a-form-item
|
||||||
:rules="required()"
|
:rules="required()"
|
||||||
class="w-full gap-2 !flex-col"
|
class="w-full gap-2 !flex-col"
|
||||||
@@ -178,21 +179,21 @@
|
|||||||
>
|
>
|
||||||
<BasicInput v-model:value="cardForm.account_number" type="number" />
|
<BasicInput v-model:value="cardForm.account_number" type="number" />
|
||||||
</a-form-item>-->
|
</a-form-item>-->
|
||||||
<a-form-item
|
<!-- <a-form-item
|
||||||
:rules="required()"
|
:rules="required()"
|
||||||
class="w-full gap-2 !flex-col"
|
class="w-full gap-2 !flex-col"
|
||||||
label="شماره شبا"
|
label="شماره شبا"
|
||||||
name="shaba_number"
|
name="shaba_number"
|
||||||
>
|
>
|
||||||
<BasicInput v-model:value="cardForm.shaba_number"/>
|
<BasicInput v-model:value="cardForm.shaba_number"/>
|
||||||
</a-form-item>
|
</a-form-item>-->
|
||||||
<BasicButton
|
<BasicButton
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
class="w-full mt-5 md:mt-10"
|
class="w-full mt-5 md:mt-10"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="addCard"
|
@click="addCard"
|
||||||
>
|
>
|
||||||
<a-spin v-if="loading" size="small"/>
|
<a-spin v-if="loading" size="small" />
|
||||||
<div v-else>ثبت</div>
|
<div v-else>ثبت</div>
|
||||||
</BasicButton>
|
</BasicButton>
|
||||||
<BasicButton class="w-full mt-2" @click="showAddCard = false">بازگشت</BasicButton>
|
<BasicButton class="w-full mt-2" @click="showAddCard = false">بازگشت</BasicButton>
|
||||||
@@ -206,26 +207,26 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<BasicIcon
|
<BasicIcon
|
||||||
@click="showConfirmCode = false"
|
@click="showConfirmCode = false"
|
||||||
icon="vuesax-linear:close-circle"
|
icon="vuesax-linear:close-circle"
|
||||||
size="30"
|
size="30"
|
||||||
class="text-red"
|
class="text-red"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-5 text-sm">لطفا کد ارسالی را وارد کنید.</div>
|
<div class="p-5 text-sm">لطفا کد ارسالی را وارد کنید.</div>
|
||||||
<div>
|
<div>
|
||||||
<OtpInput
|
<OtpInput
|
||||||
ref="refOtpInput"
|
ref="refOtpInput"
|
||||||
:is-input-num="true"
|
:is-input-num="true"
|
||||||
:num-inputs="4"
|
:num-inputs="4"
|
||||||
:should-auto-focus="true"
|
:should-auto-focus="true"
|
||||||
autocomplete="one-time-code"
|
autocomplete="one-time-code"
|
||||||
class="mt-5 justify-center"
|
class="mt-5 justify-center"
|
||||||
input-classes="otp-input"
|
input-classes="otp-input"
|
||||||
separator=""
|
separator=""
|
||||||
style="direction: ltr"
|
style="direction: ltr"
|
||||||
value=""
|
value=""
|
||||||
@on-complete="handleOnComplete"
|
@on-complete="handleOnComplete"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -239,7 +240,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</DialogVant>
|
</DialogVant>
|
||||||
<SkeletonLoading v-model:show="infoVisible"/>
|
<SkeletonLoading v-model:show="infoVisible" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<transaction mode="out-in" name="fade">
|
<transaction mode="out-in" name="fade">
|
||||||
@@ -290,9 +291,9 @@
|
|||||||
</transaction>
|
</transaction>
|
||||||
-->
|
-->
|
||||||
<BasicModal
|
<BasicModal
|
||||||
v-model:visible="chargeAccountModal"
|
v-model:visible="chargeAccountModal"
|
||||||
custom-footer
|
custom-footer
|
||||||
:closable="false"
|
:closable="false"
|
||||||
>
|
>
|
||||||
<div v-if="config.config.name === 'garoosi'" class="text-center">
|
<div v-if="config.config.name === 'garoosi'" class="text-center">
|
||||||
<div class=" font-bold text-red-600">مشتریان گرامی</div>
|
<div class=" font-bold text-red-600">مشتریان گرامی</div>
|
||||||
@@ -300,9 +301,9 @@
|
|||||||
<span>جهت شارژ حساب کاربری خود، مبلغ موردنظر را به شماره کارت زیر واریز نموده و از طریق لینک زیر به پشتیبان اطلاع دهید.</span>
|
<span>جهت شارژ حساب کاربری خود، مبلغ موردنظر را به شماره کارت زیر واریز نموده و از طریق لینک زیر به پشتیبان اطلاع دهید.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-1 text-red-600">در صورت عدم همخوانی کارت ملی و فیش واریزی کیف پول شارژ نمیشود!</div>
|
<div class="mt-1 text-red-600">در صورت عدم همخوانی کارت ملی و فیش واریزی کیف پول شارژ نمیشود!</div>
|
||||||
<div class="mt-4">(سیده زهرا موسوی)</div>
|
<div class="mt-4">(سیده زهرا موسوی)</div>
|
||||||
<div class="mt-1">شماره کارت:6037701900311389 </div>
|
<div class="mt-1">شماره کارت:6037701900311389</div>
|
||||||
<!-- <div>شماره حساب: 0233273609006</div>-->
|
<!-- <div>شماره حساب: 0233273609006</div>-->
|
||||||
<div>شماره شبا: IR 080160000000001143804581</div>
|
<div>شماره شبا: IR 080160000000001143804581</div>
|
||||||
<BasicButton class="mt-4">
|
<BasicButton class="mt-4">
|
||||||
@@ -332,9 +333,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
<BasicModal
|
<BasicModal
|
||||||
v-model:visible="withdrawInfModal"
|
v-model:visible="withdrawInfModal"
|
||||||
custom-footer
|
custom-footer
|
||||||
:closable="false"
|
:closable="false"
|
||||||
>
|
>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class=" font-bold text-red-600">مشتری گرامی</div>
|
<div class=" font-bold text-red-600">مشتری گرامی</div>
|
||||||
@@ -353,37 +354,37 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {computed, onMounted, ref} from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import {usePriceWithoutType} from '@/utils/usePrice'
|
import { usePriceWithoutType } from '@/utils/usePrice'
|
||||||
import {loading, loadingMore} from '@/utils'
|
import { loading, loadingMore } from '@/utils'
|
||||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||||
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import {useWalletStore} from '@/store/walletStore'
|
import { useWalletStore } from '@/store/walletStore'
|
||||||
import Bg_main from '@/components/bg_main.vue'
|
import Bg_main from '@/components/bg_main.vue'
|
||||||
import type {Transaction} from '@/models/transaction'
|
import type { Transaction } from '@/models/transaction'
|
||||||
import {createCard, deposit, getActivatedCards, withdraw, confirmCode} from '@/api/wallet'
|
import { createCard, deposit, getActivatedCards, withdraw, confirmCode } from '@/api/wallet'
|
||||||
import {useInfiniteScroll} from '@vueuse/core'
|
import { useInfiniteScroll } from '@vueuse/core'
|
||||||
import {message} from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import ListAnim from '@/components/ListAnim.vue'
|
import ListAnim from '@/components/ListAnim.vue'
|
||||||
import TransactionSkeleton from '@/components/TransactionSkeleton.vue'
|
import TransactionSkeleton from '@/components/TransactionSkeleton.vue'
|
||||||
import Item from './components/Item.vue'
|
import Item from './components/Item.vue'
|
||||||
import type {TableEngineInput, TableOutput} from '@/models/table'
|
import type { TableEngineInput, TableOutput } from '@/models/table'
|
||||||
import {getTransactionTable, getTransactionTable2} from '@/api/transaction'
|
import { getTransactionTable, getTransactionTable2 } from '@/api/transaction'
|
||||||
import BasicInput from '@/components/BasicPacks/BasicInput.vue'
|
import BasicInput from '@/components/BasicPacks/BasicInput.vue'
|
||||||
import CardSlider from './components/UISlider/index.vue'
|
import CardSlider from './components/UISlider/index.vue'
|
||||||
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
|
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
|
||||||
import type {Card} from '@/models/wallet'
|
import type { Card } from '@/models/wallet'
|
||||||
import {cardNumberValidation, required} from '@/utils/inputRules'
|
import { cardNumberValidation, required } from '@/utils/inputRules'
|
||||||
import {useUserStore} from '@/store/userStore'
|
import { useUserStore } from '@/store/userStore'
|
||||||
import {DotLottieVue} from '@lottiefiles/dotlottie-vue'
|
import { DotLottieVue } from '@lottiefiles/dotlottie-vue'
|
||||||
import OtpInput from 'vue3-otp-input'
|
import OtpInput from 'vue3-otp-input'
|
||||||
import DialogVant from '@/components/DialogVant.vue'
|
import DialogVant from '@/components/DialogVant.vue'
|
||||||
import SkeletonLoading from './components/SkeletonLoading.vue'
|
import SkeletonLoading from './components/SkeletonLoading.vue'
|
||||||
import BaseDatePicker from "@/components/BasicPacks/BaseDatePicker";
|
import BaseDatePicker from '@/components/BasicPacks/BaseDatePicker'
|
||||||
import img from "@/assets/img/user_ly1.svg";
|
import img from '@/assets/img/user_ly1.svg'
|
||||||
import BasicModal from "@/components/BasicPacks/BasicModal.vue";
|
import BasicModal from '@/components/BasicPacks/BasicModal.vue'
|
||||||
import {useConfigStore} from "@/store/configStore";
|
import { useConfigStore } from '@/store/configStore'
|
||||||
|
|
||||||
const isDeposit = ref<boolean>(true)
|
const isDeposit = ref<boolean>(true)
|
||||||
const walletStore = useWalletStore()
|
const walletStore = useWalletStore()
|
||||||
@@ -423,10 +424,10 @@ const disableButton = computed(() => {
|
|||||||
if (walletStore?.walletInfo?.cash && !isDeposit.value) {
|
if (walletStore?.walletInfo?.cash && !isDeposit.value) {
|
||||||
if (cardItems.value.length > 0) {
|
if (cardItems.value.length > 0) {
|
||||||
return (
|
return (
|
||||||
walletStore?.walletInfo?.cash <= 0 ||
|
walletStore?.walletInfo?.cash <= 0 ||
|
||||||
walletStore?.walletInfo?.cash < parseInt(form.value?.value) ||
|
walletStore?.walletInfo?.cash < parseInt(form.value?.value) ||
|
||||||
isNaN(parseInt(form.value?.value)) ||
|
isNaN(parseInt(form.value?.value)) ||
|
||||||
parseInt(form.value?.value) < 1000000
|
parseInt(form.value?.value) < 1000000
|
||||||
)
|
)
|
||||||
} else return true
|
} else return true
|
||||||
} else if (isDeposit.value) {
|
} else if (isDeposit.value) {
|
||||||
@@ -505,7 +506,7 @@ function setIsDeposit(val: boolean) {
|
|||||||
|
|
||||||
function useStyle() {
|
function useStyle() {
|
||||||
if (isDeposit.value) return 'right: 2%;'
|
if (isDeposit.value) return 'right: 2%;'
|
||||||
// if (isDeposit.value) return 'animation-direction: normal'
|
// if (isDeposit.value) return 'animation-direction: normal'
|
||||||
// else return 'animation-direction: reverse'
|
// else return 'animation-direction: reverse'
|
||||||
else return ' right: 98%; transform: translate(100%, 0);'
|
else return ' right: 98%; transform: translate(100%, 0);'
|
||||||
}
|
}
|
||||||
@@ -524,7 +525,7 @@ async function ok() {
|
|||||||
if (form.value.value !== undefined) {
|
if (form.value.value !== undefined) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
if (!isDeposit.value) {
|
if (!isDeposit.value) {
|
||||||
await confirmCode({value: form.value.value})
|
await confirmCode({ value: form.value.value })
|
||||||
showConfirmCode.value = await true
|
showConfirmCode.value = await true
|
||||||
}
|
}
|
||||||
if (isDeposit.value) {
|
if (isDeposit.value) {
|
||||||
@@ -589,34 +590,34 @@ onMounted(async () => {
|
|||||||
|
|
||||||
if (!userStore.isSingle) {
|
if (!userStore.isSingle) {
|
||||||
useInfiniteScroll(
|
useInfiniteScroll(
|
||||||
el,
|
el,
|
||||||
async () => {
|
async () => {
|
||||||
// load more
|
// load more
|
||||||
// if (!userStore.isSingle) {
|
// if (!userStore.isSingle) {
|
||||||
if (isDeposit.value) {
|
if (isDeposit.value) {
|
||||||
if (
|
if (
|
||||||
depositTableOutput.value &&
|
depositTableOutput.value &&
|
||||||
(depositPagination.value.page + 1) * depositPagination.value.limit <
|
(depositPagination.value.page + 1) * depositPagination.value.limit <
|
||||||
depositTableOutput.value.query.total
|
depositTableOutput.value.query.total
|
||||||
) {
|
) {
|
||||||
depositPagination.value.page++
|
depositPagination.value.page++
|
||||||
console.log('Updated Page:', depositPagination.value.page)
|
console.log('Updated Page:', depositPagination.value.page)
|
||||||
await initDepositTable()
|
await initDepositTable()
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (
|
|
||||||
withdrawTableOutput.value &&
|
|
||||||
(withdrawPagination.value.page + 1) * withdrawPagination.value.limit <
|
|
||||||
withdrawTableOutput.value.query.total
|
|
||||||
) {
|
|
||||||
// console.log('gfgf')
|
|
||||||
withdrawPagination.value.page++
|
|
||||||
await initWithdrawTable()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// }
|
} else {
|
||||||
},
|
if (
|
||||||
{distance: 12}
|
withdrawTableOutput.value &&
|
||||||
|
(withdrawPagination.value.page + 1) * withdrawPagination.value.limit <
|
||||||
|
withdrawTableOutput.value.query.total
|
||||||
|
) {
|
||||||
|
// console.log('gfgf')
|
||||||
|
withdrawPagination.value.page++
|
||||||
|
await initWithdrawTable()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
{ distance: 12 }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -652,7 +653,7 @@ async function handleOnComplete(value: string) {
|
|||||||
try {
|
try {
|
||||||
infoVisible.value = true
|
infoVisible.value = true
|
||||||
showConfirmCode.value = false
|
showConfirmCode.value = false
|
||||||
await withdraw({...form.value, otp: value})
|
await withdraw({ ...form.value, otp: value })
|
||||||
await walletStore.getMyWallet()
|
await walletStore.getMyWallet()
|
||||||
await message.success('عملیات با موفقیت انجام شد')
|
await message.success('عملیات با موفقیت انجام شد')
|
||||||
withdrawInfModal.value = true
|
withdrawInfModal.value = true
|
||||||
|
|||||||
Reference in New Issue
Block a user