优化代客下单
This commit is contained in:
@@ -69,7 +69,7 @@
|
|||||||
"vue-clipboard3": "^2.0.0",
|
"vue-clipboard3": "^2.0.0",
|
||||||
"vue-i18n": "^11.1.0",
|
"vue-i18n": "^11.1.0",
|
||||||
"vue-router": "^4.5.0",
|
"vue-router": "^4.5.0",
|
||||||
"ysk-utils": "^1.0.68"
|
"ysk-utils": "^1.0.69"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^19.7.1",
|
"@commitlint/cli": "^19.7.1",
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ export const useCartsStore = defineStore("carts", () => {
|
|||||||
.flat()
|
.flat()
|
||||||
.map(convertToBaseCartItem);
|
.map(convertToBaseCartItem);
|
||||||
|
|
||||||
|
|
||||||
if (cart.length || history.length) {
|
if (cart.length || history.length) {
|
||||||
WebSocketManager.sendMessage({
|
WebSocketManager.sendMessage({
|
||||||
type: "shopping",
|
type: "shopping",
|
||||||
@@ -164,15 +165,17 @@ export const useCartsStore = defineStore("carts", () => {
|
|||||||
shop_id: localStorage.getItem("shopId"),
|
shop_id: localStorage.getItem("shopId"),
|
||||||
data: {
|
data: {
|
||||||
cart: cart.map(item => {
|
cart: cart.map(item => {
|
||||||
|
console.log('cart.111111', item);
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
is_time_discount: limitUtils.canUseLimitTimeDiscount(item, limitDiscountRes.value, shopInfoTyped, vipUser.value) ? 1 : 0
|
is_time_discount: limitUtils.canUseLimitTimeDiscount(item, limitDiscountRes.value, shopInfoTyped, vipUser.value, 'product_id') ? 1 : 0
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
history: history.map(item => {
|
history: history.map(item => {
|
||||||
|
console.log('history.222222', item);
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
is_time_discount: limitUtils.canUseLimitTimeDiscount(item, limitDiscountRes.value, shopInfoTyped, vipUser.value) ? 1 : 0
|
is_time_discount: limitUtils.canUseLimitTimeDiscount(item, limitDiscountRes.value, shopInfoTyped, vipUser.value, 'productId') ? 1 : 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -785,6 +788,7 @@ export const useCartsStore = defineStore("carts", () => {
|
|||||||
sku_name: v.skuName,
|
sku_name: v.skuName,
|
||||||
sku_id: v.skuId,
|
sku_id: v.skuId,
|
||||||
product_type: v.productType,
|
product_type: v.productType,
|
||||||
|
product_id: v.productId,
|
||||||
is_time_discount: limitUtils.canUseLimitTimeDiscount(v, limitDiscountRes.value, shopInfoTyped, vipUser.value, 'productId'),
|
is_time_discount: limitUtils.canUseLimitTimeDiscount(v, limitDiscountRes.value, shopInfoTyped, vipUser.value, 'productId'),
|
||||||
time_discount_price: limitUtils.returnPrice({
|
time_discount_price: limitUtils.returnPrice({
|
||||||
goods: { ...v, ...skuData },
|
goods: { ...v, ...skuData },
|
||||||
|
|||||||
Reference in New Issue
Block a user