diff --git a/.env.dev b/.env.dev index 51779256..cf4d024b 100644 --- a/.env.dev +++ b/.env.dev @@ -4,8 +4,8 @@ NODE_ENV = 'development' # VUE_APP_BASE_URL = 'http://18.167.251.121:10086' VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk' -VUE_APP_BASE_URL = 'https://www.api.aida.com.hk' +# VUE_APP_BASE_URL = 'https://www.api.aida.com.hk' # 佩佩 -VUE_APP_BASE_URL = 'http://192.168.1.7:5567' +# VUE_APP_BASE_URL = 'http://192.168.1.7:5567' # 海波 -# VUE_APP_BASE_URL = 'http://192.168.1.9:5567' +VUE_APP_BASE_URL = 'http://192.168.1.9:5567' diff --git a/public/css/roboto.css b/public/css/roboto.css index 5db1a7ad..6ddede4c 100644 --- a/public/css/roboto.css +++ b/public/css/roboto.css @@ -222,3 +222,9 @@ src: url(./woff/KFOlCnqEu92Fr1MmWUlfBBc4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } +@font-face { + font-family: 'pixel'; + font-style: normal; + font-weight: 500; + src: url('woff/pixel.ttf') format('truetype'); + } \ No newline at end of file diff --git a/public/css/sloganFamily.css b/public/css/sloganFamily.css index 59cdc89a..a6ae21ac 100644 --- a/public/css/sloganFamily.css +++ b/public/css/sloganFamily.css @@ -53,4 +53,4 @@ font-family: 'CN_slogan_art4'; font-weight: normal; src: url('slogan/CN_ZhiMangXing-Regular.ttf') format('truetype'); -} \ No newline at end of file +} diff --git a/public/css/woff/pixel.ttf b/public/css/woff/pixel.ttf new file mode 100644 index 00000000..3f445d46 Binary files /dev/null and b/public/css/woff/pixel.ttf differ diff --git a/public/image/mainImg/img1.png b/public/image/mainImg/img1.png deleted file mode 100644 index 37a436a7..00000000 Binary files a/public/image/mainImg/img1.png and /dev/null differ diff --git a/public/image/mainImg/img10.png b/public/image/mainImg/img10.png deleted file mode 100644 index ee511ac7..00000000 Binary files a/public/image/mainImg/img10.png and /dev/null differ diff --git a/public/image/mainImg/img2.png b/public/image/mainImg/img2.png deleted file mode 100644 index 000457a2..00000000 Binary files a/public/image/mainImg/img2.png and /dev/null differ diff --git a/public/image/mainImg/img3.png b/public/image/mainImg/img3.png deleted file mode 100644 index dc160d6f..00000000 Binary files a/public/image/mainImg/img3.png and /dev/null differ diff --git a/public/image/mainImg/img4.png b/public/image/mainImg/img4.png deleted file mode 100644 index 1b52ac31..00000000 Binary files a/public/image/mainImg/img4.png and /dev/null differ diff --git a/public/image/mainImg/img5.png b/public/image/mainImg/img5.png deleted file mode 100644 index 58ccb204..00000000 Binary files a/public/image/mainImg/img5.png and /dev/null differ diff --git a/public/image/mainImg/img6.png b/public/image/mainImg/img6.png deleted file mode 100644 index e210bbe6..00000000 Binary files a/public/image/mainImg/img6.png and /dev/null differ diff --git a/public/image/mainImg/img7.png b/public/image/mainImg/img7.png deleted file mode 100644 index bb329b97..00000000 Binary files a/public/image/mainImg/img7.png and /dev/null differ diff --git a/public/image/mainImg/img8.png b/public/image/mainImg/img8.png deleted file mode 100644 index fa81b846..00000000 Binary files a/public/image/mainImg/img8.png and /dev/null differ diff --git a/public/image/mainImg/img9.png b/public/image/mainImg/img9.png deleted file mode 100644 index 2a20dc59..00000000 Binary files a/public/image/mainImg/img9.png and /dev/null differ diff --git a/public/video/homeVideo.gif b/public/video/homeVideo.gif new file mode 100644 index 00000000..eae598f2 Binary files /dev/null and b/public/video/homeVideo.gif differ diff --git a/src/assets/style/style.css b/src/assets/style/style.css index 27ef28c5..d422b2e8 100644 --- a/src/assets/style/style.css +++ b/src/assets/style/style.css @@ -145,7 +145,7 @@ li { } } .ant-tooltip { - z-index: 2; + z-index: 1049 !important; } .ant-tooltip .ant-tooltip-inner { background: #343579; @@ -488,9 +488,6 @@ li { width: 0.8rem; height: 0.8rem; } -.trial_page .ant-tooltip { - z-index: 1049 !important; -} .trial_page .habit :deep(.ant-tooltip .ant-tooltip-inner), .trial_page :deep(.ant-tooltip-arrow-content) { background: #000 !important; diff --git a/src/assets/style/style.less b/src/assets/style/style.less index 9010b6bb..dd0a21a5 100644 --- a/src/assets/style/style.less +++ b/src/assets/style/style.less @@ -155,8 +155,7 @@ input:focus{ } .ant-tooltip{ // top: 74px !important; - z-index: 2; - + z-index: 1049 !important; .ant-tooltip-inner{ background: #343579; border-radius: 5px; @@ -542,9 +541,6 @@ input:focus{ } -.ant-tooltip{ - z-index: 1049 !important; -} .habit :deep(.ant-tooltip .ant-tooltip-inner) ,:deep(.ant-tooltip-arrow-content){ background: #000 !important; } diff --git a/src/component/Account/account.vue b/src/component/Account/account.vue index e7e57273..22c98b30 100644 --- a/src/component/Account/account.vue +++ b/src/component/Account/account.vue @@ -7,7 +7,7 @@
-
个人中心
+
{{$t('account.personCentered')}}
@@ -42,25 +42,27 @@ export default defineComponent({ components:{ }, setup() { + + const {t} = useI18n() const store = useStore(); let accountHomeData = reactive({ rootSubmenuKeys:[ { - name:'首页', + name:t('account.Home'), route:'/home/account/accountHome', icon:'fi-rr-house-chimney' },{ - name:'我的信息', + name:t('account.myInformation'), route:'/home/account/accountEdit', icon:'fi-rr-user' },{ - name:'消息中心', + name:t('account.Messages'), route:'/home/account/accountMessage', icon:'fi-rr-envelope' },{ - name:'关注&粉丝', + name:`${t('account.Follow')} ${t('account.Fans')}`, route:'/home/account/accountFollowFans', - icon:'fi-rr-envelope' + icon:'fi-rr-users-alt' }, ] }) @@ -119,6 +121,7 @@ export default defineComponent({ height: 10rem; color: #232323; div{ + white-space: nowrap; width: 15rem; color: #232323; text-align-last: justify; diff --git a/src/component/Account/accountEdit.vue b/src/component/Account/accountEdit.vue index 9d955ea5..e75cab27 100644 --- a/src/component/Account/accountEdit.vue +++ b/src/component/Account/accountEdit.vue @@ -25,20 +25,20 @@
-
用户名:
+
{{$t('account.userName')}}:
-
邮箱:
+
{{$t('account.email')}}:
- Submit + {{$t('account.Submit')}}
diff --git a/src/component/Account/accountFollowFans.vue b/src/component/Account/accountFollowFans.vue index 5f14c9cb..fcf02785 100644 --- a/src/component/Account/accountFollowFans.vue +++ b/src/component/Account/accountFollowFans.vue @@ -2,9 +2,9 @@
-
修改资料
+
{{$t('account.editUser')}}
-
+
diff --git a/src/component/Account/accountMessage.vue b/src/component/Account/accountMessage.vue index 8b5bb155..853a89c6 100644 --- a/src/component/Account/accountMessage.vue +++ b/src/component/Account/accountMessage.vue @@ -2,9 +2,9 @@
@@ -61,12 +61,13 @@ export default defineComponent({ comment, }, setup() { + const {t} = useI18n() const router = useRouter() const store = useStore(); let accountMessage = reactive({ messageList:[ { - title:'系统消息', + title:t('account.systemMessages'), key:'system', }, // { @@ -74,13 +75,13 @@ export default defineComponent({ // key:'privateChat', // }, { - title:'评论', + title:t('account.comment'), key:'comment', },{ - title:'点赞', + title:t('account.like'), key:'like', },{ - title:'新增粉丝', + title:t('account.NewFans'), key:'follow', }, // { @@ -148,8 +149,6 @@ export default defineComponent({ Https.axiosPost(url,data).then((rv)=>{ if(rv){ // domRefs[data.type][0].setmessageList(rv,data) - console.log(rv); - resolve(rv) } }).catch((err)=>{ diff --git a/src/component/Account/followFans/fans.vue b/src/component/Account/followFans/fans.vue index b20ac72c..83e241b5 100644 --- a/src/component/Account/followFans/fans.vue +++ b/src/component/Account/followFans/fans.vue @@ -25,7 +25,7 @@
- 没有任何信息~ + {{$t('account.dataNull')}}
diff --git a/src/component/Account/message/comment.vue b/src/component/Account/message/comment.vue index 5920e300..5afc9749 100644 --- a/src/component/Account/message/comment.vue +++ b/src/component/Account/message/comment.vue @@ -2,7 +2,7 @@
@@ -26,7 +26,7 @@
- 没有任何信息~ + {{$t('account.dataNull')}}
diff --git a/src/component/Account/message/likeMessage.vue b/src/component/Account/message/likeMessage.vue index 2fc7ac16..65399167 100644 --- a/src/component/Account/message/likeMessage.vue +++ b/src/component/Account/message/likeMessage.vue @@ -2,7 +2,7 @@
@@ -24,7 +24,7 @@
- 没有任何信息~ + {{$t('account.dataNull')}}
diff --git a/src/component/Account/message/newFollow.vue b/src/component/Account/message/newFollow.vue index 0835ad95..63f63dc4 100644 --- a/src/component/Account/message/newFollow.vue +++ b/src/component/Account/message/newFollow.vue @@ -2,7 +2,7 @@
- 没有任何信息~ + {{$t('account.dataNull')}}
diff --git a/src/component/Account/message/system.vue b/src/component/Account/message/system.vue index 8185f675..c9118ee3 100644 --- a/src/component/Account/message/system.vue +++ b/src/component/Account/message/system.vue @@ -2,7 +2,7 @@
diff --git a/src/component/Administrator/allUser.vue b/src/component/Administrator/allUser.vue index 9367efc9..4c7c520c 100644 --- a/src/component/Administrator/allUser.vue +++ b/src/component/Administrator/allUser.vue @@ -155,15 +155,19 @@ import { onMounted, } from "vue"; import { formatTime } from "@/tool/util"; +import { useStore } from "vuex"; import { Https } from "@/tool/https"; import allUserPoerationsVue from "./allUserPoerations.vue"; export default defineComponent({ components: {allUserPoerationsVue,}, setup() { + const store:any = useStore() let filter: any = reactive({ dataList: [], tableLoading: false, - allUserList: [], + allUserList: computed(()=>{ + return store.state.adminPage.allUserList + }), allCountry:[] }); let filterData: any = reactive({ @@ -478,10 +482,6 @@ export default defineComponent({ allUserPoerationsVue.value.init('Edit',data) } onMounted(() => { - let allUserList: any = sessionStorage.getItem("allUserList"); - if (allUserList) { - filter.allUserList = JSON.parse(allUserList); - } let allCountry: any = sessionStorage.getItem("allCountry"); if (allCountry) { filter.allCountry = JSON.parse(allCountry); diff --git a/src/component/Administrator/recentActiveChart.vue b/src/component/Administrator/recentActiveChart.vue index 0f984ecf..d0c866e1 100644 --- a/src/component/Administrator/recentActiveChart.vue +++ b/src/component/Administrator/recentActiveChart.vue @@ -60,13 +60,17 @@ import * as echarts from 'echarts/core'; import { TooltipComponent, LegendComponent } from 'echarts/components'; import { PieChart } from 'echarts/charts'; import { LabelLayout } from 'echarts/features'; +import { useStore } from "vuex"; import { CanvasRenderer } from 'echarts/renderers'; export default defineComponent({ components: { }, setup() { + const store:any = useStore() let filter:any = reactive({ - dataList:[], + dataList:computed(()=>{ + return store.state.adminPage.allUserList + }), }) let filterData:any = reactive({ @@ -77,19 +81,6 @@ export default defineComponent({ let searchHistoryList = ()=> { gettrialList(); } - let getUserIDName = ()=>{ - let allUserList:any = sessionStorage.getItem('allUserList'); - if(allUserList){ - filter.dataList = JSON.parse(allUserList) - } - // Https.axiosGet(Https.httpUrls.getAllUserId,).then((rv: any) => { - // if (rv) { - // let username = sessionStorage.getItem('allUserList'); - // sessionStorage.setItem('allUserList',rv); - // filter.dataList = rv - // } - // }) - } //获取列表 let gettrialList = async () =>{ filter.tableLoading = true @@ -203,7 +194,6 @@ export default defineComponent({ } onMounted(()=>{ lastGeTrialList('month') - getUserIDName() }) return { ...toRefs(filter), diff --git a/src/component/Administrator/trialAllUser.vue b/src/component/Administrator/trialAllUser.vue index 9e3675f5..1148a6c3 100644 --- a/src/component/Administrator/trialAllUser.vue +++ b/src/component/Administrator/trialAllUser.vue @@ -94,15 +94,19 @@ + diff --git a/src/component/HomePage/productImg.vue b/src/component/HomePage/productImg.vue index dc5b5831..dc8ec525 100644 --- a/src/component/HomePage/productImg.vue +++ b/src/component/HomePage/productImg.vue @@ -26,7 +26,7 @@
{{$t('ProductImg.MagicTools')}} - +
@@ -34,7 +34,7 @@ @@ -44,7 +44,7 @@ v-show="isTextarea" class="search_textarea " @keydown.enter="getPrductimg()" - v-model="searchName" + v-model="searchName[productimgMenu.value]" >
@@ -75,7 +75,20 @@ -->
- +
+ {{$t('ProductImg.Highlight')}} +
+
+ + + +
{{$t('ProductImg.SelectCollection')}}
@@ -162,7 +175,7 @@
-
+
@@ -213,6 +226,7 @@ :productData="{ upload:upload, similarity:similarity, + brightenValue:brightenValue, RelightDirection:RelightDirection, RelightDirectionList:RelightDirectionList, }" @@ -256,7 +270,10 @@ export default defineComponent({ let productImgData:any = reactive({ isShowMark:false, fileList:{}, - searchName:'', + searchName:{ + ToProductImage:'', + Relight:'', + }, isTextarea:false,//是否展开 remProductimg:false,//是否出现取消按钮 isProductimg:false,//开始生成 @@ -264,6 +281,7 @@ export default defineComponent({ generateList:[], likeList:[], similarity:30, + brightenValue:1, }) let productimgMenuList = ref([ { @@ -487,10 +505,11 @@ export default defineComponent({ } let imageStrength = productImgData.similarity == 100? 95 :productImgData.similarity let data:any ={ - prompt:productImgData.searchName, + prompt:productImgData.searchName[productimgMenu.value.value], toProductImageVOList:selectArr, userLikeGroupId:upload.value.userlikeGroupId, direction:RelightDirection.value, + brightenValue:productImgData.brightenValue, imageStrength:(100 - imageStrength)/100, } productImgData.isProductimg = true @@ -587,7 +606,11 @@ export default defineComponent({ if(generateProceedList){ // let str = generateProceedList.map((obj:any) => obj.taskId).join(','); let str = generateProceedList.join(',') - let data = {uniqueId:str,userId:JSON.parse(userInfo).userId,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone} + let data = { + uniqueId:str,userId:JSON.parse(userInfo).userId, + timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone, + type:productimgMenu.value.value, + } Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then( (rv) => { generateProceedList = [] @@ -607,6 +630,9 @@ export default defineComponent({ // scaleImage.value.isProductimg = false scaleImage.value.init(arr,index) scaleImage.value.isLike = false + scaleImage.value.productimgSearchName = productImgData.searchName[productimgMenu.value.value] + scaleImage.value.productimgSimilarity = productImgData.similarity + scaleImage.value.productimgRelightDirection = RelightDirection.value scaleImage.value.isComparison = true } let generalIsMenuShow:any = {} @@ -853,13 +879,17 @@ methods: { .productImg_left{ width: 25%; position: relative; + .Guide_1_32{ + height: 100%; + overflow-y: auto; + &.Guide_1_32::-webkit-scrollbar{display: none;} + } .upload_file_item{ display: flex; margin-right: 1rem; width: auto !important; height: 14rem !important; border: none !important; - margin-bottom: 0 !important; &.upload_file_item:last-child{ margin-right: 0rem; } diff --git a/src/component/HomePage/scaleImage.vue b/src/component/HomePage/scaleImage.vue index d8ba1eb8..a69f0a0f 100644 --- a/src/component/HomePage/scaleImage.vue +++ b/src/component/HomePage/scaleImage.vue @@ -71,7 +71,20 @@ -->
- +
+ {{$t('ProductImg.Highlight')}} +
+
+ + + +
@@ -140,12 +153,14 @@ export default defineComponent({ type:Object, default:{ similarity:30, + brightenValue:1, upload:'', }, } }, setup(props:any,{emit}) { const store = useStore(); + let productimg = reactive({ isProductimg:false, productimgSearchName:'', @@ -153,6 +168,7 @@ export default defineComponent({ productimgRemProductimg:false, productimgIsProductimg:false, productimgSimilarity:props.productData.similarity, + productimgBrightenValue:props.productData.brightenValue, productimgUpload:props.productData.upload, productimgRelightDirection:props.productData.RelightDirection, productimgRelightDirectionList:props.productData.RelightDirectionList, @@ -186,6 +202,7 @@ export default defineComponent({ direction:productimg.productimgRelightDirection, prompt:productimg.productimgSearchName, toProductImageVOList:[obj], + brightenValue:productimg.productimgBrightenValue, userLikeGroupId:productimg.productimgUpload.userlikeGroupId, imageStrength:(100 - imageStrength)/100, } @@ -268,7 +285,11 @@ export default defineComponent({ if(generateProceedList){ // let str = generateProceedList.map((obj:any) => obj.taskId).join(','); let str = generateProceedList.join(',') - let data = {uniqueId:str,userId:JSON.parse(userInfo).userId,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone} + let data = { + uniqueId:str, + userId:JSON.parse(userInfo).userId,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone, + type:scaleImageList.value[scaleImageIndex.value]?.resultType + } Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then( (rv) => { generateProceedList = [] diff --git a/src/lang/cn.ts b/src/lang/cn.ts index 2852a168..583f98ad 100644 --- a/src/lang/cn.ts +++ b/src/lang/cn.ts @@ -6,6 +6,7 @@ export default { HISTORY:'历史', WORKS:'作品广场', EVENTS:'活动', + personal:'个人中心', bindEmail:'绑定邮箱', logOff:'退出登录', Tutorial:'教程', @@ -159,6 +160,7 @@ export default { Upload:'上传', MagicTools:'转换产品图工具', Similarity:'相似度', + Highlight:'高亮', RelightDirection:'打光方向', GenerateProduct:'生成的产品', SelectedProduct:'选择的产品', @@ -556,6 +558,31 @@ export default { jsContent5:'是否删除当前作品', jsContent6:'作品被作者删除', }, + account:{ + personCentered:'个人中心', + myInformation:'我的信息', + Home:'首页', + Messages:'消息中心', + Follow:'关注', + Fans:'粉丝', + editUser:'修改个人信息', + //编辑个人信息页 + userName:'用户名', + email:'邮箱', + Submit:'提交', + //消息 + systemMessages:'系统消息', + comment:'评论', + like:'点赞', + NewFans:'新增粉丝', + AllRead:'全部已读', + dataNull:'没有任何信息~', + reply:'评论你的作品', + followedYou:'关注了你', + likedYourWork:'赞了你的作品', + //互动 + Interact:'互动', + }, guide:{ guide1:"在工作空间中,您可以个性化您的设计设置,包括选择适用于男装或女装的设计,以及选择用于创作的人体模型。", guide2:"选择您要设计的服装性别。", diff --git a/src/lang/en.ts b/src/lang/en.ts index 6a1a80f3..e11a24e0 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -6,6 +6,7 @@ export default { HISTORY:'HISTORY', WORKS:'GALLERY', EVENTS:'EVENTS', + personal:'Personal Center', bindEmail:'bind email', logOff:'log off', Tutorial:'Tutorial', @@ -39,7 +40,6 @@ export default { createTime:'Create Time', }, payOrder:{ - OrderInformation:'Order Information', CreditsInformation:'Credits Information', }, @@ -159,6 +159,7 @@ export default { SelectCollection:'Select Collection', Upload:'Upload', Similarity:'Similarity', + Highlight:'Highlight', RelightDirection:'Relight Direction', MagicTools:'To Product lmage Tool', GenerateProduct:'Generate Product', @@ -557,6 +558,31 @@ export default { jsContent5:'Whether to delete the current gallery', jsContent6:'The author deleted the work', }, + account:{ + personCentered:'Account', + myInformation:'My Details', + Home:'Home', + Messages:'Messages', + Follow:'Follow', + Fans:'Fans', + editUser:'Change Information', + //编辑个人信息页 + userName:'User Name', + email:'Email', + Submit:'Submit', + //消息 + systemMessages:'System Messages', + comment:'Comment', + like:'Like', + NewFans:'New fans', + AllRead:'All read', + dataNull:'no message~', + reply:'commented on your work', + followedYou:'followed you', + likedYourWork:'liked your work', + //互动 + Interact:'interact', + }, 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/adminPage/adminPage.ts b/src/store/adminPage/adminPage.ts new file mode 100644 index 00000000..eac5bc73 --- /dev/null +++ b/src/store/adminPage/adminPage.ts @@ -0,0 +1,23 @@ +import {Module} from 'vuex' +import {RootState} from '../index' + +interface DesignDetail{ + allUserList:any, + +} + +const adminPage : Module = { + state:{ + allUserList:[], + }, + mutations:{ + setAllUserList(state,files){ + state.allUserList = files + }, + }, + actions:{ + + } +} + +export default adminPage \ No newline at end of file diff --git a/src/store/index.ts b/src/store/index.ts index 7ee7735b..f7e11bf6 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -5,6 +5,7 @@ import HomeStoreModule from './homeStore/homeStore' import UserHabit from './userHabit/userHabit' import Workspace from './workspace/workspace' import Guide from './guide/guide' +import adminPage from './adminPage/adminPage' export interface RootState{ } @@ -25,5 +26,6 @@ export default createStore({ UserHabit, Workspace, Guide, + adminPage, } }) diff --git a/src/store/userHabit/userHabit.ts b/src/store/userHabit/userHabit.ts index 5343137d..d9eeb852 100644 --- a/src/store/userHabit/userHabit.ts +++ b/src/store/userHabit/userHabit.ts @@ -91,17 +91,20 @@ const userHabit : Module = { setMessageSystem(state,data){ let num = 0 for (const iterator in data) { - num+=data[iterator] - if(!state.messageSystem.messageType[iterator]){ - state.messageSystem.messageType[iterator] = data[iterator] - }else{ - for (const key in state.messageSystem.messageType) { - if(key == iterator){ - state.messageSystem.messageType[key] = data[iterator] - break - } - } + if(iterator != 'newPosted'){ + num+=data[iterator] } + state.messageSystem.messageType[iterator] = data[iterator] + // if(!state.messageSystem.messageType[iterator]){ + // state.messageSystem.messageType[iterator] = data[iterator] + // }else{ + // for (const key in state.messageSystem.messageType) { + // if(key == iterator){ + // state.messageSystem.messageType[key] = data[iterator] + // break + // } + // } + // } } state.messageSystem.messageNum = num }, diff --git a/src/tool/https.js b/src/tool/https.js index a040fe08..37696fa8 100644 --- a/src/tool/https.js +++ b/src/tool/https.js @@ -87,6 +87,7 @@ axios.interceptors.response.use((res) =>{ } }, function(error) { if(error?.response?.status === 401 && router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login + return clonAllCookie() if(!isLoginTime){ isLoginTime = true diff --git a/src/tool/util.js b/src/tool/util.js index 4b52297a..723c77f3 100644 --- a/src/tool/util.js +++ b/src/tool/util.js @@ -436,27 +436,28 @@ function segmentImage(markerImage,fullImage,size){ const ctx1 = markerCanvas.getContext('2d'); const ctx2 = fullCanvas.getContext('2d'); const ctx3 = nullCanvas.getContext('2d'); - let targetMarkerUrl = '' - let targetFullUrl = '' + markerCanvas.width=size.width + markerCanvas.height=size.height + fullCanvas.height=size.height + fullCanvas.width=size.width + nullCanvas.height=size.height + nullCanvas.width=size.width + let targetFrontUrl = '' + let targetBackUrl = '' const marker = new Image(); const full = new Image(); - marker.width = size.width; - marker.height = size.height; - full.width = size.width; - full.height = size.height; - console.log(full); marker.crossOrigin = 'anonymous'; full.crossOrigin = 'anonymous'; marker.onload = () => { ctx1.drawImage(marker,0,0 ,size.width, size.height); full.onload = () => { ctx2.drawImage(full,0,0, size.width, size.height); - segmentImage(); + segmentImageItem(); }; + full.src = fullImage; }; marker.src = markerImage; - full.src = fullImage; - function segmentImage() { + function segmentImageItem() { const markerData = ctx1.getImageData(0, 0, size.width, size.height); const fullData = ctx2.getImageData(0, 0, size.width, size.height); @@ -464,12 +465,17 @@ function segmentImage(markerImage,fullImage,size){ const color1 = { r: 255, g: 0, b: 0 }; // 第一个颜色 const color2 = { r: 0, g: 255, b: 0 }; // 第二个颜色 - const threshold = 50; // 颜色匹配的容差 + const threshold = 100; // 颜色匹配的容差 + + // const isColorMatch = (r, g, b, color) => + // (Math.abs(r - color.r) < threshold) || (Math.abs(0 - color.r) < threshold) && + // (Math.abs(g - color.g) < threshold) || (Math.abs(0 - color.g) < threshold) && + // (Math.abs(b - color.b) < threshold) || (Math.abs(0 - color.b) < threshold) const isColorMatch = (r, g, b, color) => - Math.abs(r - color.r) < threshold && - Math.abs(g - color.g) < threshold && - Math.abs(b - color.b) < threshold; + (Math.abs(r - color.r) < threshold || Math.abs(0 - color.r) < threshold) && + (Math.abs(g - color.g) < threshold || Math.abs(0 - color.g) < threshold) && + (Math.abs(b - color.b) < threshold || Math.abs(0 - color.b) < threshold) const output1 = ctx3.createImageData(size.width, size.height); const output2 = ctx3.createImageData(size.width, size.height); @@ -523,10 +529,9 @@ function segmentImage(markerImage,fullImage,size){ ctx.putImageData(imageData, 0, 0); return canvas.toDataURL('image/png'); }; - targetMarkerUrl =createImageURL(output1) - targetFullUrl =createImageURL(output2) - console.log(targetFullUrl,targetMarkerUrl); - resolve({targetMarkerUrl, targetFullUrl}) + targetBackUrl =createImageURL(output2) + targetFrontUrl =createImageURL(output1) + resolve({targetFrontUrl, targetBackUrl}) } }) } diff --git a/src/views/Administrator.vue b/src/views/Administrator.vue index b7e30a6e..dfdadfb7 100644 --- a/src/views/Administrator.vue +++ b/src/views/Administrator.vue @@ -81,6 +81,7 @@ import { getUploadUrl } from "@/tool/util"; import scaleImage from "@/component/HomePage/scaleImage.vue"; import { openGuide,driverObj__,driverIndex__ } from "@/tool/guide"; import { useI18n } from "vue-i18n"; +import store from "@/store"; export default defineComponent({ components: { MailOutlined, @@ -90,7 +91,8 @@ export default defineComponent({ props: ["msg",'sketchCatecoryList'], setup() { const router = useRouter() - const route:any = useRoute() + // const route:any = useRoute() + const store:any = useStore() const state:any = reactive({ rootSubmenuKeys: [{ name:'All User', @@ -263,7 +265,7 @@ export default defineComponent({ //储存所有用户id和name Https.axiosGet(Https.httpUrls.getAllUserId,).then((rv: any) => { if (rv) { - sessionStorage.setItem('allUserList',JSON.stringify(rv)); + store.commit('setAllUserList',rv); } }) let allCountry = country diff --git a/src/views/HomeMain.vue b/src/views/HomeMain.vue index 30b57d5e..f2692841 100644 --- a/src/views/HomeMain.vue +++ b/src/views/HomeMain.vue @@ -14,20 +14,20 @@
{{ userInfo?.followeeCount }}
- 关注 + {{$t('account.Follow')}}
{{ userInfo?.followerCount }}
- 粉丝 + {{$t('account.Fans')}}
-
+
-
个人中心
+
{{$t('Header.personal')}}
@@ -48,11 +48,7 @@ >
-
- - - -
+
@@ -85,11 +81,29 @@ -->
- + /> --> +
+
+ + + +
+ +
+ + + + +
+ +
+
+
+