添加401清除使用的数据
This commit is contained in:
@@ -11,7 +11,7 @@ export const useGenerateStore = defineStore({
|
||||
model: {
|
||||
id: '',
|
||||
},
|
||||
originalTryOn:{//生成穿好衣服的回参
|
||||
originalTryOn: {//生成穿好衣服的回参
|
||||
id: '',
|
||||
isLike: false,//是否喜欢
|
||||
tryOnUrl:'',
|
||||
@@ -74,6 +74,21 @@ export const useGenerateStore = defineStore({
|
||||
setIsGenerate(isGenerate: boolean) {
|
||||
this.isGenerate = isGenerate
|
||||
},
|
||||
clearProductData(){
|
||||
this.style = {
|
||||
id: '',
|
||||
oldId: '',
|
||||
}
|
||||
this.model = {
|
||||
id: '',
|
||||
}
|
||||
this.originalTryOn = {
|
||||
id: '',
|
||||
isLike: false,
|
||||
tryOnUrl:'',
|
||||
}
|
||||
this.isGenerate = false
|
||||
},
|
||||
/** 更新顾客照片信息 */
|
||||
updatePhotoInfo(data: any) {
|
||||
this.photoInfo.id = data.id || ""
|
||||
@@ -89,5 +104,11 @@ export const useGenerateStore = defineStore({
|
||||
this.customizeInfo.isRegenerated = ""
|
||||
this.customizeInfo.isFavorite = false
|
||||
},
|
||||
//设置默认数据
|
||||
clearGenerateData() {
|
||||
this.clearProductData()
|
||||
this.updatePhotoInfo()
|
||||
this.clearCustomizeInfo()
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user