flx
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// 每一个存储的模块,命名规则use开头,store结尾
|
||||
import { defineStore } from 'pinia'
|
||||
import { useUserInfoStore } from './userInfo'
|
||||
export const useGenerateStore = defineStore({
|
||||
id: 'generate', // 必须指明唯一的pinia仓库的id
|
||||
state: () => {
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
isRegenerated: 1,
|
||||
prompt: customizeInfo.inputText
|
||||
}
|
||||
if (generateStore.customerPhotoId) data.customerPhotoId = generateStore.customerPhotoId
|
||||
if (generateStore.customerPhotoId) data["customerPhotoId"] = generateStore.customerPhotoId
|
||||
loading.value = true
|
||||
generateTryOnEffect(data)
|
||||
.then((res) => {
|
||||
.then((res:any) => {
|
||||
customizeInfo.tryOnId = res.tryOnId
|
||||
customizeInfo.tryOnUrl = res.tryOnUrl
|
||||
customizeInfo.styleUrl = res.styleUrl
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
})
|
||||
const router = useRouter()
|
||||
const fileData = generateStore.photoInfo
|
||||
if(!fileData.file?.size) generateStore.updatePhotoInfo({});
|
||||
// 上传照片
|
||||
const handleUploadFace = () => {
|
||||
const input = document.createElement('input')
|
||||
|
||||
Reference in New Issue
Block a user