This commit is contained in:
2025-12-21 18:22:45 +03:30
parent 7fc6918ded
commit b246689671
2 changed files with 14 additions and 7 deletions
+12 -5
View File
@@ -44,7 +44,7 @@ import {
lastPrice,
stopPriceInterval
} from '@/utils/price'
import { loading } from '@/utils'
import { loading, getToken } from '@/utils'
import { Price } from '@/models/home'
import type { Product } from '@/models/products'
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
@@ -52,16 +52,23 @@ import indexGold from '@/views/base/gold/index.vue'
import DealProduct from '@/views/base/products/components/DealProduct.vue'
import { cloneDeep } from 'lodash'
import img from "@/assets/img/user_ly1.svg";
import { message } from 'ant-design-vue'
const activekey = ref('آبشده')
const showFilter = ref()
const selectedProduct = ref<Product>()
function clickProduct(item: Product) {
if(item?.show){
showFilter.value = true
selectedProduct.value = cloneDeep(item)
}
if(item?.show){
// Check if user is logged in
if (!getToken()) {
message.warning('برای خرید یا فروش محصولات، لطفا ابتدا وارد حساب کاربری خود شوید')
router.push({ name: 'login' })
return
}
showFilter.value = true
selectedProduct.value = cloneDeep(item)
}
}
function changeTab() {