This commit is contained in:
李志鹏
2025-10-30 17:22:50 +08:00
parent a1a56050ce
commit 0bb916816c
2 changed files with 4 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ export const useGenerateStore = defineStore({
/** AI魔改信息 */
customizeInfo: {
inputText: '',
count: 0,
tryOnId: '',
tryOnUrl: '',
@@ -108,6 +109,7 @@ export const useGenerateStore = defineStore({
/** 清空 AI魔改信息 */
clearCustomizeInfo() {
this.customizeInfo.inputText = ''
this.customizeInfo.count = 0
this.customizeInfo.tryOnId = ''
this.customizeInfo.tryOnUrl = ''
this.customizeInfo.styleUrl = ''

View File

@@ -40,10 +40,11 @@
isRegenerated: 1,
prompt: customizeInfo.inputText
}
if (generateStore.customerPhotoId) data["customerPhotoId"] = generateStore.customerPhotoId
if (generateStore.customerPhotoId && customizeInfo.count === 0) data["customerPhotoId"] = generateStore.customerPhotoId
loading.value = true
generateTryOnEffect(data)
.then((res:any) => {
customizeInfo.count++
customizeInfo.tryOnId = res.tryOnId
customizeInfo.tryOnUrl = res.tryOnUrl
customizeInfo.styleUrl = res.styleUrl