diff --git a/dist.7z b/dist.7z index 918b947b..138ce4d1 100644 Binary files a/dist.7z and b/dist.7z differ diff --git a/src/component/Administrator/SE/designDetailList/index.vue b/src/component/Administrator/SE/designDetailList/index.vue index 67d1a0cd..30a13e5d 100644 --- a/src/component/Administrator/SE/designDetailList/index.vue +++ b/src/component/Administrator/SE/designDetailList/index.vue @@ -213,16 +213,16 @@ export default defineComponent({ //获取列表 gettrialList() { - let startTime: any = this.rangeTimeValue[0] + let startTime: any = this.rangeTimeValue?.[0] ? this.rangeTimeValue[0] : '00:00:00'; - let endTime: any = this.rangeTimeValue[1] + let endTime: any = this.rangeTimeValue?.[1] ? this.rangeTimeValue[1] : '23:59:59'; - let startDate: any = this.rangePickerValue[0] + let startDate: any = this.rangePickerValue?.[0] ? this.rangePickerValue[0]+' '+startTime : ""; - let endDate: any = this.rangePickerValue[1] + let endDate: any = this.rangePickerValue?.[1] ? this.rangePickerValue[1]+' '+endTime : ""; let ids = this.ids.join(',') diff --git a/src/component/Administrator/SE/getGenerateFrequency/index.vue b/src/component/Administrator/SE/getGenerateFrequency/index.vue index 142eeb58..230d8e13 100644 --- a/src/component/Administrator/SE/getGenerateFrequency/index.vue +++ b/src/component/Administrator/SE/getGenerateFrequency/index.vue @@ -201,16 +201,16 @@ export default defineComponent({ //获取列表 gettrialList() { - let startTime: any = this.rangeTimeValue[0] + let startTime: any = this.rangeTimeValue?.[0] ? this.rangeTimeValue[0] : '00:00:00'; - let endTime: any = this.rangeTimeValue[1] + let endTime: any = this.rangeTimeValue?.[1] ? this.rangeTimeValue[1] : '23:59:59'; - let startDate: any = this.rangePickerValue[0] + let startDate: any = this.rangePickerValue?.[0] ? this.rangePickerValue[0]+' '+startTime : ""; - let endDate: any = this.rangePickerValue[1] + let endDate: any = this.rangePickerValue?.[1] ? this.rangePickerValue[1]+' '+endTime : ""; let data = { diff --git a/src/component/Administrator/TestClickData.vue b/src/component/Administrator/TestClickData.vue index f9e5f912..1e5ef67d 100644 --- a/src/component/Administrator/TestClickData.vue +++ b/src/component/Administrator/TestClickData.vue @@ -278,8 +278,8 @@ export default defineComponent({ //获取列表 gettrialList() { - let startTime: any = this.rangeTimeValue[0] - ? this.rangeTimeValue[0] + let startTime: any = this.rangeTimeValue?.[0] + ? this.rangeTimeValue?.[0] : '00:00:00'; let endTime: any = this.rangeTimeValue[1] ? this.rangeTimeValue[1] diff --git a/src/component/Administrator/coupons/index.vue b/src/component/Administrator/coupons/index.vue index cb1535d9..2b29acfb 100644 --- a/src/component/Administrator/coupons/index.vue +++ b/src/component/Administrator/coupons/index.vue @@ -375,10 +375,10 @@ export default defineComponent({ // let endTime: any = this.rangeTimeValue[1] // ? this.rangeTimeValue[1] // : '23:59:59'; - let startDate: any = this.rangePickerValue[0] + let startDate: any = this.rangePickerValue?.[0] ? this.rangePickerValue[0]+' '+'00:00:00' : ""; - let endDate: any = this.rangePickerValue[1] + let endDate: any = this.rangePickerValue?.[1] ? this.rangePickerValue[1]+' '+'23:59:59' : ""; let data = { diff --git a/src/component/Detail/canvas/index.vue b/src/component/Detail/canvas/index.vue index 77ce80df..f8dda41b 100644 --- a/src/component/Detail/canvas/index.vue +++ b/src/component/Detail/canvas/index.vue @@ -186,7 +186,7 @@ export default defineComponent({ }) } const frontBackChange = (value:any)=>{ - let full = detailData.frontBack.front[detailData.imgDomIndex].undividedLayer + let full = detailData.frontBack.front[detailData.imgDomIndex].undividedLayer || detailData.frontBack.front[detailData.imgDomIndex].imageUrl let size = { ...detailData.canvasConfig, } diff --git a/src/component/Detail/model/modelPosition.vue b/src/component/Detail/model/modelPosition.vue index 14fc7ee2..b42e3f0b 100644 --- a/src/component/Detail/model/modelPosition.vue +++ b/src/component/Detail/model/modelPosition.vue @@ -266,9 +266,7 @@ export default defineComponent({ if(isOpen){ emit('canvasReload') store.commit('DesignDetail/setDesignColthes',detailData.frontBack.front[index].id) - return } - if(isModal)return store.commit('DesignDetail/setDesignColthes',detailData.frontBack.front[index].id) selectItem.imgDomIndex = index diff --git a/src/component/home/design/index.vue b/src/component/home/design/index.vue index e3ded97c..af1dc47b 100644 --- a/src/component/home/design/index.vue +++ b/src/component/home/design/index.vue @@ -1466,7 +1466,7 @@ export default defineComponent({ sessionStorage.setItem('collValue',JSON.stringify(this.collValue)) if(this.$props.isState)this.sortDesignCollection() // window.removeEventListener('resize', this.setItemPosition) - this.observerData.observer.unobserve(this.$refs.rightContentBlockBox); + if(this.observerData?.observer)this.observerData.observer.unobserve(this.$refs.rightContentBlockBox); }, async mounted() { // if(window.innerWidth < 1200){ diff --git a/src/component/home/index.vue b/src/component/home/index.vue index 8dc3fbfe..ee4964ed 100644 --- a/src/component/home/index.vue +++ b/src/component/home/index.vue @@ -52,7 +52,6 @@ export default defineComponent({ chatData:null as any, dataLoad:true as any, }) - console.log(data.selectObject) let settingGetHistory:any = inject('settingGetHistory') const setIsShowMark = (boolean:boolean)=>{ data.isShowMark = boolean diff --git a/src/component/home/tools/poseTransfer/index.vue b/src/component/home/tools/poseTransfer/index.vue index 0a03064c..509b32e2 100644 --- a/src/component/home/tools/poseTransfer/index.vue +++ b/src/component/home/tools/poseTransfer/index.vue @@ -553,7 +553,7 @@ export default defineComponent({ nextTick(()=>{ let list = store.state.HomeStoreModule.poseTransfer.list let taskIdList = list.filter((item:any)=>!item.videoUrl)[0] - if(taskIdList.length > 0){ + if(taskIdList?.length > 0){ data.isGenerate = true data.remGenerate = true setGenerate(taskIdList[0].taskId) diff --git a/src/component/home/tools/toProduct/index.vue b/src/component/home/tools/toProduct/index.vue index 44f5c398..3778cb10 100644 --- a/src/component/home/tools/toProduct/index.vue +++ b/src/component/home/tools/toProduct/index.vue @@ -867,7 +867,7 @@ export default defineComponent({ list = store.state.HomeStoreModule.relightList.list || [] } let taskIdList = list.filter((item:any)=>!item?.url) - if(taskIdList.length > 0){ + if(taskIdList?.length > 0){ let arr:any = [] taskIdList.forEach((item:any)=>{ arr.push(item.taskId) diff --git a/src/lang/cn.ts b/src/lang/cn.ts index ace53f89..3ae64f3a 100644 --- a/src/lang/cn.ts +++ b/src/lang/cn.ts @@ -1303,6 +1303,7 @@ export default { admin:{ allUser:'所有用户', UserData:'用户数据', + FunctionUseCHART:'功能使用图表', }, adminSeAllUser:{ CreateTime:'创建时间', diff --git a/src/lang/en.ts b/src/lang/en.ts index 492f531d..4f898589 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -1281,7 +1281,7 @@ export default { wx:'Wx', relightEdit:'Edit details', changeBackground:'Change the background', - toproductFlus:'Premium', + toproductFlus:'High', toproductBasic:'Basic', generateWx:'Premium', generateFlux:'Advanced', @@ -1303,6 +1303,7 @@ export default { admin:{ allUser:'All User', UserData:'User Data', + FunctionUseCHART:'Function Use CHART', }, adminSeAllUser:{ CreateTime:'Create Time', diff --git a/src/store/Detail/designDetail.ts b/src/store/Detail/designDetail.ts index 8306ce01..16b9e6d0 100644 --- a/src/store/Detail/designDetail.ts +++ b/src/store/Detail/designDetail.ts @@ -76,6 +76,7 @@ const DesignDetail : Module = { }, updataDetailItem(state,data){ state.designDetail.clothes.forEach((item:any) => { + console.log(state.selectDetail) if(item.id == state.selectDetail.id){ for (const key in data) { item[key] = data[key] diff --git a/src/store/userHabit/userHabit.ts b/src/store/userHabit/userHabit.ts index 12f363de..fd6e8705 100644 --- a/src/store/userHabit/userHabit.ts +++ b/src/store/userHabit/userHabit.ts @@ -261,7 +261,7 @@ const userHabit : Module = { */ state.userDetail.affiliate = data.affiliate state.userDetail.systemUser = data.systemUser - // state.userDetail.systemUser = 3 + // state.userDetail.systemUser = 7 // 身份列表1:可以使用aida系统,2:可以使用affiliate页面,3:系统管理员用户 state.userDetail.systemList = [] if(data.systemUser != 0)state.userDetail.systemList.push(1) diff --git a/src/tool/adminRouter.js b/src/tool/adminRouter.js index 658c1259..038d0327 100644 --- a/src/tool/adminRouter.js +++ b/src/tool/adminRouter.js @@ -180,7 +180,7 @@ const all = (t)=>{ },{ name:'Design Frequency', icon:'usetime', - route:'/administrator/designFrequency', + route:'/administrator/testClickDataSE', key:'sub14', isShow:true, },] @@ -201,19 +201,19 @@ const schoolOrEnterprise = (t) =>{ key:'sub2', isShow:true, },{ - name:'Function Use CHART', + name:t('admin.FunctionUseCHART'), route:'/administrator/recentActiveChart', icon:'usetime', key:'sub3', isShow:true, }, - { - name:'Design Frequency', - icon:'usetime', - route:'/administrator/designFrequency', - key:'sub4', - isShow:true, - }, + // { + // name:'Design Frequency', + // icon:'usetime', + // route:'/administrator/testClickDataSE', + // key:'sub4', + // isShow:true, + // }, // { // name:'Credits Detail', // route:'/administrator/generateFrequencySE', diff --git a/src/views/Administrator.vue b/src/views/Administrator.vue index 7c193336..8bd4487c 100644 --- a/src/views/Administrator.vue +++ b/src/views/Administrator.vue @@ -91,19 +91,19 @@ export default defineComponent({ setup() { const router = useRouter() // const route:any = useRoute() - const {t} = useI18n() + const {t,locale} = useI18n() const store:any = useStore() let userDetail:any= computed(()=>{ return store.state.UserHabit.userDetail }) const state:any = reactive({ - - // 5,7 - rootSubmenuKeys: [], - openKeys: [], - selectedKeys: ['sub1'], - nowPageName:'All User',//当前页面名称 + userDetailLanguage:computed(()=>store.state.UserHabit.userDetail.language), + // 5,7 + rootSubmenuKeys: [], + openKeys: [], + selectedKeys: ['sub1'], + nowPageName:'All User',//当前页面名称 }); let routers:any = ref([]) @@ -124,7 +124,24 @@ export default defineComponent({ let setBack = ()=>{ router.push('/home'); } + watch(()=>state.userDetailLanguage,(newVal)=>{ + if(locale.value == newVal || !newVal)return + locale.value = newVal + var vuex_systemUser: any = sessionStorage.getItem("vuex_systemUser"); + let langList = [] + if(vuex_systemUser == 5 || vuex_systemUser == 7){ + langList = adminRouter.schoolOrEnterprise(t); + }else{ + langList = adminRouter.all(t); + } + langList.forEach((item:any,index) => { + state.rootSubmenuKeys[index].name = item.name + }) + }) onMounted(() => { + store.dispatch('getLangType').then(()=>{ + }).catch(()=>{ + }) var vuex_systemUser: any = sessionStorage.getItem("vuex_systemUser"); if(vuex_systemUser == 5 || vuex_systemUser == 7){ state.rootSubmenuKeys = adminRouter.schoolOrEnterprise(t); diff --git a/src/views/HomeMain.vue b/src/views/HomeMain.vue index 71ea9c34..c0338677 100644 --- a/src/views/HomeMain.vue +++ b/src/views/HomeMain.vue @@ -320,7 +320,7 @@ export default defineComponent({ openTypeChild:'', isLanguage:false, userDetailLanguage:computed(()=>store.state.UserHabit.userDetail.language), - openTypeList:[], + openTypeList:openTypeList(t), projectSetting:null, historyData:{ isNoData:false, @@ -339,9 +339,25 @@ export default defineComponent({ }, bathGenerationList:["poseTransfer","SERIES_DESIGN","toProduct","relight"] }) - watch(()=>locale.value,(newVal)=>{ - homeMainData.openTypeList = openTypeList(t) - }, { immediate: true }) + watch(()=>homeMainData.userDetailLanguage,(newVal)=>{ + if(locale.value == newVal || !newVal)return + locale.value = newVal + let opTypeList = openTypeList(t) + for (const key in opTypeList) { + const element = opTypeList[key]; + homeMainData.openTypeList[key].label = element.label + if(element?.length > 0){ + element.forEach((item,index)=>{ + homeMainData.openTypeList[key][index].label = item.label + }) + } + } + }) + // watch(()=>locale.value,(newVal,oldVal)=>{ + // if(newVal == oldVal)return + // console.log(newVal , oldVal) + // // homeMainData.openTypeList = + // }) const historyData = reactive({ @@ -378,6 +394,7 @@ export default defineComponent({ homeMainData.openType = '' homeMainData.openTypeChild = '' } + if( query.create == 'true' || query?.source == 'batch' || @@ -393,9 +410,7 @@ export default defineComponent({ // watch(()=>homeMainData.openTypeList,()=>{ // homeMainData.historyData.page = 1 // }) - watch(()=>homeMainData.userDetailLanguage,(newVal)=>{ - locale.value = newVal - }) + let userDetail= computed(()=>{ return store.state.UserHabit.userDetail }) @@ -518,6 +533,9 @@ export default defineComponent({ setPorfolioDom() }) }) + onBeforeUnmount(()=>{ + MyWs.close() + }) const setOpenType = (type,list)=>{ if(homeMainData.openType == type){ homeMainData.openType = '' @@ -530,12 +548,14 @@ export default defineComponent({ // } } } + let Observer = null let setPorfolioDom = ()=>{ + if(Observer)return homeMainData.historyData.isShowLoading = false homeMainData.historyData.isNoData = false homeMainData.historyData.page = 1 let imgParent = document.querySelector('.homeMain_max .detail .material_content_list_loding .historyPage_loading') - new IntersectionObserver( + Observer = new IntersectionObserver( (entries, observer) => { // 如果不是相交,则直接返回 if (!entries[0].intersectionRatio) return; diff --git a/src/views/HomeView/library.vue b/src/views/HomeView/library.vue index 469d26ee..26ed15b9 100644 --- a/src/views/HomeView/library.vue +++ b/src/views/HomeView/library.vue @@ -1031,7 +1031,7 @@ export default defineComponent({ this.getSex() }, beforeUnmount(){ - this.store.commit('createDetail') + // this.store.commit('createDetail') this.store.commit('createProbject') }, methods:{ diff --git a/vite.config.js b/vite.config.js index da95a967..6093208d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -136,7 +136,33 @@ export default defineConfig(({ mode }) => { // 优化文件命名 chunkFileNames: "js/[name]-[hash].js", entryFileNames: "js/[name]-[hash].js", - assetFileNames: "[ext]/[name]-[hash].[ext]", + // assetFileNames: "[ext]/[name]-[hash].[ext]", + assetFileNames: (assetInfo) => { + const name = assetInfo.name || ''; + const ext = name.includes('.') ? name.substring(name.lastIndexOf('.')) : ''; + // 定义文件后缀名数组用于分类 + const imgExts = ['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.icon']; + const videoExts = ['.mp4', '.avi', '.wmv', '.mov', '.mkv', '.webm']; // 视频格式扩展 + const fontExts = [ + '.ttf', '.otf', '.woff', '.woff2', '.eot', + '.ttc', '.dfont', '.pfb', '.pfm', '.afm' + ]; + if (videoExts.some(ext => name.endsWith(ext))) { + return 'video/[name]-[hash].[ext]'; + } + else if (imgExts.some(ext => name.endsWith(ext))) { + return 'image/[name]-[hash].[ext]'; + } + else if (name.endsWith('.css')) { + return 'css/[name]-[hash].[ext]'; + } + if (fontExts.some(fontExt => ext.toLowerCase() === fontExt)) { + return 'fonts/[name]-[hash].[ext]'; + } + else { + return 'assets/[name]-[hash].[ext]'; + } + } }, }, },