feat: 客户checkin
This commit is contained in:
@@ -4,43 +4,48 @@ export const useGenerateStore = defineStore({
|
||||
id: 'generate', // 必须指明唯一的pinia仓库的id
|
||||
state: () => {
|
||||
return {
|
||||
style: {
|
||||
id: '',
|
||||
oldId: '',//表示从生成页面返回回来,需要调整的样式id
|
||||
},
|
||||
model: {
|
||||
id: '',
|
||||
},
|
||||
originalTryOn:{//生成穿好衣服的回参
|
||||
id: '',
|
||||
isLike: false,//是否喜欢
|
||||
tryOnUrl:'',
|
||||
},
|
||||
isGenerate: false,//点击继续按钮后是否需要生成
|
||||
style: {
|
||||
id: '',
|
||||
oldId: '' //表示从生成页面返回回来,需要调整的样式id
|
||||
},
|
||||
model: {
|
||||
id: ''
|
||||
},
|
||||
originalTryOn: {
|
||||
//生成穿好衣服的回参
|
||||
id: '',
|
||||
isLike: false, //是否喜欢
|
||||
tryOnUrl: ''
|
||||
},
|
||||
isGenerate: false, //点击继续按钮后是否需要生成
|
||||
|
||||
/** 顾客照片信息 */
|
||||
photoInfo: {
|
||||
id: "",
|
||||
url: "",
|
||||
file: null,
|
||||
},
|
||||
/** AI魔改信息 */
|
||||
customizeInfo: {
|
||||
inputText: "",
|
||||
/** 顾客照片信息 */
|
||||
photoInfo: {
|
||||
id: '',
|
||||
url: '',
|
||||
file: null
|
||||
},
|
||||
/** AI魔改信息 */
|
||||
customizeInfo: {
|
||||
inputText: '',
|
||||
|
||||
tryOnId: "",
|
||||
tryOnUrl: "",
|
||||
styleUrl: "",
|
||||
isRegenerated: "",
|
||||
isFavorite: false,
|
||||
},
|
||||
}
|
||||
tryOnId: '',
|
||||
tryOnUrl: '',
|
||||
styleUrl: '',
|
||||
isRegenerated: '',
|
||||
isFavorite: false
|
||||
},
|
||||
customerInfo: {
|
||||
customerId: '',
|
||||
visitRecordId:''
|
||||
}
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
/** 顾客id */
|
||||
customerId: (state) => 1,
|
||||
customerId: (state) => state.customerInfo.customerId,
|
||||
/** 进店记录id */
|
||||
visitRecordId: (state) => 1,
|
||||
visitRecordId: (state) => state.customerInfo.visitRecordId,
|
||||
/** 服装id */
|
||||
styleId: (state) => state.style.id || state.style.oldId,
|
||||
/** 模特照片id */
|
||||
@@ -89,5 +94,8 @@ export const useGenerateStore = defineStore({
|
||||
this.customizeInfo.isRegenerated = ""
|
||||
this.customizeInfo.isFavorite = false
|
||||
},
|
||||
setCustomerInfo(data: any) {
|
||||
this.customerInfo = data
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,6 +1,7 @@
|
||||
// 每一个存储的模块,命名规则use开头,store结尾
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, computed } from 'vue'
|
||||
import { removeLocal, setLocal } from '@/utils/local'
|
||||
|
||||
export const useUserInfoStore = defineStore('userInfo', () => {
|
||||
const state = ref({
|
||||
@@ -27,6 +28,7 @@ export const useUserInfoStore = defineStore('userInfo', () => {
|
||||
|
||||
const setToken = (data: string) => {
|
||||
state.value.token = data
|
||||
setLocal(data, 'token')
|
||||
}
|
||||
|
||||
const getGenerateParams = () => {
|
||||
@@ -51,6 +53,7 @@ export const useUserInfoStore = defineStore('userInfo', () => {
|
||||
state.value.token = ''
|
||||
state.value.userInfo = {}
|
||||
state.value.customerId = ''
|
||||
removeLocal('token')
|
||||
resetGenerateParams()
|
||||
resolve('')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user