fix bug
This commit is contained in:
+1
-6
@@ -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
@@ -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> => {
|
||||
|
||||
Reference in New Issue
Block a user