购物车逻辑完善
个人信息存储优化 团购支付
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user