fix
This commit is contained in:
@@ -32,6 +32,7 @@ export const useGenerateStore = defineStore({
|
|||||||
/** AI魔改信息 */
|
/** AI魔改信息 */
|
||||||
customizeInfo: {
|
customizeInfo: {
|
||||||
inputText: '',
|
inputText: '',
|
||||||
|
count: 0,
|
||||||
|
|
||||||
tryOnId: '',
|
tryOnId: '',
|
||||||
tryOnUrl: '',
|
tryOnUrl: '',
|
||||||
@@ -108,6 +109,7 @@ export const useGenerateStore = defineStore({
|
|||||||
/** 清空 AI魔改信息 */
|
/** 清空 AI魔改信息 */
|
||||||
clearCustomizeInfo() {
|
clearCustomizeInfo() {
|
||||||
this.customizeInfo.inputText = ''
|
this.customizeInfo.inputText = ''
|
||||||
|
this.customizeInfo.count = 0
|
||||||
this.customizeInfo.tryOnId = ''
|
this.customizeInfo.tryOnId = ''
|
||||||
this.customizeInfo.tryOnUrl = ''
|
this.customizeInfo.tryOnUrl = ''
|
||||||
this.customizeInfo.styleUrl = ''
|
this.customizeInfo.styleUrl = ''
|
||||||
|
|||||||
@@ -40,10 +40,11 @@
|
|||||||
isRegenerated: 1,
|
isRegenerated: 1,
|
||||||
prompt: customizeInfo.inputText
|
prompt: customizeInfo.inputText
|
||||||
}
|
}
|
||||||
if (generateStore.customerPhotoId) data["customerPhotoId"] = generateStore.customerPhotoId
|
if (generateStore.customerPhotoId && customizeInfo.count === 0) data["customerPhotoId"] = generateStore.customerPhotoId
|
||||||
loading.value = true
|
loading.value = true
|
||||||
generateTryOnEffect(data)
|
generateTryOnEffect(data)
|
||||||
.then((res:any) => {
|
.then((res:any) => {
|
||||||
|
customizeInfo.count++
|
||||||
customizeInfo.tryOnId = res.tryOnId
|
customizeInfo.tryOnId = res.tryOnId
|
||||||
customizeInfo.tryOnUrl = res.tryOnUrl
|
customizeInfo.tryOnUrl = res.tryOnUrl
|
||||||
customizeInfo.styleUrl = res.styleUrl
|
customizeInfo.styleUrl = res.styleUrl
|
||||||
|
|||||||
Reference in New Issue
Block a user