feat: 清除缓存页面

This commit is contained in:
zhangyh
2025-10-28 15:17:47 +08:00
parent baff697b4f
commit 0438cf95b9
6 changed files with 44 additions and 33 deletions

View File

@@ -114,11 +114,18 @@ export const useGenerateStore = defineStore({
this.customizeInfo.isRegenerated = ''
this.customizeInfo.isFavorite = false
},
clearCustomerInfo(){
this.customerInfo = {
customerId: '',
visitRecordId: ''
}
},
//设置默认数据
clearGenerateData() {
this.clearProductData()
this.updatePhotoInfo({})
this.clearCustomizeInfo()
this.clearCustomerInfo()
},
setCustomerInfo(data: any) {
this.customerInfo = data

View File

@@ -2,7 +2,6 @@
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
import { removeLocal, setLocal } from '@/utils/local'
import MyEvent from '@/utils/myEvent'
export const useUserInfoStore = defineStore('userInfo', () => {
const state = ref({
userInfo: {},
@@ -48,7 +47,6 @@ export const useUserInfoStore = defineStore('userInfo', () => {
state.value.userInfo = {}
removeLocal('token')
resetGenerateParams()
MyEvent.emit('clear-generate-state')
resolve('')
})
}