Merge branch 'master' of https://gitee.com/lvYeJu/lane-crawford-3
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"test": "vite --mode test",
|
||||
"build": "run-p type-check build-only",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// 每一个存储的模块,命名规则use开头,store结尾
|
||||
import { defineStore } from 'pinia'
|
||||
import { useUserInfoStore } from './userInfo'
|
||||
export const useGenerateStore = defineStore({
|
||||
id: 'generate', // 必须指明唯一的pinia仓库的id
|
||||
state: () => {
|
||||
@@ -38,9 +39,9 @@ export const useGenerateStore = defineStore({
|
||||
},
|
||||
getters: {
|
||||
/** 顾客id */
|
||||
customerId: (state) => 1,
|
||||
customerId: (state) => useUserInfoStore().state.customerId,
|
||||
/** 进店记录id */
|
||||
visitRecordId: (state) => 1,
|
||||
visitRecordId: (state) => useUserInfoStore().state.visitRecordId,
|
||||
/** 服装id */
|
||||
styleId: (state) => state.style.id || state.style.oldId,
|
||||
/** 模特照片id */
|
||||
|
||||
Reference in New Issue
Block a user