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