fix
This commit is contained in:
@@ -39,18 +39,25 @@
|
||||
customizeInfo.oldTryOnId = customizeInfo.tryOnId
|
||||
loading.value = true
|
||||
if (isDemo.value) {
|
||||
const data = {
|
||||
prompt: customizeInfo.inputText,
|
||||
tryonUrl: customizeInfo.tryOnUrl
|
||||
}
|
||||
// const data = {
|
||||
// prompt: customizeInfo.inputText,
|
||||
// tryonUrl: customizeInfo.tryOnUrl
|
||||
// }
|
||||
// if (generateStore.customerPhotoId && customizeInfo.count === 0) {
|
||||
// data['customerPhotoId'] = generateStore.customerPhotoId
|
||||
// }
|
||||
const data = new FormData()
|
||||
data.append('prompt', customizeInfo.inputText)
|
||||
data.append('tryonUrl', customizeInfo.tryOnUrl)
|
||||
if (generateStore.customerPhotoId && customizeInfo.count === 0) {
|
||||
data['customerPhotoId'] = generateStore.customerPhotoId
|
||||
data.append('customerPhotoId', generateStore.customerPhotoId)
|
||||
}
|
||||
generateTryOnEffectDemo(data)
|
||||
.then((res: any) => {
|
||||
if(!res) return Promise.reject('生成失败');
|
||||
customizeInfo.count++
|
||||
// customizeInfo.tryOnId = res.tryOnId
|
||||
customizeInfo.tryOnUrl = res.tryOnUrl
|
||||
customizeInfo.tryOnId = "1"
|
||||
customizeInfo.tryOnUrl = res
|
||||
// customizeInfo.styleUrl = res.styleUrl
|
||||
// customizeInfo.isRegenerated = res.isRegenerated
|
||||
// customizeInfo.isFavorite = !!res.isFavorite
|
||||
|
||||
Reference in New Issue
Block a user