From 354c5376b81c4d4cb1298443363d5cef98115352 Mon Sep 17 00:00:00 2001 From: MojtabaSoumi Date: Thu, 5 Feb 2026 11:22:48 +0330 Subject: [PATCH 1/6] 1404/11/16-change support link --- src/assets/img/rubika.webp | Bin 0 -> 7102 bytes src/views/base/about/index.vue | 8 ++++---- src/views/base/rules/index.vue | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 src/assets/img/rubika.webp diff --git a/src/assets/img/rubika.webp b/src/assets/img/rubika.webp new file mode 100644 index 0000000000000000000000000000000000000000..744caa6a66640ae165a514e913c763d3c61f7655 GIT binary patch literal 7102 zcmZ{pcRU0(=)BKzllR`4h1NfR}fGpD|d2-NMp}9kdD%0`veGKn<`sIQl~kOtek^ zYWq6``#T2sdH&`9%E>J7?^sj!-5k7~Lbv+NtyBowVz}bWv`-Cd{?q$^61kJJza#$2 zCBAVxLj3~pKC$DOGdKYHmmlDn-qFp$3C|XI7WTtCi09b9a@YT5#9xN|FW3ELKT~5( zyiPx!*Rd%mjZX#W!ZaA20^MfX4qvhvZ)!O+fQ+NdLwQ z-^Z8#;^6NhDe=|ep$T6!}4yf57{-A5}>I~**Aa#NC&?AFcveDH3GRgA@Fkm$%RiW=o6AwLt~dU#^EM`6TbH%PSDx1sGK zgS?!?x&6e&DPB%?l$lz_j{H?+Mp?GNx28=|(GAAttRD1}ZdbMQJozvt3(ZC=qb zg<*~eHcUKLl|~=j5mWvaNYilLA5nFzD2^=QDFcDUltXv?iE5O`i9SSmP;kkWU{EHk zq~bfzY7j>+*C{th!D3OJs)J<-)f$Dq@>5x*JIMEMm#Ez%_4J_=j(M!i=h!s^QE9}9 zfH-nl)qNAm8P7Kn!8q6|n+LfD&59KarP^N~uqWz@8po;N?p5&V-9u8nT_kY70vkYa zS$V9&^?W|zSCohoCUIm`AEkC<{}#%hl?rjfXd-+$7#80$iCJ5rPC#JkrRVj$?ZcXv zXqPV6-xSS)r-^8kUu>b8!=YQRUDe^8YG%Unf^tV1iKt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644 --- a/src/views/base/about/index.vue +++ b/src/views/base/about/index.vue @@ -66,12 +66,12 @@ - diff --git a/src/views/base/rules/index.vue b/src/views/base/rules/index.vue index 6f86462..57fdf4b 100644 --- a/src/views/base/rules/index.vue +++ b/src/views/base/rules/index.vue @@ -154,15 +154,15 @@ - From 2ffcee9f3a516b717d387c96a770e7970aa66429 Mon Sep 17 00:00:00 2001 From: MojtabaSoumi Date: Sat, 7 Feb 2026 12:13:25 +0330 Subject: [PATCH 2/6] 1404/11/18-delete required rule in referral code --- index.html | 6 +++--- src/views/login/components/Register.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index bf027e0..f5c5132 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@ right: 20px; width: 60px; height: 60px; - background-color: #25D366; + background-color: #ffffff; border-radius: 50%; display: flex; justify-content: center; @@ -42,8 +42,8 @@
- - + + diff --git a/src/views/login/components/Register.vue b/src/views/login/components/Register.vue index eea8160..8ecd6e7 100644 --- a/src/views/login/components/Register.vue +++ b/src/views/login/components/Register.vue @@ -18,7 +18,7 @@ - +
-
- -
صفحه اصلی
+ + + + +
+ +
فروشگاه
diff --git a/src/views/base/user/index.vue b/src/views/base/user/index.vue index 19083df..951406b 100644 --- a/src/views/base/user/index.vue +++ b/src/views/base/user/index.vue @@ -163,10 +163,49 @@
کسب درآمد
+ +
+ +
خروج از حساب کاربری
+
+
+ + + + + +
ویرایش اطلاعات
@@ -257,7 +296,7 @@ import { onMounted, reactive, ref, computed } from 'vue' import img from '@/assets/img/user_ly1.svg' import gr_bottom from './assets/img/gr_bottom_white.svg' -import { loading } from '@/utils' +import {loading, removeToken} from '@/utils' import BasicButton from '@/components/BasicPacks/BasicButton.vue' import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue' import { @@ -277,6 +316,11 @@ import { message } from 'ant-design-vue' import { updateMe, updatePass } from '@/api/me' import { useUserStore } from '@/store/userStore' import BaseDatePicker from '@/components/BasicPacks/BaseDatePicker' +import {DotLottieVue} from "@lottiefiles/dotlottie-vue"; +import DialogVant from "@/components/DialogVant.vue"; +import {useWalletStore} from "@/store/walletStore"; +import Icon from "@/components/BasicPacks/BasicIcon.vue"; +import {useWindowScroll} from "@vueuse/core/index"; const userFormState = ref({ fname: '', lname: '', @@ -291,11 +335,29 @@ const userPassForm = ref({ const formRef = ref() const formPassRef = ref() const userStore = useUserStore() +const showLogoutConfirm = ref() +const walletStore=useWalletStore() +const logoutLoading = ref(false) +const { x, y } = useWindowScroll() // const editPassVisible = ref(false) const editPassVisible = ref(false) const editPasswordVisible = ref(false) +async function logout() { + logoutLoading.value = true + // baseConfirm('آیا از حساب کاربری خارج می شوید؟',async () => { + userStore.userInfo = undefined + walletStore.walletInfo = undefined + /* userStore.$reset() + walletStore.$reset()*/ + removeToken() + await router.push({ name: 'login' }) + logoutLoading.value = true + window.location.reload() + // console.log('salam') + // }) +} function setForm() { userFormState.value = userStore.userInfo } diff --git a/src/views/login/components/Login.vue b/src/views/login/components/Login.vue index cbd8ae5..cc72b85 100644 --- a/src/views/login/components/Login.vue +++ b/src/views/login/components/Login.vue @@ -203,7 +203,7 @@ async function enterFingerPrint() { const fingerPrint = await authenticateWithFingerprint() if (fingerPrint) { setTruth() - await router.push({ name: 'home' }) + await router.push({ name: 'buyProduct' }) } else { message.error('خطا در اعتبارسنجی') } @@ -234,7 +234,7 @@ async function login(accessToken: string | undefined) { /* if (userStore.userInfo?.type === (URLUserType() === 'customer' ? 1 : 2)) {*/ await walletStore.getMyWallet() setTruth() - await router.push({ name: 'home' }) + await router.push({ name: 'buyProduct' }) /* } else { removeToken() userStore.removeInformation() diff --git a/src/views/login/components/PhoneVerify.vue b/src/views/login/components/PhoneVerify.vue index d2ab182..0914a2d 100644 --- a/src/views/login/components/PhoneVerify.vue +++ b/src/views/login/components/PhoneVerify.vue @@ -43,7 +43,7 @@ const userFormState = ref({ }) function phoneVerification() { - router.push({name: 'home' }) + router.push({name: 'buyProduct' }) } From c6c76350414ad1b2b0410c1dd3ffb2d6b5f63371 Mon Sep 17 00:00:00 2001 From: MojtabaSoumi Date: Sat, 7 Feb 2026 17:25:59 +0330 Subject: [PATCH 4/6] 1404/11/18-delete required rule in referral code & hidden home page --- src/views/base/index.vue | 42 +++++++++++----------- src/views/base/products/product/[id].vue | 18 ++++++++++ src/views/base/user/index.vue | 44 ++++++++++++------------ src/views/base/wallet/index.vue | 2 +- 4 files changed, 62 insertions(+), 44 deletions(-) diff --git a/src/views/base/index.vue b/src/views/base/index.vue index ee80b52..fa6378a 100644 --- a/src/views/base/index.vue +++ b/src/views/base/index.vue @@ -22,27 +22,27 @@
حساب کاربری
- -
- -
هشدار قیمت
-
-
- -
- -
انتقال قطره
-
-
- -
- -
دریافت طلای فیزیکی
-
-
+ + + + + + + + + + + + + + + + + + + + +
diff --git a/src/views/base/products/product/[id].vue b/src/views/base/products/product/[id].vue index 9006a11..14d2c66 100644 --- a/src/views/base/products/product/[id].vue +++ b/src/views/base/products/product/[id].vue @@ -172,6 +172,24 @@ async function loadProduct() { loading.value = false } } +watch(lastPrice, async () => { + // console.log(items); + if (lastPrice.value && product.value.similar) { + product.value.similar.forEach((val) => { + // console.log(lastPrice.value) + if (val.group_type == 'آبشده') { + val.price = lastPrice.value?.price_last + val.sellPrice = lastPrice.value?.sell + } else { + val.price = parseInt(val.amount * lastPrice.value?.price_last) + val.sellPrice = parseInt(val.amount * lastPrice.value?.sell) + + // console.log(lastPrice.value?.price_last + "*" + val.amount + ' ' + val.price) + } + }) + + } +}, { deep: true }) async function initPrice() { try { diff --git a/src/views/base/user/index.vue b/src/views/base/user/index.vue index 951406b..8ad47c7 100644 --- a/src/views/base/user/index.vue +++ b/src/views/base/user/index.vue @@ -93,16 +93,16 @@
آدرس ها
--> - -
- -
هشدار قیمت
-
-
+ + + + + + + + + + مجوز ها --> - -
- -
کسب درآمد
-
-
+ + + + + + + + + + + + جهت شارژ حساب کاربری خود، کلمه "شماره حساب" را برای پشتیبانی ارسال نمایید. - + پیام به پشتیبانی From 71312d809dd52f80e3110689fd6b75dccc3a8cbb Mon Sep 17 00:00:00 2001 From: MojtabaSoumi Date: Sun, 8 Feb 2026 13:37:10 +0330 Subject: [PATCH 5/6] 1404/11/19-change rule in input buy product --- src/utils/inputRules.ts | 44 +++++++++++++++++++ src/views/base/cart/index.vue | 10 ++--- .../base/products/components/DealProduct.vue | 18 ++++---- src/views/base/products/product/[id].vue | 2 +- 4 files changed, 59 insertions(+), 15 deletions(-) diff --git a/src/utils/inputRules.ts b/src/utils/inputRules.ts index 90abd41..19e1bdd 100644 --- a/src/utils/inputRules.ts +++ b/src/utils/inputRules.ts @@ -169,6 +169,39 @@ const checkNumber = async (_rule: Rule, value: number) => { return Promise.resolve() } +} +const checkNumber2 = async (_rule: Rule, value: number) => { + + + if (!value) { + return Promise.reject('تعداد محصول را مشخص کنید') + } + if (value % 1 !== 0) { + return Promise.reject('استفاده از اعداد اعشاری مجاز نمی باشد') + } + if (isBuyP) { + // Skip wallet balance check if gateway is enabled + if (!gatewayP && isToken()) { + // if (!walletCash?.walletInfo?.cash && methodP == 'cash') { + // return Promise.reject('موجودی کیف پول ناکافی است') + // } + // if (!walletCash?.walletInfo?.gold && methodP == 'gold') { + // return Promise.reject('موجودی کیف طلا ناکافی است') + // } + // if (priceP * value > walletCash?.walletInfo?.cash && methodP == 'cash') + // return Promise.reject('موجودی کیف پول ناکافی است') + // if (amountP * value > walletCash?.walletInfo?.gold && methodP == 'gold') + // return Promise.reject('موجودی کیف طلا ناکافی است') + } + return Promise.resolve() + } else { + if (value > NumP) + + return Promise.reject('موجودی محصول ناکافی است') + else + return Promise.resolve() + } + } export const justNumber2 = (price: number, method?: string, amount?: number, isBuy?: boolean, gateway?: boolean) => { priceP = price @@ -193,6 +226,17 @@ export const justNumber3 = (price: number, Num?: number, isBuy?: boolean) => { trigger: 'change' } +} +export const justNumber4 = (price: number, Num?: number, isBuy?: boolean) => { + priceP = price + NumP = Num + isBuyP = isBuy + return { + required: true, + validator: checkNumber2, + trigger: 'change' + } + } export const ruleNumber = () => { diff --git a/src/views/base/cart/index.vue b/src/views/base/cart/index.vue index 6d84edb..7d6042c 100644 --- a/src/views/base/cart/index.vue +++ b/src/views/base/cart/index.vue @@ -34,7 +34,7 @@ >
-
+
{ // Update item price and total price item.price = newPrice + (product.cash_fee_buy ?? 0) - item.totalPrice = item.price * item.quantity + item.totalPrice = parseInt(item.price * item.quantity) }) // Save updated prices to storage @@ -162,7 +162,7 @@ watch(lastPrice, () => { // Computed total price that updates with price changes const totalPrice = computed(() => { - return cartStore.cartItems.reduce((sum, item) => sum + item.totalPrice, 0) + return parseInt(cartStore.cartItems.reduce((sum, item) => sum + item.totalPrice, 0)) }) function getProductImage(product: any) { @@ -255,7 +255,7 @@ async function handleCheckout() { // Check wallet balance for cash method items (without gateway) const cashItemsTotal = cartStore.cartItems .filter(item => item.method === 'cash' && !item.gateway) - .reduce((sum, item) => sum + item.totalPrice, 0) + .reduce((sum, item) => parseInt(sum + item.totalPrice), 0) if (cashItemsTotal > 0) { // Ensure wallet info is loaded @@ -374,7 +374,7 @@ async function initPrice() { // Update item price and total price item.price = newPrice + (product.cash_fee_buy ?? 0) - item.totalPrice = item.price * item.quantity + item.totalPrice =parseInt(item.price * item.quantity) }) // Save updated prices to storage diff --git a/src/views/base/products/components/DealProduct.vue b/src/views/base/products/components/DealProduct.vue index 1779a8d..b57a7a9 100644 --- a/src/views/base/products/components/DealProduct.vue +++ b/src/views/base/products/components/DealProduct.vue @@ -60,7 +60,7 @@ + :rules="[justNumber4(props?.ProductItem?.price , form.method , props?.ProductItem?.amount, true, form.gateway)]"> { function calculateCash(val: number) { priceErrorVisible.value = false - // console.log(val) + console.log("val",val,props?.ProductItem) if (price.value) { - form.value.goldVazn = parseFloat((val * (( props?.ProductItem?.price) + (props?.ProductItem?.cash_fee_buy)))/lastPrice.value?.buy).toFixed(1) + form.value.goldVazn = parseFloat((val * props?.ProductItem?.amount).toFixed(3)) console.log(val,props?.ProductItem?.price,props?.ProductItem?.cash_fee_buy,lastPrice.value?.buy) if (isBuy.value) { if (val){ @@ -579,7 +579,7 @@ console.log(val,props?.ProductItem?.price,props?.ProductItem?.cash_fee_buy,lastP form.value.goldVazn = 0 } } - console.log(form.value.goldVazn) + console.log('goldVazn',form.value.goldVazn) } } diff --git a/src/views/base/products/product/[id].vue b/src/views/base/products/product/[id].vue index 14d2c66..7c5a375 100644 --- a/src/views/base/products/product/[id].vue +++ b/src/views/base/products/product/[id].vue @@ -6,7 +6,7 @@
-
+
From 8919374055fd72491f2d2ec465f8406b24a143ee Mon Sep 17 00:00:00 2001 From: MojtabaSoumi Date: Mon, 9 Feb 2026 13:43:02 +0330 Subject: [PATCH 6/6] 1404/11/19-add inventory for product --- index.html | 2 +- src/models/products.ts | 1 + src/views/base/about/index.vue | 4 +- src/views/base/cart/index.vue | 2 +- .../base/products/components/ProductItem.vue | 2 +- .../components/ProductItemVertical.vue | 2 +- src/views/base/products/index.vue | 7 +- src/views/base/products/product/[id].vue | 72 +++++++++++-------- src/views/base/rules/index.vue | 4 +- src/views/base/wallet/index.vue | 2 +- 10 files changed, 55 insertions(+), 43 deletions(-) diff --git a/index.html b/index.html index f5c5132..795e642 100644 --- a/index.html +++ b/index.html @@ -42,7 +42,7 @@
- + diff --git a/src/models/products.ts b/src/models/products.ts index a39b04c..dd237fc 100644 --- a/src/models/products.ts +++ b/src/models/products.ts @@ -26,6 +26,7 @@ export interface Product { description: string wallet: Wallet similar?:Product[] + inventory:number } export interface PInventory { diff --git a/src/views/base/about/index.vue b/src/views/base/about/index.vue index 11c2c2d..300d6e4 100644 --- a/src/views/base/about/index.vue +++ b/src/views/base/about/index.vue @@ -67,10 +67,10 @@
diff --git a/src/views/base/cart/index.vue b/src/views/base/cart/index.vue index 7d6042c..d52c89a 100644 --- a/src/views/base/cart/index.vue +++ b/src/views/base/cart/index.vue @@ -308,7 +308,7 @@ async function handleCheckout() { return { direction: 1, // 1 for buy (cart items are always buy orders) price: productPrice, - amount: item.quantity, + amount: product.amount, gateway: item.gateway, product_id: product.id, method: item.method, diff --git a/src/views/base/products/components/ProductItem.vue b/src/views/base/products/components/ProductItem.vue index b7bca38..44a4eec 100644 --- a/src/views/base/products/components/ProductItem.vue +++ b/src/views/base/products/components/ProductItem.vue @@ -95,7 +95,7 @@
ناموجود diff --git a/src/views/base/products/components/ProductItemVertical.vue b/src/views/base/products/components/ProductItemVertical.vue index b5468dd..b8fd897 100644 --- a/src/views/base/products/components/ProductItemVertical.vue +++ b/src/views/base/products/components/ProductItemVertical.vue @@ -30,7 +30,7 @@
ناموجود diff --git a/src/views/base/products/index.vue b/src/views/base/products/index.vue index 4448788..199eafb 100644 --- a/src/views/base/products/index.vue +++ b/src/views/base/products/index.vue @@ -18,11 +18,10 @@
-
- - +
+ +
-
diff --git a/src/views/base/products/product/[id].vue b/src/views/base/products/product/[id].vue index 7c5a375..3a20fbd 100644 --- a/src/views/base/products/product/[id].vue +++ b/src/views/base/products/product/[id].vue @@ -1,13 +1,13 @@