功能完善

This commit is contained in:
2024-04-14 01:05:08 +08:00
parent a270c9be70
commit b676a1acd9
80 changed files with 118 additions and 52 deletions

View File

@@ -1,5 +1,6 @@
import { defineStore } from 'pinia';
import { GoodsBean, StockBean } from '@/api/goods/types';
import { getCompanyId } from '@/utils';
const useShoppingCartStore = defineStore('shoppingCart', {
state: (): { shoppingCartList: GoodsBean[] } => ({
@@ -8,7 +9,7 @@ const useShoppingCartStore = defineStore('shoppingCart', {
persist: {
// 修改存储中使用的键名称,默认为当前 Store的 id
key: 'shoppingCartState',
key: 'shoppingCartState_' + getCompanyId(),
storage: {
setItem(key, value) {
uni.setStorageSync(key, value); // [!code warning]