修复魔改页面无法跳转到outfit页面

This commit is contained in:
X1627315083
2025-12-30 09:45:26 +08:00
parent 0794749f9a
commit 9f338a772d
4 changed files with 6 additions and 21 deletions

View File

@@ -120,7 +120,7 @@ const router = createRouter({
},
{
path: '/workshop/selectStyle',
name: 'selectStyle',
name: 'SelectStyle',
component: () => import('../views/Workshop/selectStyle/index.vue'),
meta: { verify: () => VerifyIDs(2) }
},

View File

@@ -95,28 +95,10 @@ export const useGenerateStore = defineStore({
...data,
}
},
clearStyle() {
this.style = {
id: '',
path: '',
isLike: false,
taskId:'',
status: ''
}
this.styleList = [
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
{id:'',taskId:'',status:'',path:''},
]
},
//模特相关
selectModel(data: any) {
this.model.id = data.id
},
setIsGenerate(isGenerate: boolean) {
this.isGenerate = isGenerate
},
clearProductData() {
this.styleList = [
{id:'',taskId:'',status:'',path:''},
@@ -134,12 +116,14 @@ export const useGenerateStore = defineStore({
this.model = {
id: ''
}
this.clearTryOn()
},
clearTryOn() {
this.originalTryOn = {
id: '',
isLike: false,
tryOnUrl: ''
}
this.isGenerate = false
},
/** 更新顾客照片信息 */
updatePhotoInfo(data: any) {

View File

@@ -115,6 +115,7 @@
}
// 选择另一个穿搭
const onChooseOutfit = () => {
generateStore.clearTryOn()
router.push({ name: 'SelectStyle' })
}
</script>

View File

@@ -93,7 +93,7 @@ const requestOutfit = async ({num})=>{
}
})
isLoading.value = true
generateStore.clearStyle()
generateStore.clearProductData()
data.select.taskId = rv[0]
rv.forEach((item,index)=>data.styleList[index].taskId = item)
getRequestOutfitList(rv)