购物车逻辑完善

个人信息存储优化
团购支付
This commit is contained in:
2024-03-31 17:22:14 +08:00
parent 1fc0aa432b
commit b502385272
19 changed files with 859 additions and 141 deletions

View File

@@ -1,8 +1,8 @@
import { defineStore } from 'pinia';
import { StockBean } from '@/api/goods/types';
import { GoodsBean, StockBean } from '@/api/goods/types';
const useShoppingCartStore = defineStore('shoppingCart', {
state: (): { shoppingCartList: any[] } => ({
state: (): { shoppingCartList: GoodsBean[] } => ({
shoppingCartList: []
}),
@@ -36,8 +36,8 @@ const useShoppingCartStore = defineStore('shoppingCart', {
},
actions: {
save(partial: Partial<any>) {
this.shoppingCartList.push(partial);
save(partial: Partial<GoodsBean>) {
this.shoppingCartList.push(partial as GoodsBean);
},
updateCount(index: number, count: number) {