From 0a273a24dcc9464835c01e5dc6ddacc71d46245e Mon Sep 17 00:00:00 2001 From: wxd <1627315083@qq.com> Date: Wed, 2 Oct 2024 11:33:14 +0800 Subject: [PATCH] fix --- src/component/Account/accountFollowFans.vue | 4 ++ src/component/Account/accountMessage.vue | 9 ++-- src/component/Account/message/comment.vue | 2 +- src/component/Account/message/likeMessage.vue | 2 +- src/component/Account/message/newFollow.vue | 4 +- src/component/HomePage/createSlogan.vue | 16 +++---- src/component/LibraryPage/ModelPlacement.vue | 48 ++++++++++--------- src/lang/en.ts | 10 ++++ src/store/userHabit/userHabit.ts | 3 +- src/tool/webSocket.js | 4 +- 10 files changed, 60 insertions(+), 42 deletions(-) diff --git a/src/component/Account/accountFollowFans.vue b/src/component/Account/accountFollowFans.vue index ad07ff36..0a356691 100644 --- a/src/component/Account/accountFollowFans.vue +++ b/src/component/Account/accountFollowFans.vue @@ -68,6 +68,9 @@ export default defineComponent({ ], activeKey: '', }) + let userInfo= computed(()=>{ + return store.state.UserHabit.userInfo + }) let domRefs:any = reactive({ follow:ref(null), fans:ref(null), @@ -103,6 +106,7 @@ export default defineComponent({ return{ ...toRefs(accountMessage), ...toRefs(domRefs), + userInfo, messageSystem, setReadStatus, changeTabs, diff --git a/src/component/Account/accountMessage.vue b/src/component/Account/accountMessage.vue index 02c17606..a94d3f51 100644 --- a/src/component/Account/accountMessage.vue +++ b/src/component/Account/accountMessage.vue @@ -111,9 +111,10 @@ export default defineComponent({ let setReadStatus = (value:any)=>{ return new Promise((resolve,reject)=>{ if(value.isRead == 1)return reject('') + let id = value.senderId?value.senderId:value.id let data = { type:accountMessage.activeKey, - notificationIdList:value.id + notificationIdList:id } Https.axiosPost(Https.httpUrls.setReadStatus,'',{params:data}).then((rv)=>{ if(rv){ @@ -143,9 +144,9 @@ export default defineComponent({ return new Promise((resolve,reject)=>{ data.type = accountMessage.activeKey let url = Https.httpUrls.getHistoryNotification - if(data.type == 'follow'){ - url = Https.httpUrls.porfolioGetFollowerList - } + // if(data.type == 'follow'){ + // url = Https.httpUrls.porfolioGetFollowerList + // } Https.axiosPost(url,data).then((rv)=>{ if(rv){ // domRefs[data.type][0].setmessageList(rv,data) diff --git a/src/component/Account/message/comment.vue b/src/component/Account/message/comment.vue index 68181f0b..68135c5d 100644 --- a/src/component/Account/message/comment.vue +++ b/src/component/Account/message/comment.vue @@ -20,7 +20,7 @@
diff --git a/src/component/Account/message/likeMessage.vue b/src/component/Account/message/likeMessage.vue index 792d1983..c8aefec7 100644 --- a/src/component/Account/message/likeMessage.vue +++ b/src/component/Account/message/likeMessage.vue @@ -18,7 +18,7 @@
diff --git a/src/component/Account/message/newFollow.vue b/src/component/Account/message/newFollow.vue index d21eb131..7c184138 100644 --- a/src/component/Account/message/newFollow.vue +++ b/src/component/Account/message/newFollow.vue @@ -68,11 +68,11 @@ export default defineComponent({ } prop.getHistory(data).then((rv:any)=>{ accountMessage.isShowMark = false - if(rv.length == 0) { + if(rv.content.length == 0) { accountMessage.isNoData = true return } - accountMessage.dataList = rv + accountMessage.dataList = rv.content }).catch(() => { accountMessage.isShowMark = false accountMessage.isNoData = true diff --git a/src/component/HomePage/createSlogan.vue b/src/component/HomePage/createSlogan.vue index d838e392..033ff5b7 100644 --- a/src/component/HomePage/createSlogan.vue +++ b/src/component/HomePage/createSlogan.vue @@ -18,13 +18,13 @@
-
Color
+
{{ $t('createSlogan.Color') }}
-
Font Align
+
{{ $t('createSlogan.FontAlign') }}
    @@ -40,7 +40,7 @@
-
Font Style
+
{{ $t('createSlogan.FontStyle') }}
    @@ -49,7 +49,7 @@
-
Font Family
+
{{ $t('createSlogan.FontFamily') }}
@@ -57,16 +57,16 @@
-
新增
+
{{ $t('createSlogan.add') }}
-
删除
+
{{ $t('createSlogan.delete') }}
- submit + {{ $t('createSlogan.submit') }}
diff --git a/src/component/LibraryPage/ModelPlacement.vue b/src/component/LibraryPage/ModelPlacement.vue index 088ee9a7..0d1f9da6 100644 --- a/src/component/LibraryPage/ModelPlacement.vue +++ b/src/component/LibraryPage/ModelPlacement.vue @@ -33,10 +33,11 @@
-
+
+ {{ modelType }} {{ $t('ModelPlacement.System') }}
@@ -584,7 +585,7 @@ export default defineComponent({ // }) let cropper:any = this.$refs.cropper, that = this - if((this.modelType == 'System' && this.userInfo.userId == 88) || (this.modelType == 'System' &&this.userInfo.userId == 833)){ + if((this.modelType == 'System' && this.userInfo.userId == 88) || (this.modelType == 'System' &&this.userInfo.userId == 83)){ if(this.printObject.templateId){ this.printObject.id = this.printObject.relationId this.confrimSubmit() @@ -625,18 +626,19 @@ export default defineComponent({ cropper.changeScale(num); }, async confrimSubmit(){ + let modelType = 'Library' + if(this.userInfo.userId == 88 || this.userInfo.userId == 83){ + modelType = this.modelType + } let param = { libraryId:this.printObject.id, templateId:this.printObject.templateId || null, - modelType:'Library', + modelType:modelType, modelSex:this.sex, checkMd5:1, timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone, ...await this.getPrintLocation() } - if(this.userInfo.userId == 88 || this.userInfo.userId == 833){ - param.modelType = this.modelType - } this.isShowMark = true Https.axiosPost(Https.httpUrls.saveOrEditTemplatePoint, param).then( @@ -652,19 +654,19 @@ export default defineComponent({ }, customRequest(){ + let modelType = 'Library' + if(this.userInfo.userId == 88 || this.userInfo.userId == 83){ + modelType = this.modelType + } let new_data = { file:this.printObject.file, level1Type:'Models', level2Type:'', checkMd5:1, sex:this.sex, - modelType:'Library', + modelType:modelType, timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone, } - if(this.userInfo.userId == 88 || this.userInfo.userId == 833){ - new_data.modelType = this.modelType - // new_data.sex = this.sex - } this.isShowMark = true return new Promise((resolve,reject)=>{ Https.axiosPost(Https.httpUrls.libraryUpload, new_data,{headers:{'Content-Type': 'multipart/form-data'}}).then( @@ -710,20 +712,22 @@ export default defineComponent({ }, async getPrintLocation(){ let {width , height} = this.imgBox - if(this.modelType == 'System'){ - await new Promise((resolve, reject) => { - let img = new Image() - img.src = this.option.img - img.onload = () => { - width = img.width - height = img.height - resolve(true) - } - }) - } + // if(this.modelType == 'System'){ + // await new Promise((resolve, reject) => { + // let img = new Image() + // img.src = this.option.img + // img.onload = () => { + // width = img.width + // height = img.height + // resolve(true) + // } + // }) + // } + let locationData:any = {} let returnData:any = {} let newLocationList = JSON.parse(JSON.stringify(this.locationList)) + //进行字段归类 for(let item of newLocationList){ locationData[item.field] = locationData[item.field] || [] diff --git a/src/lang/en.ts b/src/lang/en.ts index 27ad73ce..055e69e5 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -595,6 +595,16 @@ export default { hisWorks:'His works', works:'Works', }, + createSlogan:{ + title:'Create Slogan', + Color:'Color', + FontAlign:'Font Align', + FontStyle:'Font Style', + FontFamily:'Font Family', + add:'Add', + delete:'Delete', + submit:'Submit', + }, guide:{ guide1:"You can personalize your design settings right here in the Workspace, including choosing to design for men's or women's wear, as well as selecting the mannequin to use for your creations.", guide2:"Select the apparel type you'd like to work on.", diff --git a/src/store/userHabit/userHabit.ts b/src/store/userHabit/userHabit.ts index 6c416250..794204ea 100644 --- a/src/store/userHabit/userHabit.ts +++ b/src/store/userHabit/userHabit.ts @@ -104,6 +104,7 @@ const userHabit : Module = { }, setMessageSystem(state,data){ let num = 0 + // let userInfo = ['-1'] let userInfo = ['followeeCount','followerCount'] let obj:any = {} for (const iterator in data) { @@ -112,8 +113,6 @@ const userHabit : Module = { store.commit('setUserInfo', obj) }else{ if(iterator != 'newPosted')num+=data[iterator] - console.log(iterator); - state.messageSystem.messageType[iterator] = data[iterator] } } diff --git a/src/tool/webSocket.js b/src/tool/webSocket.js index 2ddaa61f..df460689 100644 --- a/src/tool/webSocket.js +++ b/src/tool/webSocket.js @@ -21,10 +21,10 @@ class MyWs { } } this.ws.onclose = (e)=>{ - reconnection() + this.reconnection() } this.ws.onerror = (e)=>{ - reconnection() + this.reconnection() } } reconnection(){