功能完善
This commit is contained in:
@@ -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]
|
||||
|
Reference in New Issue
Block a user