This commit is contained in:
2026-09-04 01:50:59 +03:30
parent 3dda7fcf60
commit 57780ae99c
4 changed files with 7 additions and 12 deletions
+1 -6
View File
@@ -1,11 +1,6 @@
import useAxios from "@/utils/useAxios";
import type {PInventory, Product} from "@/models/products";
import type {PWallet, Wallet} from '@/models/wallet'
import type {Order} from "@/models/order";
import {useUserStore} from "@/store/userStore";
const userStore = useUserStore()
export const checkoutCart = async (orders: Order[]): Promise<any> => {
return await useAxios.post<Order[]>(`/customer/cart/checkout`, orders)
}
}
+2 -3
View File
@@ -5,10 +5,9 @@ import type {Ref, UnwrapRef} from "vue";
import type {Transaction} from "@/models/transaction";
import {useUserStore} from "@/store/userStore";
const userStore = useUserStore()
function customerOrderPrefix() {
return `/customer${!userStore.isSingle ? '' : '/single'}`
// lazy: این ماژول ممکن است قبل از app.use(pinia) لود شود
return `/customer${!useUserStore().isSingle ? '' : '/single'}`
}
export const createOrder = async (obj: Order): Promise<any> => {