@@ -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')}}