This commit is contained in:
李志鹏
2025-10-24 15:19:29 +08:00
parent 40ec2ce775
commit 114cea1a29
6 changed files with 35 additions and 26 deletions

View File

@@ -11,11 +11,12 @@ export const useGenerateStore = defineStore({
model: {
id: -1,
},
tryOnId:{//生成穿好衣服的回参
tryOnId: {//生成穿好衣服的回参
id: -1,
isLike: false,//是否喜欢
},
isGenerate: false,//点击继续按钮后是否需要生成
/** 顾客照片信息 */
photoInfo: {
id: "",
@@ -40,11 +41,11 @@ export const useGenerateStore = defineStore({
/** 进店记录id */
visitRecordId: (state) => 1,
/** 服装id */
styleId: (state) => 1,
styleId: (state) => state.style.id,
/** 模特照片id */
modelPhotoId: (state) => 1,
/** 原始试穿id */
originalTryOnId: (state) => 1,
modelPhotoId: (state) => state.model.id,
/** 原始试穿id-优先AI魔改 */
originalTryOnId: (state) => state.customizeInfo.tryOnId || state.tryOnId.id,
/** 顾客照片id */
customerPhotoId: (state) => state.photoInfo.id,
},
@@ -74,8 +75,8 @@ export const useGenerateStore = defineStore({
},
/** 更新顾客照片信息 */
updatePhotoInfo(data: any) {
this.photoInfo.id = data.visitRecordId || ""
this.photoInfo.url = data.defaultImageUrl || ""
this.photoInfo.id = data.id || ""
if (!data.photoUrl) this.photoInfo.url = ""
this.photoInfo.file = null
},
/** 清空 AI魔改信息 */