fix
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user