28/7/1404
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class=" mt-20">
|
||||
|
||||
<div class="flex gap-7 overflow-x-scroll px-5">
|
||||
<ProductInventory v-for="item in productInventorys" :ProductItem="item" class="shadow-lg my-5" :key="item.id"></ProductInventory>
|
||||
</div>
|
||||
@@ -18,6 +17,18 @@
|
||||
{{ usePriceWithoutType(limitedPrice.value as number ?? 0) }} ریال می باشد.
|
||||
</div>
|
||||
|
||||
<div class="px-2 py-8 rounded-lg border-1 text-center border-tertiary">
|
||||
<div>{{ userStore?.userInfo?.virtual_card_number ?? 'شماره کارتی موجود نمی باشد.' }}</div>
|
||||
<div class="flex justify-center">
|
||||
<div>دارایی طلایی :</div>
|
||||
<div>{{ (userStore?.userInfo?.wallet?.count_gold ?? 0).toFixed(3)}}گرم</div>
|
||||
</div>
|
||||
<div class="flex justify-center">
|
||||
<div>دارایی ریالی :</div>
|
||||
<div>{{ (userStore?.userInfo?.wallet?.count_gold ?? 0).toFixed(3)}}ریال</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="bg-white">
|
||||
<MySlider v-if="cardItems.length > 0" :items="cardItems" class=" pb-[20vh] "
|
||||
style="touch-action: none" />
|
||||
@@ -43,7 +54,7 @@
|
||||
<div
|
||||
class="text-center w-full flex-flex-col items-center home_appear_fade_in_up"
|
||||
style="text-align: -webkit-center"
|
||||
@click="router.push({ name: 'buyProduct' })"
|
||||
@click="router.push({ name: 'gold' })"
|
||||
>
|
||||
<div
|
||||
class="rounded-full w-[50px] h-[50px] bg-primary flex items-center justify-center"
|
||||
@@ -84,22 +95,22 @@
|
||||
<div
|
||||
class="text-center w-full flex-flex-col items-center home_appear_fade_in_down"
|
||||
style="text-align: -webkit-center"
|
||||
@click="router.push({ name: 'fund' })"
|
||||
@click="router.push({ name: 'earnMoney' })"
|
||||
>
|
||||
<div
|
||||
class="rounded-full w-[50px] h-[50px] bg-primary flex items-center justify-center"
|
||||
style=" border: solid 1px #20514b"
|
||||
|
||||
>
|
||||
<Icon class="text-tertiary font-bold" icon="vuesax-linear:cup" />
|
||||
<Icon class="text-tertiary font-bold" icon="vuesax-linear:dollar-circle" />
|
||||
</div>
|
||||
<div class="text-primary">دارایی ها</div>
|
||||
<div class="text-primary">کسب درآمد</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <ADivider></ADivider>-->
|
||||
<div>
|
||||
<!-- <div @click="router.push({ name: 'fund' })">-->
|
||||
<!-- <div>
|
||||
<!– <div @click="router.push({ name: 'fund' })">–>
|
||||
<div class="bg-primary rounded-lg p-2 py-6 mt-2">
|
||||
<div class="flex justify-center text-tertiary w-full z-20">
|
||||
محصولات:
|
||||
@@ -116,11 +127,11 @@
|
||||
<BasicIcon @click="openRialModal" icon="vuesax-linear:info-circle" size="18" color="orange" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="flex justify-center mt-2 w-full z-20">
|
||||
<!– <div class="flex justify-center mt-2 w-full z-20">
|
||||
دارایی ریالی:
|
||||
<div class="text-l mr-4 font-bold">{{ usePriceWithoutType(walletStore.walletInfo?.count_cash ?? 0) }}ریال</div>
|
||||
</div>-->
|
||||
<!-- <div class="flex justify-center mt-2 w-full z-20">
|
||||
</div>–>
|
||||
<!– <div class="flex justify-center mt-2 w-full z-20">
|
||||
<BasicInfoItem
|
||||
title="دارایی ریالی"
|
||||
is-line
|
||||
@@ -128,8 +139,8 @@
|
||||
infoHead="مجموع کل دارایی ریالی"
|
||||
:value="usePriceWithoutType(walletStore.walletInfo?.count_cash ?? 0) + ' ریال'"
|
||||
/>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>–>
|
||||
</div>-->
|
||||
<!-- <div class="flex justify-between">
|
||||
<div class="text-center font-bold">دارایی شما</div>
|
||||
<div class="flex items-center gap-2 mr-4">
|
||||
@@ -214,6 +225,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<swiper
|
||||
:slides-per-view="1.5"
|
||||
:space-between="5"
|
||||
>
|
||||
<swiper-slide><img class="p-2 img rounded-lg" :src="img" /></swiper-slide>
|
||||
<swiper-slide><img class="p-2 img rounded-lg" :src="img" /></swiper-slide>
|
||||
</swiper>
|
||||
|
||||
|
||||
<div class="flex mt-5 gap-1 bg-primary text-[#CEA34C] font-bold justify-center rounded-lg py-5"
|
||||
@click="router.push({ name: 'buyProduct', query: { cat: 'coin'} })">
|
||||
<div>خرید و فروش</div>
|
||||
@@ -409,29 +430,45 @@
|
||||
</div>
|
||||
</div>
|
||||
</BasicActionSheet>
|
||||
<BasicModal
|
||||
v-model:visible="openModal"
|
||||
custom-footer
|
||||
:closable="true"
|
||||
>
|
||||
<div class="text-center">
|
||||
<div class="mt-2">
|
||||
<div>با دعوت دوستان خود به قطره، هم به آنها تجربهای ارزشمند هدیه بدهید و هم خودتان طلا دریافت کنید.</div>
|
||||
<div>همین حالا کلیک کنید و پاداش بگیرید!</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<a-button type="primary" class="w-full" @click="closeModal">
|
||||
کسب درآمد
|
||||
</a-button>
|
||||
</template>
|
||||
</BasicModal>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="tsx" setup>
|
||||
import img from '@/assets/img/home_ly1.svg'
|
||||
import img1 from '@/assets/img/home_ly2.svg'
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||
import 'swiper/swiper-bundle.css';
|
||||
import img from '@/assets/img/ghatreLogo.png'
|
||||
import Icon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import { usePrice, usePriceWithoutType, useTowDecimal } from '../../../utils/usePrice'
|
||||
import {computed, createVNode, onMounted, onUnmounted, ref, watch, watchEffect} from 'vue'
|
||||
import {computed, createVNode, onMounted, onUnmounted, ref, watch} from 'vue'
|
||||
import router from '@/router'
|
||||
import * as echarts from 'echarts'
|
||||
|
||||
import { useIntersectionObserver, useWindowScroll } from '@vueuse/core'
|
||||
import { loading, removeToken } from '@/utils'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import { useWalletStore } from '@/store/walletStore'
|
||||
import DialogVant from '@/components/DialogVant.vue'
|
||||
import type { Price } from '@/models/home'
|
||||
import { getAllPrices, getChart, getLastPrice, getPrice } from '@/api/home'
|
||||
// import odometer from 'odometer/odometer'
|
||||
import { getAllPrices, getChart } from '@/api/home'
|
||||
import Vue3Odometer from 'vue3-odometer'
|
||||
import 'odometer/themes/odometer-theme-default.css'
|
||||
import HomeSkeleton from '@/views/base/home/components/HomeSkeleton.vue'
|
||||
import { toJalaliNotime } from '@/utils/useDateTime'
|
||||
import {
|
||||
getLastPrices,
|
||||
getUpPrice,
|
||||
@@ -444,28 +481,21 @@ import {
|
||||
import { DotLottieVue } from '@lottiefiles/dotlottie-vue'
|
||||
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
|
||||
import BasicInfoItem from '@/components/BasicPacks/BasicInfoItem.vue'
|
||||
import MySlider from '@/views/base/wallet/components/mySlider/MySlider.vue'
|
||||
import type { Card, PWallet, Wallet } from '@/models/wallet'
|
||||
import { getActivatedCards } from '@/api/wallet'
|
||||
import banner1 from '@/assets/img/banner/banner1.png'
|
||||
import banner2 from '@/assets/img/banner/banner2.png'
|
||||
import image from '@/assets/img/image.svg'
|
||||
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import ProductInventory from '@/views/base/home/components/ProductInventory.vue'
|
||||
import type { PInventory, Product } from '@/models/products'
|
||||
import { getProductInventory } from '@/api/products'
|
||||
import type { Fund } from '@/models/fund'
|
||||
import type { TableOutput } from '@/models/table'
|
||||
import { useFundUserStore } from '@/store/fundStore'
|
||||
import {Modal} from "ant-design-vue";
|
||||
import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
|
||||
import {message} from "ant-design-vue/es";
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
import BasicModal from '@/components/BasicPacks/BasicModal.vue'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const walletStore = useWalletStore()
|
||||
const chartLoading = ref<boolean>(false)
|
||||
const openModal = ref<boolean>(false)
|
||||
const wholeBalanceVisible = ref<boolean>(false)
|
||||
const { x, y } = useWindowScroll()
|
||||
const series = ref<Chart[]>([{ data: [] }])
|
||||
@@ -799,6 +829,12 @@ async function initProductInventory() {
|
||||
}
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
openModal.value = false
|
||||
localStorage.setItem('hasSeenIntroModal', 'true')
|
||||
router.push({ name: 'earnMoney' })
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
loading.value = true
|
||||
@@ -808,6 +844,10 @@ onMounted(async () => {
|
||||
await initPrice()
|
||||
await fetchPrices()
|
||||
update()
|
||||
const hasSeenModal = localStorage.getItem('hasSeenIntroModal')
|
||||
if (!hasSeenModal) {
|
||||
openModal.value = true
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user