This commit is contained in:
X1627315083
2024-09-03 16:39:06 +08:00
54 changed files with 1298 additions and 723 deletions

View File

@@ -4,8 +4,8 @@ NODE_ENV = 'development'
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086' # 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://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'

View File

@@ -222,3 +222,9 @@
src: url(./woff/KFOlCnqEu92Fr1MmWUlfBBc4.woff2) format('woff2'); 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; 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');
}

BIN
public/css/woff/pixel.ttf Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 443 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 KiB

BIN
public/video/homeVideo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 MiB

View File

@@ -145,7 +145,7 @@ li {
} }
} }
.ant-tooltip { .ant-tooltip {
z-index: 2; z-index: 1049 !important;
} }
.ant-tooltip .ant-tooltip-inner { .ant-tooltip .ant-tooltip-inner {
background: #343579; background: #343579;
@@ -488,9 +488,6 @@ li {
width: 0.8rem; width: 0.8rem;
height: 0.8rem; height: 0.8rem;
} }
.trial_page .ant-tooltip {
z-index: 1049 !important;
}
.trial_page .habit :deep(.ant-tooltip .ant-tooltip-inner), .trial_page .habit :deep(.ant-tooltip .ant-tooltip-inner),
.trial_page :deep(.ant-tooltip-arrow-content) { .trial_page :deep(.ant-tooltip-arrow-content) {
background: #000 !important; background: #000 !important;

View File

@@ -155,8 +155,7 @@ input:focus{
} }
.ant-tooltip{ .ant-tooltip{
// top: 74px !important; // top: 74px !important;
z-index: 2; z-index: 1049 !important;
.ant-tooltip-inner{ .ant-tooltip-inner{
background: #343579; background: #343579;
border-radius: 5px; 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){ .habit :deep(.ant-tooltip .ant-tooltip-inner) ,:deep(.ant-tooltip-arrow-content){
background: #000 !important; background: #000 !important;
} }

View File

@@ -7,7 +7,7 @@
<div class="account_page_content"> <div class="account_page_content">
<div class="account_page_content_left"> <div class="account_page_content_left">
<div class="content_left_item"> <div class="content_left_item">
<div>个人中心</div> <div>{{$t('account.personCentered')}}</div>
</div> </div>
<!-- {{ router.path }} --> <!-- {{ router.path }} -->
<router-link class="content_left_item" v-for="item in rootSubmenuKeys" :class="{active: $route.path == item.route}" :to="item.route"> <router-link class="content_left_item" v-for="item in rootSubmenuKeys" :class="{active: $route.path == item.route}" :to="item.route">
@@ -42,25 +42,27 @@ export default defineComponent({
components:{ components:{
}, },
setup() { setup() {
const {t} = useI18n()
const store = useStore(); const store = useStore();
let accountHomeData = reactive({ let accountHomeData = reactive({
rootSubmenuKeys:[ rootSubmenuKeys:[
{ {
name:'首页', name:t('account.Home'),
route:'/home/account/accountHome', route:'/home/account/accountHome',
icon:'fi-rr-house-chimney' icon:'fi-rr-house-chimney'
},{ },{
name:'我的信息', name:t('account.myInformation'),
route:'/home/account/accountEdit', route:'/home/account/accountEdit',
icon:'fi-rr-user' icon:'fi-rr-user'
},{ },{
name:'消息中心', name:t('account.Messages'),
route:'/home/account/accountMessage', route:'/home/account/accountMessage',
icon:'fi-rr-envelope' icon:'fi-rr-envelope'
},{ },{
name:'关注&粉丝', name:`${t('account.Follow')} ${t('account.Fans')}`,
route:'/home/account/accountFollowFans', route:'/home/account/accountFollowFans',
icon:'fi-rr-envelope' icon:'fi-rr-users-alt'
}, },
] ]
}) })
@@ -119,6 +121,7 @@ export default defineComponent({
height: 10rem; height: 10rem;
color: #232323; color: #232323;
div{ div{
white-space: nowrap;
width: 15rem; width: 15rem;
color: #232323; color: #232323;
text-align-last: justify; text-align-last: justify;

View File

@@ -25,20 +25,20 @@
</div> </div>
<div class="accountEdit_page_body"> <div class="accountEdit_page_body">
<div class="accountEdit_page_body_item"> <div class="accountEdit_page_body_item">
<div class="accountEdit_page_body_item_name">用户名:</div> <div class="accountEdit_page_body_item_name">{{$t('account.userName')}}:</div>
<div class="accountEdit_page_body_item_inut"> <div class="accountEdit_page_body_item_inut">
<input type="text" disabled :value="cookieUserInfo.userName"> <input type="text" disabled :value="cookieUserInfo.userName">
</div> </div>
</div> </div>
<div class="accountEdit_page_body_item"> <div class="accountEdit_page_body_item">
<div class="accountEdit_page_body_item_name">邮箱:</div> <div class="accountEdit_page_body_item_name">{{$t('account.email')}}:</div>
<div class="accountEdit_page_body_item_inut"> <div class="accountEdit_page_body_item_inut">
<input type="text" disabled :value="cookieUserInfo.email"> <input type="text" disabled :value="cookieUserInfo.email">
</div> </div>
</div> </div>
<div class="accountEdit_page_body_item"> <div class="accountEdit_page_body_item">
<div class="started_btn" @click="setSubmit"> <div class="started_btn" @click="setSubmit">
Submit {{$t('account.Submit')}}
</div> </div>
</div> </div>
</div> </div>

View File

@@ -2,9 +2,9 @@
<div class="account_followFans"> <div class="account_followFans">
<div class="account_followFans_title modal_title_text"> <div class="account_followFans_title modal_title_text">
<div class=""> <div class="">
互动 {{$t('account.Interact')}}
</div> </div>
<div class="account_followFans_title_setting">设置</div> <!-- <div class="account_followFans_title_setting">设置</div> -->
</div> </div>
<a-tabs class="account_followFans_body" v-model:activeKey="activeKey" @change="changeTabs"> <a-tabs class="account_followFans_body" v-model:activeKey="activeKey" @change="changeTabs">
<a-tab-pane v-for="item in messageList" :key="item.key"> <a-tab-pane v-for="item in messageList" :key="item.key">
@@ -53,14 +53,15 @@ export default defineComponent({
setup() { setup() {
const router = useRouter() const router = useRouter()
const store = useStore(); const store = useStore();
const {t} = useI18n()
let accountMessage = reactive({ let accountMessage = reactive({
messageList:[ messageList:[
{ {
title:'关注的人', title:t('account.Follow'),
key:'follow', key:'follow',
}, },
{ {
title:'粉丝', title:t('account.Fans'),
key:'fans', key:'fans',
}, },

View File

@@ -9,24 +9,24 @@
<div class="content_item_user_left_detail"> <div class="content_item_user_left_detail">
<div class="modal_title_text"> <div class="modal_title_text">
<div>{{ cookieUserInfo.userName }}</div> <div>{{ cookieUserInfo.userName }}</div>
<div class="modal_title_text_assistant"><span>邮箱: </span>{{ cookieUserInfo?.email }}</div> <div class="modal_title_text_assistant"><span>{{$t('account.email')}}: </span>{{ cookieUserInfo?.email }}</div>
</div> </div>
<div class="content_item_user_left_detail_bottom"> <div class="content_item_user_left_detail_bottom">
<div> <div>
<span>关注</span>{{ userInfo?.followeeCount }} <span>{{$t('account.Follow')}}</span>{{ userInfo?.followeeCount }}
</div> </div>
<div> <div>
<span>粉丝</span>{{ userInfo?.followerCount }} <span>{{$t('account.Fans')}}</span>{{ userInfo?.followerCount }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="content_item_user_right"> <div class="content_item_user_right">
<div @click="setUserData">修改资料</div> <div @click="setUserData">{{$t('account.editUser')}}</div>
</div> </div>
</div> </div>
<div class="content_item content_item_task"> <div class="content_item content_item_task">
<div class="content_item_title"> <!-- <div class="content_item_title">
<i>icon</i> <i>icon</i>
<div>每日奖励</div> <div>每日奖励</div>
</div> </div>
@@ -55,7 +55,7 @@
20 Credits 到手 20 Credits 到手
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>

View File

@@ -2,9 +2,9 @@
<div class="account_message"> <div class="account_message">
<div class="account_message_title modal_title_text"> <div class="account_message_title modal_title_text">
<div class=""> <div class="">
消息中心 {{$t('account.Messages')}}
</div> </div>
<div class="account_message_title_setting">设置</div> <!-- <div class="account_message_title_setting">设置</div> -->
</div> </div>
<a-tabs class="account_message_body" v-model:activeKey="activeKey" @change="changeTabs"> <a-tabs class="account_message_body" v-model:activeKey="activeKey" @change="changeTabs">
<a-tab-pane v-for="item in messageList" :key="item.key"> <a-tab-pane v-for="item in messageList" :key="item.key">
@@ -61,12 +61,13 @@ export default defineComponent({
comment, comment,
}, },
setup() { setup() {
const {t} = useI18n()
const router = useRouter() const router = useRouter()
const store = useStore(); const store = useStore();
let accountMessage = reactive({ let accountMessage = reactive({
messageList:[ messageList:[
{ {
title:'系统消息', title:t('account.systemMessages'),
key:'system', key:'system',
}, },
// { // {
@@ -74,13 +75,13 @@ export default defineComponent({
// key:'privateChat', // key:'privateChat',
// }, // },
{ {
title:'评论', title:t('account.comment'),
key:'comment', key:'comment',
},{ },{
title:'点赞', title:t('account.like'),
key:'like', key:'like',
},{ },{
title:'新增粉丝', title:t('account.NewFans'),
key:'follow', key:'follow',
}, },
// { // {
@@ -148,8 +149,6 @@ export default defineComponent({
Https.axiosPost(url,data).then((rv)=>{ Https.axiosPost(url,data).then((rv)=>{
if(rv){ if(rv){
// domRefs[data.type][0].setmessageList(rv,data) // domRefs[data.type][0].setmessageList(rv,data)
console.log(rv);
resolve(rv) resolve(rv)
} }
}).catch((err)=>{ }).catch((err)=>{

View File

@@ -25,7 +25,7 @@
</div> </div>
</div> </div>
<div class="account_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && getListData.isNoData"> <div class="account_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && getListData.isNoData">
没有任何信息~ {{$t('account.dataNull')}}
</div> </div>
<div class="page_loading_box" v-show="!getListData.isNoData"> <div class="page_loading_box" v-show="!getListData.isNoData">
<span class="page_loading" ref="loadingDom" v-show="!getListData.isShowMark"></span> <span class="page_loading" ref="loadingDom" v-show="!getListData.isShowMark"></span>

View File

@@ -2,7 +2,7 @@
<div class="account_comment"> <div class="account_comment">
<div class="account_generalMessage_title modal_title_text"> <div class="account_generalMessage_title modal_title_text">
<!-- <span>收到的评论</span> --> <!-- <span>收到的评论</span> -->
<div class="account_generalMessage_title_setting" @click="allRead">全部已读</div> <div class="account_generalMessage_title_setting" @click="allRead">{{$t('account.AllRead')}}</div>
</div> </div>
<div class="account_generalMessage_center modal_title_text"> <div class="account_generalMessage_center modal_title_text">
@@ -13,7 +13,7 @@
<img :src="item.avatar" alt=""> <img :src="item.avatar" alt="">
</div> </div>
<div class="account_generalMessage_item_right_title"> <div class="account_generalMessage_item_right_title">
<div class="account_generalMessage_item_right_title_name">{{ item.userName }} <span>回复你的作品</span></div> <div class="account_generalMessage_item_right_title_name">{{ item.userName }} <span>{{$t('account.reply')}}</span></div>
<div class="account_generalMessage_item_right_title_center modal_title_text_assistant">{{ item.content }}</div> <div class="account_generalMessage_item_right_title_center modal_title_text_assistant">{{ item.content }}</div>
<div class="account_generalMessage_item_right_works modal_title_text_intro" @click.stop="openOtherWork(item)">{{ item.portfolioName }}</div> <div class="account_generalMessage_item_right_works modal_title_text_intro" @click.stop="openOtherWork(item)">{{ item.portfolioName }}</div>
</div> </div>
@@ -26,7 +26,7 @@
</div> </div>
</div> </div>
<div class="account_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && isNoData"> <div class="account_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && isNoData">
没有任何信息~ {{$t('account.dataNull')}}
</div> </div>
<div class="page_loading_box" v-show="!isNoData"> <div class="page_loading_box" v-show="!isNoData">
<span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span> <span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span>

View File

@@ -2,7 +2,7 @@
<div class="account_like"> <div class="account_like">
<div class="account_generalMessage_title modal_title_text"> <div class="account_generalMessage_title modal_title_text">
<!-- <span>点赞</span> --> <!-- <span>点赞</span> -->
<div class="account_generalMessage_title_setting" @click="allRead">全部已读</div> <div class="account_generalMessage_title_setting" @click="allRead">{{$t('account.AllRead')}}</div>
</div> </div>
<div class="account_generalMessage_center modal_title_text"> <div class="account_generalMessage_center modal_title_text">
<div class="account_generalMessage_item" v-for="item in dataList" :key="item.id" @click="setRead(item)"> <div class="account_generalMessage_item" v-for="item in dataList" :key="item.id" @click="setRead(item)">
@@ -12,7 +12,7 @@
<img :src="item.avatar" alt=""> <img :src="item.avatar" alt="">
</div> </div>
<div class="account_generalMessage_item_right_title"> <div class="account_generalMessage_item_right_title">
<div class="account_generalMessage_item_right_title_name">{{ item.userName }} <span>攒了你的作品</span></div> <div class="account_generalMessage_item_right_title_name">{{ item.userName }} <span>{{$t('account.likedYourWork')}}</span></div>
<div>{{ item.portfolioName }}</div> <div>{{ item.portfolioName }}</div>
</div> </div>
</div> </div>
@@ -24,7 +24,7 @@
</div> </div>
</div> </div>
<div class="account_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && isNoData"> <div class="account_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && isNoData">
没有任何信息~ {{$t('account.dataNull')}}
</div> </div>
<div class="page_loading_box" v-show="!isNoData"> <div class="page_loading_box" v-show="!isNoData">
<span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span> <span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span>

View File

@@ -2,7 +2,7 @@
<div class="account_newFollow"> <div class="account_newFollow">
<div class="account_generalMessage_title modal_title_text"> <div class="account_generalMessage_title modal_title_text">
<!-- <span>新增粉丝</span> --> <!-- <span>新增粉丝</span> -->
<div class="account_generalMessage_title_setting" @click="allRead">全部已读</div> <div class="account_generalMessage_title_setting" @click="allRead">{{$t('account.AllRead')}}</div>
</div> </div>
<div class="account_generalMessage_center modal_title_text"> <div class="account_generalMessage_center modal_title_text">
<div class="account_generalMessage_item" v-for="item in dataList" :key="item.id" @click="setRead(item)"> <div class="account_generalMessage_item" v-for="item in dataList" :key="item.id" @click="setRead(item)">
@@ -13,7 +13,7 @@
</div> </div>
<div class="account_generalMessage_item_right_title"> <div class="account_generalMessage_item_right_title">
<div class="">{{ item.userName }}</div> <div class="">{{ item.userName }}</div>
<div class="modal_title_text_intro">{{ item.createTime }} 关注了你</div> <div class="modal_title_text_intro">{{ item.createTime }} {{$t('account.followedYou')}}</div>
</div> </div>
</div> </div>
<div class="account_generalMessage_item_left"> <div class="account_generalMessage_item_left">
@@ -22,7 +22,7 @@
</div> </div>
</div> </div>
<div class="account_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && isNoData"> <div class="account_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && isNoData">
没有任何信息~ {{$t('account.dataNull')}}
</div> </div>
<div class="page_loading_box" v-show="!isNoData"> <div class="page_loading_box" v-show="!isNoData">
<span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span> <span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span>

View File

@@ -2,7 +2,7 @@
<div class="account_systemMessage"> <div class="account_systemMessage">
<div class="account_generalMessage_title modal_title_text"> <div class="account_generalMessage_title modal_title_text">
<!-- <span>系统消息</span> --> <!-- <span>系统消息</span> -->
<div class="account_generalMessage_title_setting" @click="allRead">全部已读</div> <div class="account_generalMessage_title_setting" @click="allRead">{{$t('account.AllRead')}}</div>
</div> </div>
<div class="account_generalMessage_item modal_title_text" v-for="item in dataList" :key="item.id" @click="setRead(item)"> <div class="account_generalMessage_item modal_title_text" v-for="item in dataList" :key="item.id" @click="setRead(item)">
<a-badge :dot="item.isRead == 0"></a-badge> <a-badge :dot="item.isRead == 0"></a-badge>
@@ -16,7 +16,7 @@
</div> </div>
</div> </div>
<div class="account_generalMessage_item modal_title_text" style="display:flex;justify-content: center;" v-if="dataList.length == 0 && isNoData"> <div class="account_generalMessage_item modal_title_text" style="display:flex;justify-content: center;" v-if="dataList.length == 0 && isNoData">
没有任何信息~ {{$t('account.dataNull')}}
</div> </div>
<div class="page_loading_box" v-show="!isNoData"> <div class="page_loading_box" v-show="!isNoData">
<span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span> <span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span>

View File

@@ -155,15 +155,19 @@ import {
onMounted, onMounted,
} from "vue"; } from "vue";
import { formatTime } from "@/tool/util"; import { formatTime } from "@/tool/util";
import { useStore } from "vuex";
import { Https } from "@/tool/https"; import { Https } from "@/tool/https";
import allUserPoerationsVue from "./allUserPoerations.vue"; import allUserPoerationsVue from "./allUserPoerations.vue";
export default defineComponent({ export default defineComponent({
components: {allUserPoerationsVue,}, components: {allUserPoerationsVue,},
setup() { setup() {
const store:any = useStore()
let filter: any = reactive({ let filter: any = reactive({
dataList: [], dataList: [],
tableLoading: false, tableLoading: false,
allUserList: [], allUserList: computed(()=>{
return store.state.adminPage.allUserList
}),
allCountry:[] allCountry:[]
}); });
let filterData: any = reactive({ let filterData: any = reactive({
@@ -478,10 +482,6 @@ export default defineComponent({
allUserPoerationsVue.value.init('Edit',data) allUserPoerationsVue.value.init('Edit',data)
} }
onMounted(() => { onMounted(() => {
let allUserList: any = sessionStorage.getItem("allUserList");
if (allUserList) {
filter.allUserList = JSON.parse(allUserList);
}
let allCountry: any = sessionStorage.getItem("allCountry"); let allCountry: any = sessionStorage.getItem("allCountry");
if (allCountry) { if (allCountry) {
filter.allCountry = JSON.parse(allCountry); filter.allCountry = JSON.parse(allCountry);

View File

@@ -60,13 +60,17 @@ import * as echarts from 'echarts/core';
import { TooltipComponent, LegendComponent } from 'echarts/components'; import { TooltipComponent, LegendComponent } from 'echarts/components';
import { PieChart } from 'echarts/charts'; import { PieChart } from 'echarts/charts';
import { LabelLayout } from 'echarts/features'; import { LabelLayout } from 'echarts/features';
import { useStore } from "vuex";
import { CanvasRenderer } from 'echarts/renderers'; import { CanvasRenderer } from 'echarts/renderers';
export default defineComponent({ export default defineComponent({
components: { components: {
}, },
setup() { setup() {
const store:any = useStore()
let filter:any = reactive({ let filter:any = reactive({
dataList:[], dataList:computed(()=>{
return store.state.adminPage.allUserList
}),
}) })
let filterData:any = reactive({ let filterData:any = reactive({
@@ -77,19 +81,6 @@ export default defineComponent({
let searchHistoryList = ()=> { let searchHistoryList = ()=> {
gettrialList(); 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 () =>{ let gettrialList = async () =>{
filter.tableLoading = true filter.tableLoading = true
@@ -203,7 +194,6 @@ export default defineComponent({
} }
onMounted(()=>{ onMounted(()=>{
lastGeTrialList('month') lastGeTrialList('month')
getUserIDName()
}) })
return { return {
...toRefs(filter), ...toRefs(filter),

View File

@@ -94,15 +94,19 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, createVNode, computed, reactive, toRefs, onMounted } from "vue"; import { defineComponent, ref, createVNode, computed, reactive, toRefs, onMounted } from "vue";
import { formatTime } from "@/tool/util"; import { formatTime } from "@/tool/util";
import { useStore } from "vuex";
import { Https } from "@/tool/https"; import { Https } from "@/tool/https";
export default defineComponent({ export default defineComponent({
components: { components: {
}, },
setup() { setup() {
const store:any = useStore()
let filter:any = reactive({ let filter:any = reactive({
dataList:[], dataList:[],
tableLoading:false, tableLoading:false,
allUserList: [], allUserList: computed(()=>{
return store.state.adminPage.allUserList
}),
allCountry:[] allCountry:[]
}) })
let filterData:any = reactive({ let filterData:any = reactive({
@@ -261,10 +265,6 @@ export default defineComponent({
gettrialList(); gettrialList();
} }
onMounted(()=>{ onMounted(()=>{
let allUserList: any = sessionStorage.getItem("allUserList");
if (allUserList) {
filter.allUserList = JSON.parse(allUserList);
}
let allCountry: any = sessionStorage.getItem("allCountry"); let allCountry: any = sessionStorage.getItem("allCountry");
if (allCountry) { if (allCountry) {
filter.allCountry = JSON.parse(allCountry); filter.allCountry = JSON.parse(allCountry);

View File

@@ -59,7 +59,7 @@
<!-- 全屏 --> <!-- 全屏 -->
<i class="fi fi-bs-expand-arrows-alt" @click="showDesignImgDetail(2)"></i> <i class="fi fi-bs-expand-arrows-alt" @click="showDesignImgDetail(2)"></i>
<!-- 编辑 --> <!-- 编辑 -->
<i v-show="!body" class="fi fi-rr-edit" :title="$t('DesignDetail.editTitle')" @click="showDesignImgDetail(3)"></i> <i class="fi fi-rr-edit" :title="$t('DesignDetail.editTitle')" @click="showDesignImgDetail(3)"></i>
<i v-show="!body && !deleteShow" :title="$t('DesignDetail.DetailTitle')" class="fi fi-rr-trash" @click="deleteNav(0)"></i> <i v-show="!body && !deleteShow" :title="$t('DesignDetail.DetailTitle')" class="fi fi-rr-trash" @click="deleteNav(0)"></i>
<i v-show="!body && deleteShow" class="fi fi-br-check" @click="deleteNav(1)"></i> <i v-show="!body && deleteShow" class="fi fi-br-check" @click="deleteNav(1)"></i>
@@ -470,6 +470,9 @@ export default defineComponent({
}else{ }else{
this.designShowPrview = 1; this.designShowPrview = 1;
this.frontBack = {}
let setDesignItem:any = isMoible() ? this.$refs.setDesignItemMobile : this.$refs.setDesignItem
setDesignItem.clear()
// this.designItemDetailUrl = {} // this.designItemDetailUrl = {}
} }
}, },
@@ -741,6 +744,8 @@ export default defineComponent({
changed:item.changed?item.changed:false, changed:item.changed?item.changed:false,
designType:item.designType?item.designType:"Library", designType:item.designType?item.designType:"Library",
offset:item.layersObject?.[1]?.offset == null?[0,0]:item.layersObject[1].offset, offset:item.layersObject?.[1]?.offset == null?[0,0]:item.layersObject[1].offset,
maskMinioUrl:item.layersObject[1].maskMinioUrl,
maskUrl:item.layersObject[1].maskUrl,
scale:item.layersObject?.[1]?.scale?item.layersObject[1].scale:[1,1], scale:item.layersObject?.[1]?.scale?item.layersObject[1].scale:[1,1],
printObject:{ printObject:{
// path:item.printObject.path?item.printObject.path :'', // path:item.printObject.path?item.printObject.path :'',
@@ -937,6 +942,7 @@ export default defineComponent({
designItemDetail.clothes[this.currentIndex].minIOPath = rv.clothes[this.currentIndex].minIOPath designItemDetail.clothes[this.currentIndex].minIOPath = rv.clothes[this.currentIndex].minIOPath
this.current.path = rv.clothes[this.currentIndex].minIOPath this.current.path = rv.clothes[this.currentIndex].minIOPath
designItemDetail.clothes[this.currentIndex].path = rv.clothes[this.currentIndex].path designItemDetail.clothes[this.currentIndex].path = rv.clothes[this.currentIndex].path
designItemDetail.clothes[this.currentIndex].layersObject = rv.clothes[this.currentIndex].layersObject
designItemDetail.clothes[this.currentIndex].sketchString = '' designItemDetail.clothes[this.currentIndex].sketchString = ''
data.designSingleItemDTOList[this.currentIndex].sketchString ='' data.designSingleItemDTOList[this.currentIndex].sketchString =''
data.designSingleItemDTOList[this.currentIndex].path =rv.clothes[this.currentIndex].minIOPath data.designSingleItemDTOList[this.currentIndex].path =rv.clothes[this.currentIndex].minIOPath
@@ -1088,6 +1094,8 @@ export default defineComponent({
designType:this.current.designType?this.current.designType:'Library', designType:this.current.designType?this.current.designType:'Library',
path:this.current.minIOPath?this.current.minIOPath:'', path:this.current.minIOPath?this.current.minIOPath:'',
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0], offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
maskMinioUrl:this.current.layersObject[1].maskMinioUrl,
maskUrl:this.current.layersObject[1].maskUrl,
priority:this.current.priority, priority:this.current.priority,
trims:this.current.trims, trims:this.current.trims,
scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:[1,1], scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:[1,1],

View File

@@ -49,7 +49,8 @@
<img crossOrigin="anonymous" :src="item?.path" :style="{transform:`rotateZ(${printStyleList[index]?.transform?.rotateZ}deg)`}" class="designElements_imgItme" draggable="false"> <img crossOrigin="anonymous" :src="item?.path" :style="{transform:`rotateZ(${printStyleList[index]?.transform?.rotateZ}deg)`}" class="designElements_imgItme" draggable="false">
</div> </div>
</div> </div>
<img :src="current?.path" alt="" class="designElements_sketch"> <img :src="current?.undividedLayer?current.undividedLayer:current.path" alt="" class="designElements_sketch">
<!-- <img :src="current?.path" alt="" class="designElements_sketch"> -->
<div class="designElements_btn"> <div class="designElements_btn">
<ul v-for="item,index in printStyleList" :key="item" :class="{active:item?.designElementsBtn?item?.designElementsBtn:false}" class="designElements_Mousingle" :style="item.style" @mousedown.stop="itemMoveMousedown(index,$event)"> <ul v-for="item,index in printStyleList" :key="item" :class="{active:item?.designElementsBtn?item?.designElementsBtn:false}" class="designElements_Mousingle" :style="item.style" @mousedown.stop="itemMoveMousedown(index,$event)">
<li class="designElements_btn_top" @mousedown.stop="itemSizeMousedown('top',$event)"></li> <li class="designElements_btn_top" @mousedown.stop="itemSizeMousedown('top',$event)"></li>

View File

@@ -49,7 +49,8 @@
<img crossOrigin="anonymous" :src="item?.path" :style="{transform:`rotateZ(${printStyleList[index]?.transform?.rotateZ}deg)`}" class="designElementsMobile_imgItme" draggable="false"> <img crossOrigin="anonymous" :src="item?.path" :style="{transform:`rotateZ(${printStyleList[index]?.transform?.rotateZ}deg)`}" class="designElementsMobile_imgItme" draggable="false">
</div> </div>
</div> </div>
<img :src="current?.path" alt="" class="designElementsMobile_sketch"> <!-- <img :src="current?.path" alt="" class="designElementsMobile_sketch"> -->
<img :src="current?.undividedLayer?current.undividedLayer:current.path" alt="" class="designElementsMobile_sketch">
<div class="designElementsMobile_btn"> <div class="designElementsMobile_btn">
<ul v-for="item,index in printStyleList" :key="item" :class="{active:item?.designElementsBtn?item?.designElementsBtn:false}" class="designElementsMobile_Mousingle" :style="item.style" @touchstart.stop="itemMoveMousedown(index,$event)"> <ul v-for="item,index in printStyleList" :key="item" :class="{active:item?.designElementsBtn?item?.designElementsBtn:false}" class="designElementsMobile_Mousingle" :style="item.style" @touchstart.stop="itemMoveMousedown(index,$event)">
<li class="designElementsMobile_btn_top" @touchstart.stop="itemSizeMousedown('top',$event)"></li> <li class="designElementsMobile_btn_top" @touchstart.stop="itemSizeMousedown('top',$event)"></li>
@@ -491,7 +492,7 @@ export default defineComponent({
// let num = this.sketch/ // let num = this.sketch/
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
let arr = JSON.parse(JSON.stringify(this.printStyleList)) let arr = JSON.parse(JSON.stringify(this.printStyleList))
let sketch = document.getElementsByClassName("designElements_sketch")[0] let sketch = document.getElementsByClassName("designElementsMobile_modal")[0]?.getElementsByClassName('designElementsMobile_sketch')[0]
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
let prints = [] let prints = []
let scale let scale
@@ -833,8 +834,8 @@ export default defineComponent({
li{ li{
cursor: pointer; cursor: pointer;
// border-radius: 50%; // border-radius: 50%;
width: calc(1rem*1.2); width: calc(2.5rem*1.2);
height: calc(1rem*1.2); height: calc(2.5rem*1.2);
background-color: rgb(20, 188, 255); background-color: rgb(20, 188, 255);
position: absolute; position: absolute;
pointer-events: none; pointer-events: none;

View File

@@ -63,6 +63,7 @@
<div class="habit_System_Designer_text">{{ $t('DesignPrintOperation.Scale') }}</div> <div class="habit_System_Designer_text">{{ $t('DesignPrintOperation.Scale') }}</div>
<a-slider id="system_silder" <a-slider id="system_silder"
:min="20" :min="20"
:max="1000"
v-model:value="systemDesignerPercentage" v-model:value="systemDesignerPercentage"
@afterChange="systemDesigner" @afterChange="systemDesigner"
:tip-formatter="formatter" :tip-formatter="formatter"
@@ -366,10 +367,9 @@ export default defineComponent({
}) })
}, },
systemDesigner(num) { systemDesigner(num) {
}, },
formatter(value) { formatter(value) {
return `${value*3}%`; return `${value}%`;
}, },
setOveralSingle(){ setOveralSingle(){

View File

@@ -65,7 +65,8 @@
<div v-show="!overallSingle" class="habit_System_Designer"> <div v-show="!overallSingle" class="habit_System_Designer">
<div class="habit_System_Designer_text">Scale</div> <div class="habit_System_Designer_text">Scale</div>
<a-slider id="system_silder" <a-slider id="system_silder"
:min="1" :min="20"
:max="1000"
v-model:value="systemDesignerPercentage" v-model:value="systemDesignerPercentage"
@afterChange="systemDesigner" @afterChange="systemDesigner"
:tip-formatter="formatter" :tip-formatter="formatter"
@@ -366,11 +367,9 @@ export default defineComponent({
}) })
}, },
systemDesigner(num) { systemDesigner(num) {
let DesignPrintOperationParent = this.$parent
DesignPrintOperationParent.systemDesignerPercentage = num
}, },
formatter(value) { formatter(value) {
return `${value*3}%`; return `${value}%`;
}, },
setOveralSingle(){ setOveralSingle(){
@@ -808,14 +807,13 @@ export default defineComponent({
index = ind index = ind
} }
}) })
this.designOpenrtion = false
if(this.designItemDetailTS.rv){ if(this.designItemDetailTS.rv){
designItemDetail.currentFullBodyView = this.designItemDetailTS.rv.currentFullBodyView designItemDetail.currentFullBodyView = this.designItemDetailTS.rv.currentFullBodyView
designItemDetail.clothes[index].printObject.ifSingle = this.overallSingle designItemDetail.clothes[index].printObject.ifSingle = this.overallSingle
designItemDetail.clothes[index].layersObject = this.designItemDetailTS.rv.clothes[index].layersObject designItemDetail.clothes[index].layersObject = this.designItemDetailTS.rv.clothes[index].layersObject
designItemDetail.clothes[index].undividedLayer = this.designItemDetailTS.rv.clothes[index].undividedLayer
designItemDetail.clothes[index].trims = this.designItemDetailTS.rv.clothes[index].trims designItemDetail.clothes[index].trims = this.designItemDetailTS.rv.clothes[index].trims
designItemDetail.clothes[index].printObject.prints = this.setOkData designItemDetail.clothes[index].printObject.prints = this.setOkData
// designItemDetail.clothes[index].printObject.prints = this.computeZindex()
designItemDetail.ifSubmit = true designItemDetail.ifSubmit = true
designItemDetail.clothes.forEach((item,i)=>{ designItemDetail.clothes.forEach((item,i)=>{
let a let a
@@ -832,6 +830,7 @@ export default defineComponent({
this.setRevocation(designItemDetail,this.designItemDetailTS.data) this.setRevocation(designItemDetail,this.designItemDetailTS.data)
this.designItemDetailTS = {} this.designItemDetailTS = {}
} }
this.designOpenrtion = false
if(this.driver__.driver){ if(this.driver__.driver){
nextTick(()=>{ nextTick(()=>{
driverObj__.moveNext(); driverObj__.moveNext();

View File

@@ -290,6 +290,7 @@ export default defineComponent({
if(str != 'mouseUp'){ if(str != 'mouseUp'){
canvas.remove(brushIndicator) canvas.remove(brushIndicator)
} }
if(canvas.contains(brushIndicator))canvas.remove(brushIndicator)
const canvasAsJson = JSON.stringify(canvas.toJSON()); const canvasAsJson = JSON.stringify(canvas.toJSON());
normalCanvasState.value.push(canvasAsJson); normalCanvasState.value.push(canvasAsJson);
} }
@@ -344,7 +345,7 @@ export default defineComponent({
top:item.top*scale, top:item.top*scale,
} }
) )
exportCanvas.add(obj) Z exportCanvas.add(obj)
if(allObjects.length-1 == index){ if(allObjects.length-1 == index){
let data = exportCanvas.toDataURL('jpg') let data = exportCanvas.toDataURL('jpg')
cancelDsign() cancelDsign()

View File

@@ -10,6 +10,8 @@
<i class="icon iconfont icon-move" @click="setOperation('move')" :class="{active:canvasState == 'move'}"></i> <i class="icon iconfont icon-move" @click="setOperation('move')" :class="{active:canvasState == 'move'}"></i>
<i class="icon iconfont icon-bianji" @click="setOperation('pencil')" :class="{active:canvasState == 'pencil'}"></i> <i class="icon iconfont icon-bianji" @click="setOperation('pencil')" :class="{active:canvasState == 'pencil'}"></i>
<i class="icon iconfont icon-xiangpi_huaban1" @click="setOperation('eraser')" :class="{active:canvasState == 'eraser'}"></i> <i class="icon iconfont icon-xiangpi_huaban1" @click="setOperation('eraser')" :class="{active:canvasState == 'eraser'}"></i>
<div class="editFrontBack_center_btn_colorRed" @click="setOperationColor('rgb(255,0,0)')" :class="{active:rgba == 'rgb(255,0,0)'}" title="front"></div>
<div class="editFrontBack_center_btn_colorGreen" @click="setOperationColor('rgb(0,255,0)')" :class="{active:rgba == 'rgb(0,255,0)'}" title="back"></div>
<input type="range" v-show="canvasState != 'move'" @input="setPencilWidth" min="1" max="50" v-model="canvasPencilWidth[canvasState]"> <input type="range" v-show="canvasState != 'move'" @input="setPencilWidth" min="1" max="50" v-model="canvasPencilWidth[canvasState]">
<div class="icon iconfont icon-xiala" :class="{btnRotate:spreadState}" @click="()=>spreadState = !spreadState"></div> <div class="icon iconfont icon-xiala" :class="{btnRotate:spreadState}" @click="()=>spreadState = !spreadState"></div>
<div @click="setSubmit">保存</div> <div @click="setSubmit">保存</div>
@@ -48,9 +50,8 @@ export default defineComponent({
// return props.patchData // return props.patchData
// }) // })
watch(()=>props.imgDomIndex,(newVal,oldVal)=>{ watch(()=>props.imgDomIndex,(newVal,oldVal)=>{
if(newVal == -1) return
imgDomIndex = newVal imgDomIndex = newVal
console.log(newVal,oldVal)
console.log(props.patchData);
props.patchData.front.imageUrl= '' props.patchData.front.imageUrl= ''
init(props.patchData.front[newVal],'') init(props.patchData.front[newVal],'')
}) })
@@ -112,8 +113,8 @@ export default defineComponent({
fabric.Object.prototype.cornerSize = 10 fabric.Object.prototype.cornerSize = 10
fabric.Object.prototype.transparentCorners = false fabric.Object.prototype.transparentCorners = false
exportUrl = data.imageUrl exportUrl = data.maskUrl
fabric.Image.fromURL(data.imageUrl, function(img) { fabric.Image.fromURL(data.maskUrl, function(img) {
// 设置背景图对象的宽度和高度与 canvas 相同 // 设置背景图对象的宽度和高度与 canvas 相同
img.scaleToWidth(canvas.width); img.scaleToWidth(canvas.width);
img.scaleToHeight(canvas.height);; img.scaleToHeight(canvas.height);;
@@ -133,12 +134,12 @@ export default defineComponent({
}else{ }else{
fabric.Object.prototype.controls.deleteControl.mouseUpHandler = deleteObj fabric.Object.prototype.controls.deleteControl.mouseUpHandler = deleteObj
} }
setPencilWidth()
updateCanvasState() updateCanvasState()
loadingShow.value = false loadingShow.value = false
},{ crossOrigin: "Anonymous" }); },{ crossOrigin: "Anonymous" });
// 鼠标抬起事件 // 鼠标抬起事件
canvas.on('mouse:up', function(event) { canvas.on('mouse:up', function(event) {
console.log(event);
if(canvasBtn.canvasState != 'move'){ if(canvasBtn.canvasState != 'move'){
updateCanvasState('mouseUp') updateCanvasState('mouseUp')
} }
@@ -147,10 +148,15 @@ export default defineComponent({
//画布上移动 //画布上移动
canvas.on("mouse:move", event =>setCanvasMove(event)); canvas.on("mouse:move", event =>setCanvasMove(event));
canvas.add(brushIndicator) canvas.add(brushIndicator)
canvas.on("mouse:down", event=>brushIndicator.bringToFront());
canvas.on('object:added', function() {
brushIndicator.bringToFront();
});
setOperation('pencil') setOperation('pencil')
createSetTimeSubmit()
img.remove() img.remove()
} }
img.src = data.imageUrl img.src = data.maskUrl
}) })
} }
@@ -171,13 +177,20 @@ export default defineComponent({
}) })
} }
let setClone = ()=>{
// canvasBtn.canvasState = 'move'
// canvasBtn.spreadState = false
let canvasBox = document.querySelector(".exportCanvasBox_center");
let oldCanvasDom = canvasBox.querySelector('.canvas-container')
let oldCanvasDom1 = canvasBox.querySelector('canvas')
if(oldCanvasDom)oldCanvasDom.remove()
if(oldCanvasDom1)oldCanvasDom1.remove()
}
let clearCanvas = ()=>{ let clearCanvas = ()=>{
canvasBtn.canvasState = 'move'
canvasBtn.spreadState = false
document.removeEventListener("keydown", canvasKeyDown); document.removeEventListener("keydown", canvasKeyDown);
document.removeEventListener("keyup", canvasKeyUp); document.removeEventListener("keyup", canvasKeyUp);
} }
let rgba = 'rgba(0, 0, 0, 1)' let rgba = ref('rgb(255,0,0)')
let brushIndicator = new fabric.Circle({ let brushIndicator = new fabric.Circle({
radius:2, radius:2,
fill: 'rgba(0, 0, 0, 0)', fill: 'rgba(0, 0, 0, 0)',
@@ -205,6 +218,7 @@ export default defineComponent({
} }
// brushIndicator.fill = canvasPencilColor.value // brushIndicator.fill = canvasPencilColor.value
brushIndicator.set({ left: pointer.x, top: pointer.y, visible: true,radius:(canvasBtn.canvasPencilWidth[canvasBtn.canvasState])/2 }); brushIndicator.set({ left: pointer.x, top: pointer.y, visible: true,radius:(canvasBtn.canvasPencilWidth[canvasBtn.canvasState])/2 });
brushIndicator.bringToFront()
} }
canvas.requestRenderAll() canvas.requestRenderAll()
} }
@@ -216,12 +230,18 @@ export default defineComponent({
}else if(str == 'pencil'){ }else if(str == 'pencil'){
setPencil() setPencil()
if(!canvas.contains(brushIndicator))canvas.add(brushIndicator) if(!canvas.contains(brushIndicator))canvas.add(brushIndicator)
}else if(str == 'eraser'){ }else if(str == 'eraser'){
setEraser() setEraser()
rgba.value = ''
if(!canvas.contains(brushIndicator))canvas.add(brushIndicator) if(!canvas.contains(brushIndicator))canvas.add(brushIndicator)
} }
} }
let setOperationColor = (color)=>{
brushIndicator.set({fill: color});
rgba.value = color
canvas.freeDrawingBrush.color = color
setOperation('pencil')
}
let setMove = ()=>{ let setMove = ()=>{
canvas.isDrawingMode = false canvas.isDrawingMode = false
canvas.forEachObject((obj) =>obj.selectable = true); canvas.forEachObject((obj) =>obj.selectable = true);
@@ -230,8 +250,8 @@ export default defineComponent({
canvas.isDrawingMode = true//开启绘画模式 canvas.isDrawingMode = true//开启绘画模式
canvas.freeDrawingBrush = new fabric.PencilBrush(canvas,{}); canvas.freeDrawingBrush = new fabric.PencilBrush(canvas,{});
canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth[canvasBtn.canvasState]); canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth[canvasBtn.canvasState]);
canvas.freeDrawingBrush.color = rgba canvas.freeDrawingBrush.color = rgba.value
brushIndicator.set('fill',rgba) brushIndicator.set('fill',rgba.value)
canvas.freeDrawingBrush.isEraser = false canvas.freeDrawingBrush.isEraser = false
} }
let setEraser = ()=>{ let setEraser = ()=>{
@@ -265,10 +285,20 @@ export default defineComponent({
canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth[canvasBtn.canvasState]) canvas.freeDrawingBrush.width = Number(canvasBtn.canvasPencilWidth[canvasBtn.canvasState])
},300) },300)
} }
let setTimeSubmit = null
let createSetTimeSubmit = ()=>{
clearTimeout(setTimeSubmit)
setTimeSubmit = setTimeout(()=>{
setSubmit()
},1000)
}
let updateCanvasState = (str) =>{ let updateCanvasState = (str) =>{
if(str != 'mouseUp'){ if(str != 'mouseUp'){
canvas.remove(brushIndicator) canvas.remove(brushIndicator)
}else{
createSetTimeSubmit()
} }
if(canvas.contains(brushIndicator))canvas.remove(brushIndicator)
const canvasAsJson = JSON.stringify(canvas.toJSON()); const canvasAsJson = JSON.stringify(canvas.toJSON());
normalCanvasState.value.push(canvasAsJson); normalCanvasState.value.push(canvasAsJson);
} }
@@ -287,19 +317,9 @@ export default defineComponent({
return return
} }
canvas.loadFromJSON(canvasState.value, () => {}); canvas.loadFromJSON(canvasState.value, () => {});
createSetTimeSubmit()
} }
let setSubmit = ()=>{ let setSubmit = ()=>{
let mark = 'https://www.minio.aida.com.hk:12024/aida-users/83/toProductImageElement/e30c06b3-ce93-4fd8-a381-f3bdb4b5d318.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=admin%2F20240822%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240822T083215Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=40356ec75617430e7cef2d8cc0524ff0b18411559f4f52ab6a8f8522d7348250'
let full = 'https://www.minio.aida.com.hk:12024/aida-users/83/toProductImageElement/ad929cf8-61e9-4e73-9d1b-8338d8d151d2.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=admin%2F20240822%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240822T083909Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=7e7facf97ebce6e621f0cd68188fdebef0e238092cd3b3dd4f70ed783433d637'
let size = {
width: exportWH * ratio[0],
height: exportWH * ratio[1],
}
segmentImage(mark,full,size).then((rv)=>{
console.log(rv);
})
return
var allObjects = canvas.getObjects('path'); var allObjects = canvas.getObjects('path');
var canvasDom = document.createElement("canvas"); var canvasDom = document.createElement("canvas");
let exportCanvas = new fabric.Canvas(canvasDom, { let exportCanvas = new fabric.Canvas(canvasDom, {
@@ -337,10 +357,21 @@ export default defineComponent({
let data = exportCanvas.toDataURL('png') let data = exportCanvas.toDataURL('png')
cancelDsign() cancelDsign()
clearCanvas() clearCanvas()
// props.props.patchData.front[imgDomIndex].imageUrl = data
let mark = data
let full = props.patchData.front[imgDomIndex].undividedLayer
let size = {
width: Math.round(exportWH * ratio[0]),
height: Math.round(exportWH * ratio[1]),
}
console.log(data); console.log(data);
props.patchData.front[imgDomIndex].imageUrl = data segmentImage(mark,full,size).then((rv)=>{
// emit('setSloganData',data) // console.log(rv.targetFrontUrl,rv.targetBackUrl)
props.patchData.front[imgDomIndex].imageUrl = rv.targetFrontUrl
props.patchData.back[imgDomIndex].imageUrl = rv.targetBackUrl
props.patchData.front[imgDomIndex].maskUrl = data
})
return
}) })
} }
let cancelDsign = ()=>{ let cancelDsign = ()=>{
@@ -352,11 +383,14 @@ export default defineComponent({
loadingShow, loadingShow,
t, t,
...toRefs(canvasBtn), ...toRefs(canvasBtn),
rgba,
init, init,
setOperation, setOperation,
setOperationColor,
setPencilWidth, setPencilWidth,
historyState, historyState,
setSubmit, setSubmit,
setClone,
cancelDsign, cancelDsign,
}; };
}, },
@@ -387,13 +421,15 @@ export default defineComponent({
display: flex; display: flex;
border: 0.2rem solid #c4c4c4; border: 0.2rem solid #c4c4c4;
width: 25rem; width: 35rem;
border-radius: 4px; /* 设置圆角半径 */ border-radius: 4px; /* 设置圆角半径 */
flex-wrap: wrap; flex-wrap: wrap;
align-items: center;
.editFrontBack_center_btn_item{ .editFrontBack_center_btn_item{
display: flex; display: flex;
align-items: center; align-items: center;
padding: 1rem 0; padding: 1rem 0;
} }
} }
.exportCanvasBox_center{ .exportCanvasBox_center{
@@ -433,6 +469,24 @@ export default defineComponent({
display: block; display: block;
} }
} }
.editFrontBack_center_btn_colorRed,.editFrontBack_center_btn_colorGreen{
width: 4rem;
height: 2rem;
border-radius: 4px;
margin: 0 .5rem;
cursor: pointer;
padding: .5rem 1;
&.active{
border: 2px solid;
border-radius: .4rem;
}
}
.editFrontBack_center_btn_colorRed{
background: rgba(255,0,0);
}
.editFrontBack_center_btn_colorGreen{
background: rgba(0,255,0);
}
i{ i{
font-size: 2.5rem; font-size: 2.5rem;
cursor: pointer; cursor: pointer;

View File

@@ -3,7 +3,7 @@
<div class="designOpenrtion_centent" id="designOpenrtionCentent"> <div class="designOpenrtion_centent" id="designOpenrtionCentent">
<div class="detail_modal_body_title"> <div class="detail_modal_body_title">
<div class="detail_modal_body_nav"> <div class="detail_modal_body_nav">
<div v-for="item,index in designItemDetail?.clothes" v-show="item.id" :class="{active:item.clothesOpen}" @click="clothesOpen(index)"> <div v-for="item,index in designItemDetail?.clothes" v-show="item.id" :class="{active:item.clothesOpenItem}" @click="clothesOpen(index)">
<img :src="item?.path" alt=""> <img :src="item?.path" alt="">
</div> </div>
</div> </div>
@@ -42,7 +42,7 @@
<div class="designOpenrtion_imgMask_open" @click.stop="deleteBorder"></div> <div class="designOpenrtion_imgMask_open" @click.stop="deleteBorder"></div>
</div> </div>
<div class="design_compile_content"> <div class="design_compile_content">
<editFrontBack :patchData="frontBack" :imgDomIndex="imgDomIndex"></editFrontBack> <editFrontBack :patchData="frontBack" :imgDomIndex="imgDomIndex" ref="editFrontBack"></editFrontBack>
</div> </div>
</template> </template>
@@ -92,9 +92,10 @@ export default defineComponent({
]); ]);
let direction = ref('') let direction = ref('')
let imgDom = ref() let imgDom = ref()
let imgDomIndex = ref(2) let imgDomIndex = ref(-1)
let frontBack = ref({}) let frontBack = ref({})
let frontBackOld = ref({}) let frontBackOld = ref({})
let editFrontBack = ref(null)
return { return {
designItemDetail, designItemDetail,
current, current,
@@ -106,6 +107,7 @@ export default defineComponent({
frontBack, frontBack,
setRevocation, setRevocation,
frontBackOld, frontBackOld,
editFrontBack,
}; };
}, },
data() { data() {
@@ -156,7 +158,7 @@ export default defineComponent({
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail)) let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
let front = [] let front = []
let back = [] let back = []
let body let body = {}
designItemDetail.others.forEach((item) => { designItemDetail.others.forEach((item) => {
if(item.type == 'Body'){ if(item.type == 'Body'){
body = item body = item
@@ -185,11 +187,12 @@ export default defineComponent({
front[index] = v.layersObject[i] front[index] = v.layersObject[i]
front[index].style.zIndex = v.priority front[index].style.zIndex = v.priority
front[index].id = v.id front[index].id = v.id
front[index].undividedLayer = v.undividedLayer
}else{ }else{
back[index] = v.layersObject[i] back[index] = v.layersObject[i]
back[index].style.zIndex = v.priority back[index].style.zIndex = v.priority
back[index].id = v.id back[index].id = v.id
back[index].undividedLayer = v.undividedLayer
// back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++ // back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++
} }
if(this.printZIndex < v.priority){ if(this.printZIndex < v.priority){
@@ -198,10 +201,13 @@ export default defineComponent({
} }
this.printZIndex++ this.printZIndex++
}) })
body.style = { if(body){
width:body.layersObject[0].imageSize?.[0]*ratio+'px', body.style = {
height:body.layersObject[0].imageSize?.[1]*ratio+'px', width:body.layersObject[0].imageSize?.[0]*ratio+'px',
height:body.layersObject[0].imageSize?.[1]*ratio+'px',
}
} }
this.frontBack = { this.frontBack = {
front:front, front:front,
back:back, back:back,
@@ -235,6 +241,10 @@ export default defineComponent({
return num return num
}, },
clear(){ clear(){
this.imgDomIndex = -1
console.log(this.editFrontBack);
this.clothesOpenActive(-1)
this.editFrontBack.setClone()
window.removeEventListener('resize', this.setImgSizeTime); window.removeEventListener('resize', this.setImgSizeTime);
}, },
setpitch(item,index){ setpitch(item,index){
@@ -391,9 +401,11 @@ export default defineComponent({
}, },
clothesOpenActive(index){ clothesOpenActive(index){
this.designItemDetail.clothes.forEach((item)=>{ this.designItemDetail.clothes.forEach((item)=>{
item.clothesOpen = false item.clothesOpenItem = false
}) })
this.designItemDetail.clothes[index].clothesOpen = true if(index != -1){
this.designItemDetail.clothes[index].clothesOpenItem = true
}
}, },
sort(arr){ sort(arr){
arr.sort((a, b) => { arr.sort((a, b) => {
@@ -412,15 +424,14 @@ export default defineComponent({
// return a_num - b_num; // return a_num - b_num;
// }); // });
let arr = this.sort(JSON.parse(JSON.stringify(this.frontBack.front))) let arr = this.sort(JSON.parse(JSON.stringify(this.frontBack.front)))
let num = 10 let num = 10
arr.forEach((item)=>{ arr.forEach((item)=>{
item.priority = num++ item.priority = num++
item.similarity = false//新增衣服传的是衣服id会存在两件衣服id相同所以设置为false让每次赋值都是不一样的 item.similarity = false//新增衣服传的是衣服id会存在两件衣服id相同所以设置为false让每次赋值都是不一样的
}) })
let front = arr
let imageCategory1
data.designSingleItemDTOList.forEach((item)=>{ data.designSingleItemDTOList.forEach((item)=>{
let front = arr
let imageCategory1
if(arr.length > 1){ if(arr.length > 1){
imageCategory1 = arr[1].imageCategory imageCategory1 = arr[1].imageCategory
} }
@@ -435,6 +446,7 @@ export default defineComponent({
let top = y == 0 ? item.offset[1]:y+item.offset[1] let top = y == 0 ? item.offset[1]:y+item.offset[1]
let left = x == 0 ? item.offset[0]:x+item.offset[0] let left = x == 0 ? item.offset[0]:x+item.offset[0]
item.offset = [left,top] item.offset = [left,top]
item.maskUrl = arr[index].maskUrl
item.priority = arr[index].priority item.priority = arr[index].priority
arr[index].similarity = true arr[index].similarity = true
// item.offset = [(arr[index]?.style?.left.replace(/px/g,'')*ratio).toFixed(0),(i?.style?.top.replace(/px/g,'')*ratio).toFixed(0)] // item.offset = [(arr[index]?.style?.left.replace(/px/g,'')*ratio).toFixed(0),(i?.style?.top.replace(/px/g,'')*ratio).toFixed(0)]
@@ -445,7 +457,6 @@ export default defineComponent({
item.scale = front?.imageSize?Number(((front?.style?.width.replace(/px/g,'')*ratio)/front?.imageSize[0]).toFixed(2)):1 item.scale = front?.imageSize?Number(((front?.style?.width.replace(/px/g,'')*ratio)/front?.imageSize[0]).toFixed(2)):1
} }
}) })
// return
Https.axiosPost(Https.httpUrls.designSingle, data).then( Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv) => { (rv) => {
// this.$parent.loadingShow = false // this.$parent.loadingShow = false

View File

@@ -21,14 +21,14 @@
</div> --> </div> -->
<div class="exportCanvasBox"> <div class="exportCanvasBox">
<div class="exportCanvasBox_left"> <div class="exportCanvasBox_left">
<div class="exportCanvasBox_title">{{ $t('exportModel.CanvasSize') }}</div> <!-- <div class="exportCanvasBox_title">{{ $t('exportModel.CanvasSize') }}</div> -->
<!-- <label> <!-- <label>
<div>Width:</div> <div>Width:</div>
<input type="number" @input="setMaxInput('width', 500)" v-model="canvasWH.width"/> <input type="number" @input="setMaxInput('width', 500)" v-model="canvasWH.width"/>
</label> --> </label> -->
<label> <label>
<div>{{ $t('exportModel.Height') }}:</div> <div>{{ $t('exportModel.Height') }}:</div>
<input type="number" @input="setMaxInput('height', 30000)" v-model="canvasWH.height" /> <input type="number" @input="setMaxInput('height', 30000)" v-model="canvasWH.height" />
</label> </label>
<div class="exportCanvasBox_title" @click.stop="setCloseNav('nav')"> <div class="exportCanvasBox_title" @click.stop="setCloseNav('nav')">
@@ -42,58 +42,47 @@
]" ]"
> >
</div> </div>
</div> <div class="exportCanvasBox_imgbor exportCanvasBox_left_item" :class="{'closeNav':closeNav.nav}">
<div class="exportCanvasBox_img exportCanvasBox_left_item" :class="{'closeNav':closeNav.nav}"> <div
<div class="exportCanvasBox_allItem"
class="exportCanvasBox_allItem" v-for="(item,key) in allBoardData"
v-for="(item,key) in allBoardData" >
>
<div v-if="item[0] && key == 'disposeMoodboard'" class="exportCanvasBox_intro">Entirety Moodboard</div>
<div v-if="item[0] && key == 'printboardFiles'" class="exportCanvasBox_intro">Printboard</div>
<div v-if="item[0] && key == 'moodboardFiles'" class="exportCanvasBox_intro">Moodboard</div>
<div v-if="item[0] && key == 'colorBoards'" class="exportCanvasBox_intro">Color</div>
<div v-if="item[0] && key == 'sketchboardFiles'" class="exportCanvasBox_intro">Sketch</div>
<div v-if="item[0] && key == 'likeDesignCollectionList'" class="exportCanvasBox_intro">Selected Design</div>
<div v-if="item[0] && key == 'FinalizeImage'" class="exportCanvasBox_intro">Selected Product</div>
<div v-if="key == 'colorBoards'" class="exportCanvasBox_item_colorBor">
<div v-for="colorItem in item" class="exportCanvasBox_item_color" :class="{active:colorItem.upScaleChecked}" draggable="true" @dragstart="onDragstart(key,colorItem)" @click="isMoible?setDragstart(key,colorItem):''">
<div class="color_content" v-if="colorItem.gradient" :style="{height:'10rem','background-image':colorItem?.gradient?`linear-gradient(${colorItem?.gradient.angle}deg,${setGradient(colorItem?.gradient)}`:'none'}"></div>
<div v-else>
<div class="exportCanvasBox_item_BGcolor" :style="{'background-color': 'rgb('+colorItem.rgbValue.r+','+colorItem.rgbValue.g+','+colorItem.rgbValue.b+')'}"></div>
<div>{{colorItem.tcx}}</div>
<div>{{colorItem.name}}</div>
</div>
</div>
<div v-if="item[0] && key == 'disposeMoodboard'" class="exportCanvasBox_intro">Entirety Moodboard</div>
<div v-if="item[0] && key == 'printboardFiles'" class="exportCanvasBox_intro">Printboard</div>
<div v-if="item[0] && key == 'moodboardFiles'" class="exportCanvasBox_intro">Moodboard</div>
<div v-if="item[0] && key == 'colorBoards'" class="exportCanvasBox_intro">Color</div>
<div v-if="item[0] && key == 'sketchboardFiles'" class="exportCanvasBox_intro">Sketch</div>
<div v-if="item[0] && key == 'likeDesignCollectionList'" class="exportCanvasBox_intro">Selected Design</div>
<div v-if="item[0] && key == 'FinalizeImage'" class="exportCanvasBox_intro">Selected Product</div>
<div class="exportCanvasBox_item_color" v-if="key == 'colorBoards'" v-for="colorItem in item" :class="{active:colorItem.upScaleChecked}" draggable="true" @dragstart="onDragstart(key,colorItem)" @click="isMoible?setDragstart(key,colorItem):''">
<div class="color_content" v-if="colorItem.gradient" :style="{height:'10rem','background-image':colorItem?.gradient?`linear-gradient(${colorItem?.gradient.angle}deg,${setGradient(colorItem?.gradient)}`:'none'}"></div>
<div v-if="!colorItem.gradient">
<div class="exportCanvasBox_item_BGcolor" :style="{'background-color': 'rgb('+colorItem.rgbValue.r+','+colorItem.rgbValue.g+','+colorItem.rgbValue.b+')'}"></div>
<div>{{colorItem.tcx}}</div>
<div>{{colorItem.name}}</div>
</div> </div>
<div
class="exportCanvasBox_item"
v-for="imgItem in item"
:class="[key == 'disposeMoodboard'?'exportCanvasBox_item_dispose':'',imgItem?.upScaleChecked?'active':'']"
draggable
@dragstart="onDragstart(key,imgItem)"
@click="isMoible?setDragstart(key,imgItem):''"
>
<div class="exportCanvasBox_img">
<img :src="key == 'likeDesignCollectionList'?imgItem?.designOutfitUrl:imgItem?.imgUrl" alt="" />
</div>
</div>
</div> </div>
<div
class="exportCanvasBox_item"
v-for="imgItem in item"
:class="[key == 'disposeMoodboard'?'exportCanvasBox_item_dispose':'',imgItem?.upScaleChecked?'active':'']"
draggable
@dragstart="onDragstart(key,imgItem)"
@click="isMoible?setDragstart(key,imgItem):''"
>
<div class="exportCanvasBox_img">
<img :src="key == 'likeDesignCollectionList'?imgItem?.designOutfitUrl:imgItem?.imgUrl" alt="" />
</div>
</div>
</div>
</div>
<div class="exportCanvasBox_title" @click.stop="setCloseNav('tool')">
{{ $t('exportModel.CanvasTool') }}
<div
:class="[
'icon',
'iconfont',
'icon-xiala',
closeNav.tool?'icon-rotate':''
]"
>
</div> </div>
</div> </div>
<div class="exportCanvasBox_left_tool exportCanvasBox_left_item" :class="{'closeNav' :closeNav.tool}"> <div class="exportCanvasBox_left_tool exportCanvasBox_title">
<div class="exportCanvasBox_left_tool_item"> <div class="exportCanvasBox_left_tool_item">
<i class="icon iconfont icon-chehui" @click="historyState('')"></i> <i class="icon iconfont icon-chehui" @click="historyState('')"></i>
<i class="icon iconfont icon-fanchehui" @click="historyState('reverse')"></i> <i class="icon iconfont icon-fanchehui" @click="historyState('reverse')"></i>
@@ -101,117 +90,108 @@
<i class="icon iconfont icon-caizhi" @click="setOperation('texture')" :class="{active:operation == 'texture'}"></i> <i class="icon iconfont icon-caizhi" @click="setOperation('texture')" :class="{active:operation == 'texture'}"></i>
<i class="icon iconfont icon-move" @click="setOperation('move')" :class="{active:operation == 'move'}"></i> <i class="icon iconfont icon-move" @click="setOperation('move')" :class="{active:operation == 'move'}"></i>
<i class="icon iconfont icon-xiangpi_huaban1" @click="setOperation('eraser')" :class="{active:operation == 'eraser'}"></i> <i class="icon iconfont icon-xiangpi_huaban1" @click="setOperation('eraser')" :class="{active:operation == 'eraser'}"></i>
<i class="icon iconfont icon-xiala" :class="closeNav.tool?'icon-rotate':''" @click.stop="setCloseNav('tool')"></i>
</div> </div>
<div class="exportCanvasBox_left_tool_item"> <div class="exportCanvasBox_left_tool exportCanvasBox_left_item" :class="{'closeNav' :closeNav.tool}">
<i class="icon iconfont icon-xian" @click="setOperation('fold')" :class="{active:operation == 'fold'}"></i> <div class="exportCanvasBox_left_tool_item">
<i class="icon iconfont icon-checkbox-full" @click="setOperation('rect')" :class="{active:operation == 'rect'}"></i> <i class="icon iconfont icon-xian" @click="setOperation('fold')" :class="{active:operation == 'fold'}"></i>
<!-- <i class="icon iconfont icon-zhixian" @click="setOperation('line')" :class="{active:operation == 'line'}"></i> --> <i class="icon iconfont icon-checkbox-full" @click="setOperation('rect')" :class="{active:operation == 'rect'}"></i>
<!-- <i class="icon iconfont icon-circle" @click="setOperation('circle')" :class="{active:operation == 'circle'}"></i> --> <!-- <i class="icon iconfont icon-zhixian" @click="setOperation('line')" :class="{active:operation == 'line'}"></i> -->
<i class="icon iconfont icon-sanjiaoxing" @click="setOperation('triangle')" :class="{active:operation == 'triangle'}"></i> <!-- <i class="icon iconfont icon-circle" @click="setOperation('circle')" :class="{active:operation == 'circle'}"></i> -->
<i class="icon iconfont icon-tx-fill-tuoyuanxing" @click="setOperation('ellipse')" :class="{active:operation == 'ellipse'}"></i> <i class="icon iconfont icon-sanjiaoxing" @click="setOperation('triangle')" :class="{active:operation == 'triangle'}"></i>
<label class="uploadImage"> <i class="icon iconfont icon-tx-fill-tuoyuanxing" @click="setOperation('ellipse')" :class="{active:operation == 'ellipse'}"></i>
<i class="icon iconfont icon-shangchuantupian" ></i> <label class="uploadImage">
<input type="file" @change="uploadImage"> <i class="icon iconfont icon-shangchuantupian" ></i>
</label> <input type="file" @change="uploadImage">
<i class="icon iconfont" @click="setOperation('text')" :class="{active:operation == 'text'}">T</i> </label>
<i class="icon iconfont" @click="setOperation('text')" :class="{active:operation == 'text'}">T</i>
</div>
</div> </div>
</div>
<div class="exportCanvasBox_left_tool exportCanvasBox_operation" :class="{'closeNav' :closeNav.move}">
<div class="exportCanvasBox_operation_bor">
<div class="exportCanvasBox_operation_bor_btn">
<i class="icon iconfont icon-xiala" :class="closeNav.move?'icon-rotate':''" @click.stop="setCloseNav('move')"></i>
</div>
<div class="exportCanvasBox_operation_bor_item exportCanvasBox_left_tool_item_column">
<label v-show="operation != 'move' && operation != 'eraser' && operation != 'texture'">
<div >{{ $t('exportModel.Color') }}</div>
<input type="color" @input="setPencilColor" v-model="canvasPencilColor">
</label>
<label v-show="operation != 'move'">
<div >{{ $t('exportModel.Size') }}:</div>
<input @change="setFontFamily" type="range" @input="setPencilWidth" min="3" max="50" v-model="canvasPencilWidth[operation]">
</label>
<label v-show="operation == 'pencil'">
<div >{{ $t('exportModel.Brushwork') }}:</div>
<a-select ref="select" class="label_select" size="small" v-model:value="brushworkValue"
style="flex: 1"
@change="brushworkChange"
>
<!-- v-model:value="brushwork" -->
<a-select-option class="label_select_item" v-for="item in brushList" :value="item.value">
<img :src="item.url" alt="">
</a-select-option>
</a-select>
</label>
<label v-show="operation == 'texture'" class="texture">
<div >{{ $t('exportModel.Texture') }}:</div>
<a-select ref="select" class="label_select" size="small" v-model:value="textureValue"
style="flex: 1"
@change="textureValueChange"
>
<!-- v-model:value="brushwork" -->
<a-select-option class="label_select_item" v-for="item in textureList" :value="item.value">
<img :src="item.url" alt="">
</a-select-option>
</a-select>
</label>
<label v-show="operation != 'pencil' && operation != 'eraser'&&operation != 'move'&&operation != 'text'&&operation != 'texture'&&operation != ''">
<div >{{ $t('exportModel.FillBack') }}:</div>
<div class="exportCanvasBox_left_tool_item leftAlign">
<i class="icon iconfont icon-tuceng1" @click="setOperationMode('fill')" :class="{active:operationMode == 'fill'}"></i>
<i class="icon iconfont icon-tuceng" @click="setOperationMode('border')" :class="{active:operationMode == 'border'}"></i>
</div>
</label>
<label v-show="operation === 'move'">
<div >{{ $t('exportModel.Layer') }}:</div>
<div class="exportCanvasBox_left_tool_item">
<i class="icon iconfont icon-shangyiceng" @click="setLayerIndex('Front')"></i>
<i class="icon iconfont icon-shangyiceng2" @click="setLayerIndex('Forward')"></i>
<i class="icon iconfont icon-xiayiceng" @click="setLayerIndex('Backwards')"></i>
<i class="icon iconfont icon-shangyiceng1" @click="setLayerIndex('Back')"></i>
</div>
</label>
<label v-show="allSelectWidth > -1 && operation != 'move'">
<div >{{ $t('exportModel.Width') }}</div>
<input type="number" @input="setAllSelectWidth" v-model="allSelectWidth">
</label>
<label v-show="(operation == '' || operation == 'text' || textDataShow) && operation != 'move'">
<div>Font Family</div>
<a-select ref="select" class="label_select" size="small" v-model:value="fontFamily"
style="flex: 1"
@change="setFontFamily"
>
<!-- v-model:value="brushwork" -->
<a-select-option class="label_select_item" v-for="item in textFontFamilyList" :style="{'font-family':item.value}" :value="item.value">
{{item.name}}
</a-select-option>
</a-select>
</label>
<!-- <label v-show="operation != 'move' && operation != 'eraser' && operation != 'texture'">
<div >{{ $t('exportModel.Height') }}</div>
<input type="number" @input="setPencilColor" v-model="canvasPencilColor">
</label> -->
</div>
</div>
</div> </div>
<div class="exportCanvasBox_title" @click.stop="setCloseNav('move')">
<!-- <div class="exportCanvasBox_title" @click.stop="setCloseNav('move')">
{{ $t('exportModel.More') }} {{ $t('exportModel.More') }}
<!-- <div
:class="[
'icon',
'iconfont',
'icon-xiala',
closeNav.move?'icon-rotate':''
]"
>
</div> -->
</div>
<div class="exportCanvasBox_left_tool exportCanvasBox_left_item" :class="{'closeNav' :closeNav.tool}">
<div class="exportCanvasBox_left_tool_item">
<label v-show="operation != 'move' && operation != 'eraser' && operation != 'texture'">
<div >{{ $t('exportModel.Color') }}</div>
<input type="color" @input="setPencilColor" v-model="canvasPencilColor">
</label>
<label v-show="operation != 'move'">
<div >{{ $t('exportModel.Size') }}:</div>
<input @change="setFontFamily" type="range" @input="setPencilWidth" min="3" max="50" v-model="canvasPencilWidth[operation]">
</label>
<label v-show="operation == 'pencil'">
<div >{{ $t('exportModel.Brushwork') }}:</div>
<a-select ref="select" class="label_select" size="small" v-model:value="brushworkValue"
style="flex: 1"
@change="brushworkChange"
>
<!-- v-model:value="brushwork" -->
<a-select-option class="label_select_item" v-for="item in brushList" :value="item.value">
<img :src="item.url" alt="">
</a-select-option>
</a-select>
</label>
<label v-show="operation == 'texture'" class="texture">
<div >{{ $t('exportModel.Texture') }}:</div>
<a-select ref="select" class="label_select" size="small" v-model:value="textureValue"
style="flex: 1"
@change="textureValueChange"
>
<!-- v-model:value="brushwork" -->
<a-select-option class="label_select_item" v-for="item in textureList" :value="item.value">
<img :src="item.url" alt="">
</a-select-option>
</a-select>
</label>
<label v-show="operation != 'pencil' && operation != 'eraser'&&operation != 'move'&&operation != 'text'&&operation != 'texture'&&operation != ''">
<div >{{ $t('exportModel.FillBack') }}:</div>
<div class="exportCanvasBox_left_tool_item leftAlign">
<i class="icon iconfont icon-tuceng1" @click="setOperationMode('fill')" :class="{active:operationMode == 'fill'}"></i>
<i class="icon iconfont icon-tuceng" @click="setOperationMode('border')" :class="{active:operationMode == 'border'}"></i>
</div>
</label>
<label v-show="operation === 'move'">
<div >{{ $t('exportModel.Layer') }}:</div>
<div class="exportCanvasBox_left_tool_item">
<i class="icon iconfont icon-shangyiceng" @click="setLayerIndex('Front')"></i>
<i class="icon iconfont icon-shangyiceng2" @click="setLayerIndex('Forward')"></i>
<i class="icon iconfont icon-xiayiceng" @click="setLayerIndex('Backwards')"></i>
<i class="icon iconfont icon-shangyiceng1" @click="setLayerIndex('Back')"></i>
</div>
</label>
<label v-show="allSelectWidth > -1">
<div >{{ $t('exportModel.Width') }}</div>
<input type="number" @input="setAllSelectWidth" v-model="allSelectWidth">
</label>
<label v-show="operation == '' || operation == 'text' || textDataShow">
<div>Font Family</div>
<a-select ref="select" class="label_select" size="small" v-model:value="fontFamily"
style="flex: 1"
@change="setFontFamily"
>
<!-- v-model:value="brushwork" -->
<a-select-option class="label_select_item" v-for="item in textFontFamilyList" :style="{'font-family':item.value}" :value="item.value">
{{item.name}}
</a-select-option>
</a-select>
</label>
<!-- <label v-show="operation != 'move' && operation != 'eraser' && operation != 'texture'">
<div >{{ $t('exportModel.Height') }}</div>
<input type="number" @input="setPencilColor" v-model="canvasPencilColor">
</label> -->
</div>
</div>
<div class="exportCanvasBox_left_bottom">
<div class="exportCanvasBox_left_credits" v-show="credits<1">
<div><span class="icon iconfont icon-zhuyi"></span>{{ $t('exportModel.insufficient') }}</div>
</div>
<div class="exportCanvasBox_left_btn Guide_1_38">
<!-- <div class="subitOkPreviewBtn" :class="{active:allBoardData.printboardFiles.length<=0}" :title="allBoardData.printboardFiles.length<=0?$t('exportModel.jsContent2'):''" @click="setHDExport">{{ $t('exportModel.HDExport') }}</div> -->
<div class="subitOkPreviewBtn" @click="setSubmit">{{ $t('exportModel.Save') }}</div>
<div class="subitOkPreviewBtn" @click="setShare">{{ $t('exportModel.Share') }}</div>
<div class="subitOkPreviewBtn" @click="setExport">{{ $t('exportModel.Export') }}</div>
</div>
</div> </div>
-->
</div> </div>
<!-- <div @click="toSvg">12312312312</div> --> <!-- <div @click="toSvg">12312312312</div> -->
<div class="exportCanvasBox_center" :style="[isMoible?'overflow: hidden;':'']"> <div class="exportCanvasBox_center" :style="[isMoible?'overflow: hidden;':'']">
@@ -219,6 +199,18 @@
<div v-if="isMoible" class="exportCanvasBox_scroll"> <div v-if="isMoible" class="exportCanvasBox_scroll">
<div></div> <div></div>
</div> </div>
<div class="exportCanvasBox_bottom">
<div class="exportCanvasBox_left_btn Guide_1_38">
<div class="exportCanvasBox_left_credits" v-show="credits<1">
<div><span class="icon iconfont icon-zhuyi"></span>{{ $t('exportModel.insufficient') }}</div>
</div>
<!-- <div class="subitOkPreviewBtn" :class="{active:allBoardData.printboardFiles.length<=0}" :title="allBoardData.printboardFiles.length<=0?$t('exportModel.jsContent2'):''" @click="setHDExport">{{ $t('exportModel.HDExport') }}</div> -->
<div class="subitOkPreviewBtn" @click="setSubmit">{{ $t('exportModel.Save') }}</div>
<div class="subitOkPreviewBtn" @click="setShare">{{ $t('exportModel.Share') }}</div>
<div class="subitOkPreviewBtn" @click="setExport">{{ $t('exportModel.Export') }}</div>
</div>
</div>
<!-- <div class="exportCanvasBox_right"> <!-- <div class="exportCanvasBox_right">
<div class="exportCanvasBox_title"> <div class="exportCanvasBox_title">
High-definition Download High-definition Download
@@ -363,7 +355,7 @@ export default defineComponent({
let normalCanvasState = ref([])//存放canvas操作 let normalCanvasState = ref([])//存放canvas操作
let isLoadCanvas = false//撤回或者反撤回false为撤回 let isLoadCanvas = false//撤回或者反撤回false为撤回
let userlikeGroupId = 0 let userlikeGroupId = 0
let imgWidth = {} //这是设置画布等宽
let submitCanvasContent = null let submitCanvasContent = null
let init = (productData) => { let init = (productData) => {
userlikeGroupId = productData.userlikeGroupId userlikeGroupId = productData.userlikeGroupId
@@ -393,7 +385,7 @@ export default defineComponent({
height: canvasWH.value.height, height: canvasWH.value.height,
isDrawingMode: false, // 开启绘图模式 isDrawingMode: false, // 开启绘图模式
}); });
brushIndicator = clearBrushIndicator() brushIndicator = createBrushIndicator()
canvasOnDrop()//开启鼠标到画布事件 canvasOnDrop()//开启鼠标到画布事件
if(!fabric.Object.prototype.controls.deleteControl){//设置元素删除 if(!fabric.Object.prototype.controls.deleteControl){//设置元素删除
JSSetRemoveImage(deleteObject) JSSetRemoveImage(deleteObject)
@@ -451,6 +443,9 @@ export default defineComponent({
let data = { let data = {
userLikeGroupId:userlikeGroupId userLikeGroupId:userlikeGroupId
} }
arr.forEach((item)=>{
if(item !== 'likeDesignCollectionList')imgWidth[item] = setImageWidth(item)
})
isShowMark.value = true isShowMark.value = true
let oldExportCanvas let oldExportCanvas
let localCanvas = localStorage.getItem('canvasContent') let localCanvas = localStorage.getItem('canvasContent')
@@ -486,8 +481,6 @@ export default defineComponent({
}); });
}) })
} }
console.log(oldExportCanvas);
// arr.forEach((item,index)=>{ // arr.forEach((item,index)=>{
if(oldExportCanvas){ if(oldExportCanvas){
canvasWH.value.height = oldExportCanvas.canvasHeight canvasWH.value.height = oldExportCanvas.canvasHeight
@@ -500,10 +493,6 @@ export default defineComponent({
for (const key in allBoardData.value) { for (const key in allBoardData.value) {
if (item == key) { if (item == key) {
//循环渲染顺序 //循环渲染顺序
let imgWidth //这是设置画布等宽
if(item !== 'likeDesignCollectionList' && item !== 'FinalizeImage'){
imgWidth = await setImageWidth(key);
}
let sketchGroupingItem = []; let sketchGroupingItem = [];
if ( if (
item == "moodboardFiles" && item == "moodboardFiles" &&
@@ -530,17 +519,14 @@ export default defineComponent({
resolve(); resolve();
} else { } else {
let itemCanvasImg = allItem.imgUrl; let itemCanvasImg = allItem.imgUrl;
if(item == 'FinalizeImage'){
console.log(allItem);
}
if (key == "likeDesignCollectionList") { if (key == "likeDesignCollectionList") {
itemCanvasImg = itemCanvasImg =
allItem.designOutfitUrl; allItem.designOutfitUrl;
} }
if(item == 'likeDesignCollectionList' || item == 'FinalizeImage')imgWidth = await setImageWidth(key,itemCanvasImg);
fabric.Image.fromURL(itemCanvasImg,(img) => { fabric.Image.fromURL(itemCanvasImg,(img) => {
let scaleWH = imgWidth / img.width; //计算放到画布上缩小倍率 if(item == 'likeDesignCollectionList')imgWidth[item] = setImageWidth(key,img);
let scaleWH = imgWidth[item] / img.width; //计算放到画布上缩小倍率
if(key == "sketchboardFiles"){ if(key == "sketchboardFiles"){
if(allItemIndex == 0){ if(allItemIndex == 0){
position.x = 0; position.x = 0;
@@ -552,7 +538,7 @@ export default defineComponent({
position.y = maxHeight; position.y = maxHeight;
} }
} }
setCanvasImage(img,key,position.x,position.y,allItem,imgWidth)//设置图片 setCanvasImage(img,key,position.x,position.y,allItem)//设置图片
position.height = img.height * scaleWH + margin; position.height = img.height * scaleWH + margin;
if (key == "sketchboardFiles") { if (key == "sketchboardFiles") {
if (sketchGroupingItem.length <3) { if (sketchGroupingItem.length <3) {
@@ -612,7 +598,6 @@ export default defineComponent({
} }
updateCanvasState('')//加载完成后记录一下 updateCanvasState('')//加载完成后记录一下
setOperation('move') setOperation('move')
closeNav.value.tool = true
submitCanvasContent = setInterval(()=>{ submitCanvasContent = setInterval(()=>{
let data = setCanvasContent(true) let data = setCanvasContent(true)
if(data.objects.length == 0){ if(data.objects.length == 0){
@@ -656,7 +641,7 @@ export default defineComponent({
} }
let setImageWidth = async (key,img)=>{ let setImageWidth = (key,img)=>{
let imgWidth = canvasWH.value.width; //这是设置画布等宽 let imgWidth = canvasWH.value.width; //这是设置画布等宽
if ( if (
disposeMoodboardShow && disposeMoodboardShow &&
@@ -679,20 +664,13 @@ export default defineComponent({
(sketchGrouping - 1) * 20) / (sketchGrouping - 1) * 20) /
sketchGrouping; sketchGrouping;
} }
if (key == "likeDesignCollectionList" || key == 'FinalizeImage') { if (key == "likeDesignCollectionList") {
if(img){ if(img){
await new Promise((resolve, reject) => { let imgObj = JSON.parse(JSON.stringify(img))
let imgObj = new Image(); let height = imgObj.height
imgObj.onload = function () { imgObj.height = canvasWH.value.width / 4 * 1.8
let height = imgObj.height let heightScale = imgObj.height / height
imgObj.height = canvasWH.value.width / 4 * 1.8 imgWidth = imgObj.width * heightScale
let heightScale = imgObj.height / height
imgWidth = imgObj.width * heightScale
// imgObj.remove()
resolve(imgObj.width)
}
imgObj.src = img;
})
} }
// imgWidth = // imgWidth =
@@ -702,33 +680,32 @@ export default defineComponent({
} }
return imgWidth return imgWidth
} }
let setCanvasImage = (img,key,left,top,data,imgWidth)=>{ let setCanvasImage = (img,key,left,top,data)=>{
console.log(img,key,data,imgWidth);
// data // data
if(key == 'likeDesignCollectionList' || key == 'FinalizeImage')imgWidth = setImageWidth(key,data.designOutfitUrl);
let imgId = 0 let imgId = 0
let minioUrl = ''//表示收藏或者generate let minioUrl = ''//表示收藏或者generate
let imgUrl = data.imgUrl let imgUrl = data.imgUrl
if (key == "likeDesignCollectionList") { if (key == "likeDesignCollectionList") {
imgUrl = data.designOutfitUrl; imgUrl = data.designOutfitUrl;
imgWidth[key] = setImageWidth(key,img);
} }
let url = imgUrl.split('?')[0] let url = imgUrl.split('?')[0]
var match = url.match(/:(\d+)\/(.*)/); var match = url.match(/:(\d+)\/(.*)/);
minioUrl = match[2] minioUrl = match[2]
// let id = // let id =
let proportion = img.height / img.width; //计算图形宽高比例 let proportion = img.height / img.width; //计算图形宽高比例
// let imgWidth = setImageWidth(key) // let imgWidth = setImageWidth(key)
let scaleWH = imgWidth / img.width; //计算放到画布上缩小倍率 let scaleWH = imgWidth[key] / img.width; //计算放到画布上缩小倍率
img.set({ img.set({
// width: imgWidth/img.width, // width: imgWidth[key]/img.width,
// height: canvasWH.value.height/img.height, // height: canvasWH.value.height/img.height,
left, left,
top, top,
imgId, imgId,
minioUrl, minioUrl,
scaleX: scaleX:
imgWidth / img.width, imgWidth[key] / img.width,
scaleY:(img.width * proportion * scaleWH) / img.height, scaleY:(img.width * proportion * scaleWH) / img.height,
// cornerSize: 10, // 选中时角的大小为20 // cornerSize: 10, // 选中时角的大小为20
// transparentCorners: false, // 选中时角是被填充了。true 空心false 实心 // transparentCorners: false, // 选中时角是被填充了。true 空心false 实心
@@ -917,12 +894,17 @@ export default defineComponent({
}; };
let closeNav = ref({ let closeNav = ref({
nav:true, nav:false,
tool:false, tool:false,
move:false, move:false,
}) })
let setCloseNav = (key)=>{ let setCloseNav = (key)=>{
closeNav.value[key] = !closeNav.value[key] closeNav.value[key] = !closeNav.value[key]
// for (const iterator in closeNav.value) {
// if(key != iterator){
// closeNav.value[iterator] = false
// }
// }
} }
function multiselect() {//获取整体宽高 function multiselect() {//获取整体宽高
canvas.discardActiveObject() // 丢弃当前活动的对象和触发事件。 如果fabric作为鼠标事件的结果调用该函数则将该事件作为参数传递给自定义事件的fire函数。 当作为一个方法使用时,参数没有任何应用。 canvas.discardActiveObject() // 丢弃当前活动的对象和触发事件。 如果fabric作为鼠标事件的结果调用该函数则将该事件作为参数传递给自定义事件的fire函数。 当作为一个方法使用时,参数没有任何应用。
@@ -1097,7 +1079,8 @@ export default defineComponent({
if(str == 'loadingCompleted'){ if(str == 'loadingCompleted'){
// reverseCanvasState.value.push(canvasAsJson); // reverseCanvasState.value.push(canvasAsJson);
} }
normalCanvasState.value.push(canvasAsJson); if(canvas.contains(brushIndicator))canvas.remove(brushIndicator)
normalCanvasState.value.push(canvasAsJson);
if (isLoadCanvas) { if (isLoadCanvas) {
reverseCanvasState.value = [] reverseCanvasState.value = []
isLoadCanvas = false; isLoadCanvas = false;
@@ -1339,7 +1322,7 @@ export default defineComponent({
} }
} }
let clearBrushIndicator = ()=>{ let createBrushIndicator = ()=>{
let cator = new fabric.Circle({ let cator = new fabric.Circle({
radius:(canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20)/2, radius:(canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20)/2,
fill: '#fff', fill: '#fff',
@@ -2095,13 +2078,19 @@ export default defineComponent({
flex: 1; flex: 1;
// height: 30rem; // height: 30rem;
// overflow-x: hidden; // overflow-x: hidden;
.icon{
transition: all .3s;
}
.icon-rotate{
transform: rotate(-180deg);
}
.exportCanvasBox { .exportCanvasBox {
flex: 1; flex: 1;
overflow-x: hidden; overflow-x: hidden;
display: flex; display: flex;
margin-top: 2rem; margin-top: 2rem;
justify-content: space-between; justify-content: space-between;
flex-direction: column;
.exportCanvasBox_title { .exportCanvasBox_title {
margin-bottom: .5rem; margin-bottom: .5rem;
font-size: 1.8rem; font-size: 1.8rem;
@@ -2115,12 +2104,8 @@ export default defineComponent({
position: sticky; position: sticky;
background: #f9fafb; background: #f9fafb;
z-index: 2; z-index: 2;
.icon{ align-items: flex-start;
transition: all .3s;
}
.icon-rotate{
transform: rotate(-180deg);
}
} }
.exportCanvasBox_intro{ .exportCanvasBox_intro{
margin-bottom: 1rem; margin-bottom: 1rem;
@@ -2130,14 +2115,12 @@ export default defineComponent({
} }
.exportCanvasBox_right, .exportCanvasBox_right,
.exportCanvasBox_left { .exportCanvasBox_left {
width: 25rem; width: 100%;
height: 100%; height: auto;
overflow-x: hidden;
label { label {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 1rem; width: 30%;
width: 100%;
div { div {
width: 8rem; width: 8rem;
} }
@@ -2165,7 +2148,8 @@ export default defineComponent({
} }
.exportCanvasBox_left_item.closeNav{ .exportCanvasBox_left_item.closeNav{
// max-height: 1000rem; // max-height: 1000rem;
height: auto; // height: auto;
display: block;
} }
} }
.exportCanvasBox_left::-webkit-scrollbar, .exportCanvasBox_left::-webkit-scrollbar,
@@ -2173,57 +2157,104 @@ export default defineComponent({
.exportCanvasBox_left { .exportCanvasBox_left {
padding-right: 1rem; padding-right: 1rem;
margin-right: 2rem; margin-right: 2rem;
.exportCanvasBox_left_bottom{ // height: 7rem;
position: sticky; display: flex;
background: #f9fafb; flex-wrap: wrap;
z-index: 2; align-items: flex-start;
bottom: -1px; position: relative;
.exportCanvasBox_left_btn{ >label{
display: flex; width: 20%;
justify-content: space-between;
padding-top: 2rem;
flex-wrap: wrap;
.subitOkPreviewBtn{
position: initial;
transform: none;
margin-bottom: 2rem;
width: 40%;
text-align: center;
&.active{
opacity: .7;
cursor: not-allowed;
}
}
.subitOkPreviewBtn:nth-child(2n){
margin-left: 1rem;
}
.subitOkPreviewBtn:nth-child(3),.subitOkPreviewBtn:nth-child(4){
margin-bottom: 0;
}
}
} }
.exportCanvasBox_title { .exportCanvasBox_title {
padding-right: 2rem; margin: 0 4rem;
position: relative;
} }
.exportCanvasBox_left_item{ .exportCanvasBox_left_item{
overflow: hidden; overflow: hidden;
transition: all .3s; transition: all .3s;
// max-height: 0; // max-height: 0;
height: 0;
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
position: absolute;
} }
.exportCanvasBox_img { .exportCanvasBox_left_item,.exportCanvasBox_imgbor,.exportCanvasBox_operation_bor{
background: #fff;
height: auto;
max-height: 30rem;
border: 1px solid;
display: none;
top: 7rem;
position: absolute;
}
.exportCanvasBox_operation{
left: auto;
right: 0;
z-index: 2;
position: absolute;
top: 7rem;
max-height: 30rem;
height: auto;
border: none;
background: none;
.exportCanvasBox_operation_bor_btn{
// transform: translateX(-100%);
// position: absolute;
border: 1px solid;
cursor: pointer;
width: 4rem;
height: 4rem;
background: #fff;
i{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
transform: rotate(90deg);
&.icon-rotate{
transform: rotate(270deg);
}
}
}
.exportCanvasBox_operation_bor{
overflow: hidden;
position: initial;
transform: translateX(calc(100% - 4rem));
display: block;
transition: all .3s;
border: none;
display: flex;
align-items: flex-start;
background: rgba(0, 0, 0, 0);
.exportCanvasBox_operation_bor_item{
background: #fff;
border: 1px solid;
width: 28rem;
}
label{
width: 100%;
}
}
&.closeNav{
.exportCanvasBox_operation_bor{
transform: translateX(0%);
}
}
}
.exportCanvasBox_imgbor {
// height: auto; // height: auto;
width: 20rem;
overflow-y: auto;
padding: 1rem;
&.exportCanvasBox_imgbor::-webkit-scrollbar{display: none;}
.exportCanvasBox_allItem { .exportCanvasBox_allItem {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
.exportCanvasBox_item { .exportCanvasBox_item {
text-align: center; text-align: center;
.exportCanvasBox_img{ .exportCanvasBox_img{
position: relative; position: relative;
margin-right: 2rem;
margin-bottom: 2rem; margin-bottom: 2rem;
img { img {
max-width: 7rem; max-width: 7rem;
@@ -2245,9 +2276,14 @@ export default defineComponent({
} }
} }
.exportCanvasBox_item_colorBor{
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.exportCanvasBox_item_color{ .exportCanvasBox_item_color{
width: 8rem; width: 8rem;
margin-right: 2rem;
margin-bottom: 2rem; margin-bottom: 2rem;
.exportCanvasBox_item_BGcolor{ .exportCanvasBox_item_BGcolor{
height: 5rem; height: 5rem;
@@ -2272,12 +2308,17 @@ export default defineComponent({
} }
} }
.exportCanvasBox_left_tool{ .exportCanvasBox_left_tool{
.exportCanvasBox_left_tool_item_column{
flex-direction: column;
padding: 1rem;
}
.exportCanvasBox_left_tool_item{ .exportCanvasBox_left_tool_item{
display: flex; display: flex;
flex: 1; flex: 1;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
margin-bottom: 1rem; align-items: center;
&.leftAlign{ &.leftAlign{
justify-content: flex-start; justify-content: flex-start;
} }
@@ -2290,6 +2331,7 @@ export default defineComponent({
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-shrink: 0;
&.active{ &.active{
border: 1px solid; border: 1px solid;
border-radius: .4rem; border-radius: .4rem;
@@ -2307,20 +2349,36 @@ export default defineComponent({
} }
} }
} }
// .exportCanvasBox_right{ .exportCanvasBox_bottom{
// display: flex; width: 100%;
// flex-direction: column; flex-shrink: 0;
// padding-left: 1rem; background: #f9fafb;
// position: relative; z-index: 2;
// .exportCanvasBox_right_definition{ padding-top: 2rem;
// // display: flex; .exportCanvasBox_left_credits{
// flex: 1; margin-right: auto
// } }
// .exportCanvasBox_right_credits{ .exportCanvasBox_left_btn{
// margin-bottom: 2rem; display: flex;
// } justify-content: flex-end;
flex-wrap: wrap;
// } align-items: flex-start;
.subitOkPreviewBtn{
position: initial;
transform: none;
margin-bottom: 0rem;
width: auto;
text-align: center;
&.active{
opacity: .7;
cursor: not-allowed;
}
}
.subitOkPreviewBtn:nth-child(2n){
margin: 0 1rem;
}
}
}
.exportCanvasBox_center { .exportCanvasBox_center {
flex: 1; flex: 1;
height: 100%; height: 100%;

View File

@@ -185,8 +185,34 @@ export default defineComponent({
//操作移动 //操作移动
layout:{ layout:{
mounted (el,layout:any,binding) { mounted (el,layout:any,binding) {
let mousedown = function(e: MouseEvent){ let mousedown = function(e: MouseEvent){
e.stopPropagation() e.stopPropagation()
let event:any = {
offsetX:e.offsetX,
offsetY:e.offsetY,
clientX:e.clientX,
clientY:e.clientY,
}
console.log(e);
operation(event)
}
let touchstart = function(e: any){
e.stopPropagation()
const touch = e.changedTouches[0];
let event:any = {
offsetX:touch.clientX - e.target.getBoundingClientRect().left,
offsetY: touch.clientY - e.target.getBoundingClientRect().top,
clientX:touch.clientX,
clientY:touch.clientY,
}
console.log(e);
operation(event)
}
let operation = function(e: MouseEvent){
console.log(e);
el.parentElement.children.forEach((v:any) => { el.parentElement.children.forEach((v:any) => {
v.style.left = v.offsetLeft+'px' v.style.left = v.offsetLeft+'px'
v.style.top = v.offsetTop+'px' v.style.top = v.offsetTop+'px'
@@ -203,10 +229,10 @@ export default defineComponent({
let domX = e.clientX - e.offsetX - Number(left)//鼠标到最左侧距离减去鼠标到dom距离再减去已经有的left值 let domX = e.clientX - e.offsetX - Number(left)//鼠标到最左侧距离减去鼠标到dom距离再减去已经有的left值
let domY = e.clientY - e.offsetY - Number(top) let domY = e.clientY - e.offsetY - Number(top)
let mouse = true let mouse = true
document.onmousemove = function(e:MouseEvent){ let mouseMove = function(e:MouseEvent){
if(mouse){ if(mouse){
el.style.left = e.x-mouseX - domX+'px' el.style.left = e.clientX-mouseX - domX+'px'
el.style.top = e.y-mouseY - domY+'px' el.style.top = e.clientY-mouseY - domY+'px'
if(el.offsetLeft <=0){ if(el.offsetLeft <=0){
el.style.left = 0+'px' el.style.left = 0+'px'
} }
@@ -221,18 +247,19 @@ export default defineComponent({
} }
} }
} }
document.onmouseup = function(){ let mouseup = function(){
mouse = false mouse = false
document.onmousemove = ()=>{ el.removeEventListener('mousemove',mouseMove)
el.removeEventListener('mouseup',mouseup)
} //移动端
// el.removeEventListener('mousedown',mousedown)
// el.removeEventListener('mousedown',mousedown)
// document.onmousemove = false;
} }
document.addEventListener('mousemove', mouseMove);
document.addEventListener('mouseup', mouseup);
//移动端
} }
el.addEventListener('mousedown',mousedown) el.addEventListener('mousedown',mousedown)
el.addEventListener('touchstart',touchstart)
}, },
updated (el,layout) { updated (el,layout) {

View File

@@ -0,0 +1,204 @@
<template>
<div class="newPosted_generalMessage_title modal_title_text">
<span>动态</span>
<!-- <div class="newPosted_generalMessage_title_setting pointer" @click="allRead">全部已读</div> -->
</div>
<div class="newPosted_generalMessage_center modal_title_text">
<div class="newPosted_generalMessage_item" v-for="item in dataList" :key="item.id" @click="setRead(item)">
<!-- <a-badge :dot="item.isRead == 0"></a-badge> -->
<div class="newPosted_generalMessage_item_right">
<div class="newPosted_generalMessage_item_img pointer" @click="openOtherUsers(item)">
<img :src="item.avatar" alt="">
</div>
</div>
<div class="newPosted_generalMessage_item_content">
<div class="modal_title_text_intro">{{ item.userName }} </div>
<div class="newPosted_generalMessage_item_content_title pointer" @click="openOtherWork(item)">{{ item.portfolioName }}</div>
<div class="modal_title_text_intro">{{ item.createTime }}</div>
</div>
<div class="newPosted_generalMessage_item_left">
<div class="newPosted_generalMessage_item_img">
<img :src="item.canvas" alt="">
</div>
</div>
</div>
<div class="newPosted_generalMessage_item" style="justify-content: center;" v-if="dataList.length == 0 && isNoData">
没有任何信息~
</div>
<div class="page_loading_box" v-show="!isNoData">
<span class="page_loading" ref="loadingDom" v-show="!isShowMark"></span>
<span v-show="isShowMark">
<a-spin size="large" />
</span>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{
},
setup() {
const router = useRouter()
const store = useStore();
let newPostedMessage = reactive({
activeKey: ref('1'),
dataList:[
],
page:1,
size:10,
isNoData: false,
isShowMark: false,
})
let loadingDom:any = ref(null)
let init = ()=>{
newPostedMessage.isNoData = false
newPostedMessage.page = 0
new IntersectionObserver(
(entries, observer) => {
// 如果不是相交,则直接返回
// console.log(entries[0]);
if (!entries[0].intersectionRatio) return;
newPostedMessage.page+=1
getPostedHistory()
},
// { root:worksPage }
).observe(loadingDom.value);
let data = {
type:'newPosted'
}
Https.axiosPost(Https.httpUrls.oneClickRead,'',{params:data}).then((rv)=>{
store.commit('setMessageSystem',{newPosted:0})
}).catch((err)=>{
})
}
let getPostedHistory = ()=>{
newPostedMessage.isShowMark = true
let data = {
page: newPostedMessage.page,
size: newPostedMessage.size,
type:'newPosted'
}
Https.axiosPost(Https.httpUrls.getHistoryNotification,data).then((rv)=>{
newPostedMessage.isShowMark = false
if(rv.content.length == 0) {
newPostedMessage.isNoData = true
return
}
newPostedMessage.dataList = rv.content
}).catch(() => {
newPostedMessage.isShowMark = false
newPostedMessage.isNoData = true
})
}
let openOtherUsers = (item:any)=>{
const routeUrl = router.resolve({
path:'/home/otherUsers',
query:{
userId:item.senderId
}
})
window.open(routeUrl.href,'_blank')
}
let openOtherWork = (item:any)=>{
const routeUrl = router.resolve({
path:'/home/works',
query:{
workId:item.portfolioId
}
})
window.open(routeUrl.href,'_blank')
}
onMounted(()=>{
})
return{
...toRefs(newPostedMessage),
loadingDom,
init,
getPostedHistory,
openOtherUsers,
openOtherWork,
}
},
data(){
return{
}
},
})
</script>
<style lang="less" scoped>
.modal_title_text{
font-size: 2rem;
line-height: 1.2;
justify-content: space-between;
}
.pointer{
cursor: pointer;
}
.newPosted_generalMessage_title{
display: flex;
}
.newPosted_generalMessage_center{
width: 100%;
max-height: 40rem;
overflow-y: auto;
.newPosted_generalMessage_item{
display: flex;
padding: 1rem 0;
align-items: center;
}
.newPosted_generalMessage_item_right{
margin-right: 1rem;
.newPosted_generalMessage_item_img{
img{
width: 5rem;
border-radius: 50%;
}
}
}
.newPosted_generalMessage_item_left{
height: 10rem;
margin-left: auto;
.newPosted_generalMessage_item_img{
height: 100%;
img{
width: 5rem;
max-height: 100%;
object-fit: cover;
}
}
}
.newPosted_generalMessage_item_content{
display: flex;
flex-direction: column;
align-items: flex-start;
margin-right: 1rem;
.newPosted_generalMessage_item_content_title:hover{
text-decoration: underline;
}
div{
text-align: left
}
}
}
.page_loading_box{
text-align: center;
height: 50px;
.page_loading{
display: block;
width: 50px;
height: 50px;
margin: 0 auto;
}
}
</style>

View File

@@ -26,7 +26,7 @@
<div class="Guide_1_32"> <div class="Guide_1_32">
<div class="productImg_content_item_title productImg_content_item_title_menu"> <div class="productImg_content_item_title productImg_content_item_title_menu">
<span>{{$t('ProductImg.MagicTools')}}</span> <span>{{$t('ProductImg.MagicTools')}}</span>
<generalMenu class="productImg_content_item_title_menubtn hideEvents" :dataList="productimgMenuList" @setprintModel="setproduct" :item="productimgMenu"></generalMenu> <generalMenu class="productImg_content_item_title_menubtn" :class="{hideEvents:driver__.driver}" :dataList="productimgMenuList" @setprintModel="setproduct" :item="productimgMenu"></generalMenu>
</div> </div>
<div class="input_border productImg_content_item_generate"> <div class="input_border productImg_content_item_generate">
<div class="input_box"> <div class="input_box">
@@ -34,7 +34,7 @@
<input <input
class="search_input" class="search_input"
:placeholder="$t('Generate.inputContent1')" :placeholder="$t('Generate.inputContent1')"
v-model="searchName" v-model="searchName[productimgMenu.value]"
@keydown.enter="getPrductimg()" @keydown.enter="getPrductimg()"
/> />
<i v-show="!isTextarea" class="fi fi-br-expand" @click.stop="()=>isTextarea = !isTextarea"></i> <i v-show="!isTextarea" class="fi fi-br-expand" @click.stop="()=>isTextarea = !isTextarea"></i>
@@ -44,7 +44,7 @@
v-show="isTextarea" v-show="isTextarea"
class="search_textarea " class="search_textarea "
@keydown.enter="getPrductimg()" @keydown.enter="getPrductimg()"
v-model="searchName" v-model="searchName[productimgMenu.value]"
></textarea> ></textarea>
</div> </div>
@@ -75,7 +75,20 @@
</a-slider> --> </a-slider> -->
<a-select style="width: 100%;" v-model:value="RelightDirection" :options="RelightDirectionList"></a-select> <a-select style="width: 100%;" v-model:value="RelightDirection" :options="RelightDirectionList"></a-select>
</div> </div>
<div v-show="productimgMenu.value == 'Relight'" class="productImg_content_item_title productImg_content_item_title_similarity">
<span>{{$t('ProductImg.Highlight')}}</span>
</div>
<div v-show="productimgMenu.value == 'Relight'" class="productImg_content_item_similarity">
<a-slider class="system_silder"
v-model:value="brightenValue"
:tooltipVisible="false"
:max="5"
:min="1"
:step="0.1"
>
</a-slider>
<input type="number" readonly v-model="brightenValue">
</div>
<div class="productImg_content_item_title">{{$t('ProductImg.SelectCollection')}}</div> <div class="productImg_content_item_title">{{$t('ProductImg.SelectCollection')}}</div>
<div class="productImg_content_item_imgBox generalScroll" v-mousewheel> <div class="productImg_content_item_imgBox generalScroll" v-mousewheel>
<div class="content_item_imgBox_itemImg" v-for="item,index in selectList[productimgMenu.value]" :key="item.id" > <div class="content_item_imgBox_itemImg" v-for="item,index in selectList[productimgMenu.value]" :key="item.id" >
@@ -162,7 +175,7 @@
</div> </div>
</div> </div>
<div class="productImg_right_item_iconLeft" > <div class="productImg_right_item_iconLeft" >
<div class="productImg_right_item_scale hideEvents" :style="[(driver__.index == 46 || driver__.index == 47 || driver__.index == 48)?'display: flex;':'']" @click.stop="setScaleImage(generateList,index,true)"> <div class="productImg_right_item_scale" :class="{hideEvents:driver__.driver}" :style="[(driver__.index == 46 || driver__.index == 47 || driver__.index == 48)?'display: flex;':'']" @click.stop="setScaleImage(generateList,index,true)">
<i class="fi fi-bs-expand-arrows-alt"></i> <i class="fi fi-bs-expand-arrows-alt"></i>
</div> </div>
<div v-show="item.resultType != 'Relight'" class="productImg_right_item_menu Guide_1_34" :style="[(driver__.index == 46 || driver__.index == 47 || driver__.index == 48)?'display: flex;':'']" @click.stop="setMenuShow(item)"> <div v-show="item.resultType != 'Relight'" class="productImg_right_item_menu Guide_1_34" :style="[(driver__.index == 46 || driver__.index == 47 || driver__.index == 48)?'display: flex;':'']" @click.stop="setMenuShow(item)">
@@ -213,6 +226,7 @@
:productData="{ :productData="{
upload:upload, upload:upload,
similarity:similarity, similarity:similarity,
brightenValue:brightenValue,
RelightDirection:RelightDirection, RelightDirection:RelightDirection,
RelightDirectionList:RelightDirectionList, RelightDirectionList:RelightDirectionList,
}" }"
@@ -256,7 +270,10 @@ export default defineComponent({
let productImgData:any = reactive({ let productImgData:any = reactive({
isShowMark:false, isShowMark:false,
fileList:{}, fileList:{},
searchName:'', searchName:{
ToProductImage:'',
Relight:'',
},
isTextarea:false,//是否展开 isTextarea:false,//是否展开
remProductimg:false,//是否出现取消按钮 remProductimg:false,//是否出现取消按钮
isProductimg:false,//开始生成 isProductimg:false,//开始生成
@@ -264,6 +281,7 @@ export default defineComponent({
generateList:[], generateList:[],
likeList:[], likeList:[],
similarity:30, similarity:30,
brightenValue:1,
}) })
let productimgMenuList = ref([ let productimgMenuList = ref([
{ {
@@ -487,10 +505,11 @@ export default defineComponent({
} }
let imageStrength = productImgData.similarity == 100? 95 :productImgData.similarity let imageStrength = productImgData.similarity == 100? 95 :productImgData.similarity
let data:any ={ let data:any ={
prompt:productImgData.searchName, prompt:productImgData.searchName[productimgMenu.value.value],
toProductImageVOList:selectArr, toProductImageVOList:selectArr,
userLikeGroupId:upload.value.userlikeGroupId, userLikeGroupId:upload.value.userlikeGroupId,
direction:RelightDirection.value, direction:RelightDirection.value,
brightenValue:productImgData.brightenValue,
imageStrength:(100 - imageStrength)/100, imageStrength:(100 - imageStrength)/100,
} }
productImgData.isProductimg = true productImgData.isProductimg = true
@@ -587,7 +606,11 @@ export default defineComponent({
if(generateProceedList){ if(generateProceedList){
// let str = generateProceedList.map((obj:any) => obj.taskId).join(','); // let str = generateProceedList.map((obj:any) => obj.taskId).join(',');
let str = generateProceedList.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( Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then(
(rv) => { (rv) => {
generateProceedList = [] generateProceedList = []
@@ -607,6 +630,9 @@ export default defineComponent({
// scaleImage.value.isProductimg = false // scaleImage.value.isProductimg = false
scaleImage.value.init(arr,index) scaleImage.value.init(arr,index)
scaleImage.value.isLike = false 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 scaleImage.value.isComparison = true
} }
let generalIsMenuShow:any = {} let generalIsMenuShow:any = {}
@@ -853,13 +879,17 @@ methods: {
.productImg_left{ .productImg_left{
width: 25%; width: 25%;
position: relative; position: relative;
.Guide_1_32{
height: 100%;
overflow-y: auto;
&.Guide_1_32::-webkit-scrollbar{display: none;}
}
.upload_file_item{ .upload_file_item{
display: flex; display: flex;
margin-right: 1rem; margin-right: 1rem;
width: auto !important; width: auto !important;
height: 14rem !important; height: 14rem !important;
border: none !important; border: none !important;
margin-bottom: 0 !important;
&.upload_file_item:last-child{ &.upload_file_item:last-child{
margin-right: 0rem; margin-right: 0rem;
} }

View File

@@ -71,7 +71,20 @@
</a-slider> --> </a-slider> -->
<a-select style="width: 100%;" v-model:value="productimgRelightDirection" :options="productimgRelightDirectionList"></a-select> <a-select style="width: 100%;" v-model:value="productimgRelightDirection" :options="productimgRelightDirectionList"></a-select>
</div> </div>
<div v-show="scaleImageList[scaleImageIndex]?.resultType == 'Relight'" class="productImg_content_item_title productImg_content_item_title_similarity">
<span>{{$t('ProductImg.Highlight')}}</span>
</div>
<div v-show="scaleImageList[scaleImageIndex]?.resultType == 'Relight'" class="productImg_content_item_similarity">
<a-slider class="system_silder"
v-model:value="productimgBrightenValue"
:tooltipVisible="false"
:max="5"
:min="1"
:step="0.1"
>
</a-slider>
<input type="number" readonly v-model="productimgBrightenValue">
</div>
<div class="productImg_content_item_generate_btn input_border"> <div class="productImg_content_item_generate_btn input_border">
<div class="input_box"> <div class="input_box">
<div v-show="!productimgIsProductimg" class="generage_btn started_btn" @click.stop="getPrductimg"> <div v-show="!productimgIsProductimg" class="generage_btn started_btn" @click.stop="getPrductimg">
@@ -140,12 +153,14 @@ export default defineComponent({
type:Object, type:Object,
default:{ default:{
similarity:30, similarity:30,
brightenValue:1,
upload:'', upload:'',
}, },
} }
}, },
setup(props:any,{emit}) { setup(props:any,{emit}) {
const store = useStore(); const store = useStore();
let productimg = reactive({ let productimg = reactive({
isProductimg:false, isProductimg:false,
productimgSearchName:'', productimgSearchName:'',
@@ -153,6 +168,7 @@ export default defineComponent({
productimgRemProductimg:false, productimgRemProductimg:false,
productimgIsProductimg:false, productimgIsProductimg:false,
productimgSimilarity:props.productData.similarity, productimgSimilarity:props.productData.similarity,
productimgBrightenValue:props.productData.brightenValue,
productimgUpload:props.productData.upload, productimgUpload:props.productData.upload,
productimgRelightDirection:props.productData.RelightDirection, productimgRelightDirection:props.productData.RelightDirection,
productimgRelightDirectionList:props.productData.RelightDirectionList, productimgRelightDirectionList:props.productData.RelightDirectionList,
@@ -186,6 +202,7 @@ export default defineComponent({
direction:productimg.productimgRelightDirection, direction:productimg.productimgRelightDirection,
prompt:productimg.productimgSearchName, prompt:productimg.productimgSearchName,
toProductImageVOList:[obj], toProductImageVOList:[obj],
brightenValue:productimg.productimgBrightenValue,
userLikeGroupId:productimg.productimgUpload.userlikeGroupId, userLikeGroupId:productimg.productimgUpload.userlikeGroupId,
imageStrength:(100 - imageStrength)/100, imageStrength:(100 - imageStrength)/100,
} }
@@ -268,7 +285,11 @@ export default defineComponent({
if(generateProceedList){ if(generateProceedList){
// let str = generateProceedList.map((obj:any) => obj.taskId).join(','); // let str = generateProceedList.map((obj:any) => obj.taskId).join(',');
let str = generateProceedList.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( Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then(
(rv) => { (rv) => {
generateProceedList = [] generateProceedList = []

View File

@@ -6,6 +6,7 @@ export default {
HISTORY:'历史', HISTORY:'历史',
WORKS:'作品广场', WORKS:'作品广场',
EVENTS:'活动', EVENTS:'活动',
personal:'个人中心',
bindEmail:'绑定邮箱', bindEmail:'绑定邮箱',
logOff:'退出登录', logOff:'退出登录',
Tutorial:'教程', Tutorial:'教程',
@@ -159,6 +160,7 @@ export default {
Upload:'上传', Upload:'上传',
MagicTools:'转换产品图工具', MagicTools:'转换产品图工具',
Similarity:'相似度', Similarity:'相似度',
Highlight:'高亮',
RelightDirection:'打光方向', RelightDirection:'打光方向',
GenerateProduct:'生成的产品', GenerateProduct:'生成的产品',
SelectedProduct:'选择的产品', SelectedProduct:'选择的产品',
@@ -556,6 +558,31 @@ export default {
jsContent5:'是否删除当前作品', jsContent5:'是否删除当前作品',
jsContent6:'作品被作者删除', jsContent6:'作品被作者删除',
}, },
account:{
personCentered:'个人中心',
myInformation:'我的信息',
Home:'首页',
Messages:'消息中心',
Follow:'关注',
Fans:'粉丝',
editUser:'修改个人信息',
//编辑个人信息页
userName:'用户名',
email:'邮箱',
Submit:'提交',
//消息
systemMessages:'系统消息',
comment:'评论',
like:'点赞',
NewFans:'新增粉丝',
AllRead:'全部已读',
dataNull:'没有任何信息~',
reply:'评论你的作品',
followedYou:'关注了你',
likedYourWork:'赞了你的作品',
//互动
Interact:'互动',
},
guide:{ guide:{
guide1:"在<strong>工作空间</strong>中,您可以个性化您的设计设置,包括选择适用于男装或女装的设计,以及选择用于创作的人体模型。", guide1:"在<strong>工作空间</strong>中,您可以个性化您的设计设置,包括选择适用于男装或女装的设计,以及选择用于创作的人体模型。",
guide2:"选择您要设计的服装性别。", guide2:"选择您要设计的服装性别。",

View File

@@ -6,6 +6,7 @@ export default {
HISTORY:'HISTORY', HISTORY:'HISTORY',
WORKS:'GALLERY', WORKS:'GALLERY',
EVENTS:'EVENTS', EVENTS:'EVENTS',
personal:'Personal Center',
bindEmail:'bind email', bindEmail:'bind email',
logOff:'log off', logOff:'log off',
Tutorial:'Tutorial', Tutorial:'Tutorial',
@@ -39,7 +40,6 @@ export default {
createTime:'Create Time', createTime:'Create Time',
}, },
payOrder:{ payOrder:{
OrderInformation:'Order Information', OrderInformation:'Order Information',
CreditsInformation:'Credits Information', CreditsInformation:'Credits Information',
}, },
@@ -159,6 +159,7 @@ export default {
SelectCollection:'Select Collection', SelectCollection:'Select Collection',
Upload:'Upload', Upload:'Upload',
Similarity:'Similarity', Similarity:'Similarity',
Highlight:'Highlight',
RelightDirection:'Relight Direction', RelightDirection:'Relight Direction',
MagicTools:'To Product lmage Tool', MagicTools:'To Product lmage Tool',
GenerateProduct:'Generate Product', GenerateProduct:'Generate Product',
@@ -557,6 +558,31 @@ export default {
jsContent5:'Whether to delete the current gallery', jsContent5:'Whether to delete the current gallery',
jsContent6:'The author deleted the work', 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:{ guide:{
guide1:"You can personalize your design settings right here in the <strong>Workspace</strong>, including choosing to design for men's or women's wear, as well as selecting the mannequin to use for your creations.", guide1:"You can personalize your design settings right here in the <strong>Workspace</strong>, 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.", guide2:"Select the apparel type you'd like to work on.",

View File

@@ -0,0 +1,23 @@
import {Module} from 'vuex'
import {RootState} from '../index'
interface DesignDetail{
allUserList:any,
}
const adminPage : Module<DesignDetail,RootState> = {
state:{
allUserList:[],
},
mutations:{
setAllUserList(state,files){
state.allUserList = files
},
},
actions:{
}
}
export default adminPage

View File

@@ -5,6 +5,7 @@ import HomeStoreModule from './homeStore/homeStore'
import UserHabit from './userHabit/userHabit' import UserHabit from './userHabit/userHabit'
import Workspace from './workspace/workspace' import Workspace from './workspace/workspace'
import Guide from './guide/guide' import Guide from './guide/guide'
import adminPage from './adminPage/adminPage'
export interface RootState{ export interface RootState{
} }
@@ -25,5 +26,6 @@ export default createStore<RootState>({
UserHabit, UserHabit,
Workspace, Workspace,
Guide, Guide,
adminPage,
} }
}) })

View File

@@ -91,17 +91,20 @@ const userHabit : Module<UserHabit,RootState> = {
setMessageSystem(state,data){ setMessageSystem(state,data){
let num = 0 let num = 0
for (const iterator in data) { for (const iterator in data) {
num+=data[iterator] if(iterator != 'newPosted'){
if(!state.messageSystem.messageType[iterator]){ num+=data[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.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 state.messageSystem.messageNum = num
}, },

View File

@@ -87,6 +87,7 @@ axios.interceptors.response.use((res) =>{
} }
}, function(error) { }, function(error) {
if(error?.response?.status === 401 && router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login if(error?.response?.status === 401 && router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login
return
clonAllCookie() clonAllCookie()
if(!isLoginTime){ if(!isLoginTime){
isLoginTime = true isLoginTime = true

View File

@@ -436,27 +436,28 @@ function segmentImage(markerImage,fullImage,size){
const ctx1 = markerCanvas.getContext('2d'); const ctx1 = markerCanvas.getContext('2d');
const ctx2 = fullCanvas.getContext('2d'); const ctx2 = fullCanvas.getContext('2d');
const ctx3 = nullCanvas.getContext('2d'); const ctx3 = nullCanvas.getContext('2d');
let targetMarkerUrl = '' markerCanvas.width=size.width
let targetFullUrl = '' 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 marker = new Image();
const full = 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'; marker.crossOrigin = 'anonymous';
full.crossOrigin = 'anonymous'; full.crossOrigin = 'anonymous';
marker.onload = () => { marker.onload = () => {
ctx1.drawImage(marker,0,0 ,size.width, size.height); ctx1.drawImage(marker,0,0 ,size.width, size.height);
full.onload = () => { full.onload = () => {
ctx2.drawImage(full,0,0, size.width, size.height); ctx2.drawImage(full,0,0, size.width, size.height);
segmentImage(); segmentImageItem();
}; };
full.src = fullImage;
}; };
marker.src = markerImage; marker.src = markerImage;
full.src = fullImage; function segmentImageItem() {
function segmentImage() {
const markerData = ctx1.getImageData(0, 0, size.width, size.height); const markerData = ctx1.getImageData(0, 0, size.width, size.height);
const fullData = ctx2.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 color1 = { r: 255, g: 0, b: 0 }; // 第一个颜色
const color2 = { r: 0, g: 255, 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) => const isColorMatch = (r, g, b, color) =>
Math.abs(r - color.r) < threshold && (Math.abs(r - color.r) < threshold || Math.abs(0 - color.r) < threshold) &&
Math.abs(g - color.g) < threshold && (Math.abs(g - color.g) < threshold || Math.abs(0 - color.g) < threshold) &&
Math.abs(b - color.b) < threshold; (Math.abs(b - color.b) < threshold || Math.abs(0 - color.b) < threshold)
const output1 = ctx3.createImageData(size.width, size.height); const output1 = ctx3.createImageData(size.width, size.height);
const output2 = 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); ctx.putImageData(imageData, 0, 0);
return canvas.toDataURL('image/png'); return canvas.toDataURL('image/png');
}; };
targetMarkerUrl =createImageURL(output1) targetBackUrl =createImageURL(output2)
targetFullUrl =createImageURL(output2) targetFrontUrl =createImageURL(output1)
console.log(targetFullUrl,targetMarkerUrl); resolve({targetFrontUrl, targetBackUrl})
resolve({targetMarkerUrl, targetFullUrl})
} }
}) })
} }

View File

@@ -81,6 +81,7 @@ import { getUploadUrl } from "@/tool/util";
import scaleImage from "@/component/HomePage/scaleImage.vue"; import scaleImage from "@/component/HomePage/scaleImage.vue";
import { openGuide,driverObj__,driverIndex__ } from "@/tool/guide"; import { openGuide,driverObj__,driverIndex__ } from "@/tool/guide";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import store from "@/store";
export default defineComponent({ export default defineComponent({
components: { components: {
MailOutlined, MailOutlined,
@@ -90,7 +91,8 @@ export default defineComponent({
props: ["msg",'sketchCatecoryList'], props: ["msg",'sketchCatecoryList'],
setup() { setup() {
const router = useRouter() const router = useRouter()
const route:any = useRoute() // const route:any = useRoute()
const store:any = useStore()
const state:any = reactive({ const state:any = reactive({
rootSubmenuKeys: [{ rootSubmenuKeys: [{
name:'All User', name:'All User',
@@ -263,7 +265,7 @@ export default defineComponent({
//储存所有用户id和name //储存所有用户id和name
Https.axiosGet(Https.httpUrls.getAllUserId,).then((rv: any) => { Https.axiosGet(Https.httpUrls.getAllUserId,).then((rv: any) => {
if (rv) { if (rv) {
sessionStorage.setItem('allUserList',JSON.stringify(rv)); store.commit('setAllUserList',rv);
} }
}) })
let allCountry = country let allCountry = country

View File

@@ -14,20 +14,20 @@
<!-- 点击事件就用下面的div --> <!-- 点击事件就用下面的div -->
<!-- <div class="attention_item attention_item_active"> --> <!-- <div class="attention_item attention_item_active"> -->
<div>{{ userInfo?.followeeCount }}</div> <div>{{ userInfo?.followeeCount }}</div>
<span>关注</span> <span>{{$t('account.Follow')}}</span>
</div> </div>
<div class="attention_item"> <div class="attention_item">
<div>{{ userInfo?.followerCount }}</div> <div>{{ userInfo?.followerCount }}</div>
<span>粉丝</span> <span>{{$t('account.Fans')}}</span>
</div> </div>
<div class="attention_item"> <!-- <div class="attention_item">
<div>22</div> <div>22</div>
<span>作品数</span> <span>作品数</span>
</div> </div> -->
</div> </div>
<div class="homeMain_user_detail_item homeMain_user_detail_setUser" @click="openAccount"> <div class="homeMain_user_detail_item homeMain_user_detail_setUser" @click="openAccount">
<i class="fi fi-rr-user"></i> <i class="fi fi-rr-user"></i>
<div>个人中心</div> <div>{{$t('Header.personal')}}</div>
<i class="icon iconfont icon-xiala"></i> <i class="icon iconfont icon-xiala"></i>
</div> </div>
</div> </div>
@@ -48,11 +48,7 @@
></div> ></div>
</div> </div>
<div class="trialApproval button_second credits message">
<a-badge :count="messageNum">
<i class="fi fi-rr-envelope" @click="openMessage"></i>
</a-badge>
</div>
<div <div
class="trialApproval button_second credits hideChecked" class="trialApproval button_second credits hideChecked"
> >
@@ -85,11 +81,29 @@
</nav> --> </nav> -->
<navRouter :routerList="navRouterList"></navRouter> <navRouter :routerList="navRouterList"></navRouter>
<div class="homeMain_right"> <div class="homeMain_right">
<img <!-- <img
class="homeMain_logo" class="homeMain_logo"
@click="turnToNewPage('https://www.aidlab.hk/en/')" @click="turnToNewPage('https://www.aidlab.hk/en/')"
src="@/assets/images/loginPage/aida_logo.png" src="@/assets/images/loginPage/aida_logo.png"
/> /> -->
<div class="trialApproval credits message">
<div class="message_iconItem">
<a-badge :count="messageNum">
<i class="fi fi-rr-envelope" @click="openMessage"></i>
</a-badge>
</div>
<div class="message_iconItem">
<a-badge :count="messageType?.newPosted">
<!-- <i class="fi fi-rr-envelope" @click="openMessage"></i> -->
<i class="fi fi-rr-bell" @click.stop="openNewPosted"></i>
</a-badge>
<div class="message_iconItem_value select_block" v-show="isNewPosted" style="width: 40rem">
<newPosted ref="newPosted"></newPosted>
</div>
</div>
</div>
<Habit></Habit> <Habit></Habit>
</div> </div>
<nav class="select_block" v-show="isShowOperate"> <nav class="select_block" v-show="isShowOperate">
@@ -149,7 +163,7 @@
</div> </div>
</template> </template>
<script > <script >
import { defineComponent, createVNode, ref, computed, onMounted } from "vue"; import { defineComponent, createVNode, ref,toRefs, reactive, computed, onMounted } from "vue";
import { isEmail } from "@/tool/util"; import { isEmail } from "@/tool/util";
import { setCookie, getCookie, WriteCookie,clonAllCookie } from "@/tool/cookie"; import { setCookie, getCookie, WriteCookie,clonAllCookie } from "@/tool/cookie";
import payOrder from "@/component/Pay/payOrder.vue"; import payOrder from "@/component/Pay/payOrder.vue";
@@ -162,6 +176,7 @@ import { Modal, message } from "ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue"; import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import RobotAssist from "@/component/HomePage/RobotAssist.vue"; import RobotAssist from "@/component/HomePage/RobotAssist.vue";
import scaleVideo from "@/component/HomePage/scaleVideo.vue"; import scaleVideo from "@/component/HomePage/scaleVideo.vue";
import newPosted from "@/component/HomePage/newPosted.vue";
import navRouter from "@/component/modules/navRouter.vue"; import navRouter from "@/component/modules/navRouter.vue";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { setLang } from "@/tool/guide"; import { setLang } from "@/tool/guide";
@@ -177,6 +192,7 @@ export default defineComponent({
Habit, Habit,
RobotAssist, RobotAssist,
scaleVideo, scaleVideo,
newPosted,
UpgradePlan, UpgradePlan,
payOrder, payOrder,
TaskPage, TaskPage,
@@ -194,6 +210,7 @@ export default defineComponent({
let credits = computed(()=>{ let credits = computed(()=>{
return store.state.UserHabit.credits.value return store.state.UserHabit.credits.value
}) })
let activeCredits = ref(false) let activeCredits = ref(false)
let getLangIsShowMark = ref(true) let getLangIsShowMark = ref(true)
let AdministratorUserIdList = [88,6,46,31,73,83,87,4] let AdministratorUserIdList = [88,6,46,31,73,83,87,4]
@@ -223,6 +240,19 @@ export default defineComponent({
let messageNum = computed(()=>{ let messageNum = computed(()=>{
return store.state.UserHabit.messageSystem.messageNum return store.state.UserHabit.messageSystem.messageNum
}) })
let messageType = computed(()=>{
return store.state.UserHabit.messageSystem.messageType
})
let stateList = reactive({
isNewPosted:false,
isShowOperate:false,
isLanguage:false,
})
let isNewPosted = ref(false)
let isShowOperate = ref(false)
let isLanguage = ref(false)
let newPosted = ref(null)
let getUnreadCount = ()=>{ let getUnreadCount = ()=>{
Https.axiosGet(Https.httpUrls.getUnreadCount).then((rv)=>{ Https.axiosGet(Https.httpUrls.getUnreadCount).then((rv)=>{
if(rv){ if(rv){
@@ -230,9 +260,9 @@ export default defineComponent({
} }
}) })
} }
MyWs.linkWs("ws://"+MyWs.messageUrl,'message') MyWs.linkWs("ws://"+MyWs.messageUrl,'message')
let getWsMessage = (data)=>{ let getWsMessage = (data)=>{
console.log(data);
store.commit('setMessageSystem',...data) store.commit('setMessageSystem',...data)
} }
MyEvent.add('getMessage',getWsMessage) MyEvent.add('getMessage',getWsMessage)
@@ -242,6 +272,42 @@ export default defineComponent({
// MyWs.ws.onmessage = (data)=>{ // MyWs.ws.onmessage = (data)=>{
// console.log(JSON.parse(data.data),232); // console.log(JSON.parse(data.data),232);
// } // }
let openNewPosted = ()=>{
stateList.isNewPosted = !stateList.isNewPosted
newPosted.value.init()
document.addEventListener(
"click",
closeShowOperateContent,
false
);
}
//点击下拉图标出现操作
let changeShowOperateContent=() =>{
stateList.isShowOperate = !stateList.isShowOperate;
document.addEventListener(
"click",
closeShowOperateContent,
false
);
}
let changeLanguage=() =>{
stateList.isLanguage = !stateList.isLanguage;
document.addEventListener(
"click",
closeShowOperateContent,
false
);
}
//关闭下拉图标
let closeShowOperateContent=() =>{
stateList.isShowOperate = false;
stateList.isLanguage = false
stateList.isNewPosted = false
document.removeEventListener("click", closeShowOperateContent);
}
onMounted(()=>{ onMounted(()=>{
getUnreadCount() getUnreadCount()
}) })
@@ -258,11 +324,17 @@ export default defineComponent({
AdministratorUserIdList, AdministratorUserIdList,
navRouterList, navRouterList,
messageNum, messageNum,
messageType,
...toRefs(stateList),
newPosted,
openNewPosted,
changeShowOperateContent,
changeLanguage,
closeShowOperateContent,
} }
}, },
data() { data() {
return { return {
isShowOperate: false,
bindEmailVisible: false, bindEmailVisible: false,
isHaveBindEmail: false, isHaveBindEmail: false,
bindEmailStep: 1, bindEmailStep: 1,
@@ -275,7 +347,6 @@ export default defineComponent({
numTime: 30, numTime: 30,
timerSec: null, timerSec: null,
modalWarning: null, modalWarning: null,
isLanguage: false,
language:[ language:[
{name:'English',value:'ENGLISH'}, {name:'English',value:'ENGLISH'},
@@ -397,30 +468,6 @@ export default defineComponent({
}, },
//点击下拉图标出现操作
changeShowOperateContent() {
this.isShowOperate = !this.isShowOperate;
document.addEventListener(
"click",
this.closeShowOperateContent,
false
);
},
changeLanguage(){
this.isLanguage = !this.isLanguage;
document.addEventListener(
"click",
this.closeShowOperateContent,
false
);
},
//关闭下拉图标
closeShowOperateContent() {
this.isShowOperate = false;
this.isLanguage = false
document.removeEventListener("click", this.closeShowOperateContent);
},
@@ -601,6 +648,39 @@ export default defineComponent({
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
.message{
display: flex;
width: 6rem;
justify-content: space-between;
margin: 0 2rem;
// padding: 1rem;
i{
margin-left: 0rem;
border-left: none;
padding-left: 0rem;
height: auto;
font-size: 2rem;
width: 3rem;
cursor: pointer;
}
span{
overflow: initial;
align-items: center;
width: auto;
margin: auto;
height: auto;
}
.message_iconItem{
position: relative;
display: flex;
.message_iconItem_value{
padding: 1rem;
left: 50%;
transform: translateX(-50%);
top: 4rem;
}
}
}
} }
.homeMain_logo { .homeMain_logo {
width: 14.4rem; width: 14.4rem;
@@ -726,6 +806,7 @@ export default defineComponent({
align-items: center; align-items: center;
position: relative; position: relative;
height: 3.7rem; height: 3.7rem;
&.marLeft2{ &.marLeft2{
margin-left: 2rem; margin-left: 2rem;
} }
@@ -774,23 +855,7 @@ export default defineComponent({
font-size: 1.8rem; font-size: 1.8rem;
cursor: pointer; cursor: pointer;
} }
&.message{
// padding: 1rem;
i{
margin-left: 0rem;
border-left: none;
padding-left: 0rem;
height: auto;
width: 3rem;
}
span{
overflow: initial;
align-items: center;
width: auto;
margin: auto;
height: auto;
}
}
.fi-br-refresh{ .fi-br-refresh{
margin-left: 0; margin-left: 0;
border-left: none; border-left: none;

View File

@@ -1,54 +1,69 @@
<template> <template>
<div class="homeRecommend_max Guide_1_16_1"> <div class="homeRecommend_max Guide_1_16_1">
<header class="homeRecommend_heade">
<div class="homeRecommend_right_content">
<div class="homeRecommend_user_content">
<img
class="homeRecommend_logo"
@click="turnToNewPage('https://www.aidlab.hk/en/')"
src="@/assets/images/loginPage/aida_logo.png"
/>
</div>
</div>
<div class="homeRecommend_right">
<a class="started_btn" v-if="systemUser.value == 0" href="https://code-create.com.hk/aida/" target="_blank">Upgrade to an official user</a>
<div class="started_btn" v-if="systemUser.value == 1 && !isMoblie" @click="goHome">Home</div>
<div class="started_btn started_btn2" v-if="systemUser.value != -1" @click="logout">log off</div>
</div>
<div class="homeRecommend_right" v-if="systemUser.value == -1">
<div class="started_btn" @click="setLogin">Login</div>
<div class="started_btn started_btn2" @click="setRegister">Visitor registration</div>
</div>
</header>
<div class="homeRecommend_content_body"> <div class="homeRecommend_content_body">
<div class="homeRecommend_content_body_recommend" id="aaaa"> <div class="homeRecommend_content_sticky">
<div class="content_body_recommend_left mdhidden"> <header class="homeRecommend_heade">
<img class="content_body_img1 content_body_img" src="/image/mainImg/img1.png" alt=""> <div class="homeRecommend_right_content">
<img class="content_body_img2 content_body_img" src="/image/mainImg/img2.png" alt=""> <div class="homeRecommend_user_content">
<img class="content_body_img3 content_body_img" src="/image/mainImg/img3.png" alt=""> <img
<img class="content_body_img4 content_body_img" src="/image/mainImg/img4.png" alt=""> class="homeRecommend_logo"
<img class="content_body_img5 content_body_img" src="/image/mainImg/img5.png" alt=""> @click="turnToNewPage('https://www.aidlab.hk/en/')"
</div> src="@/assets/images/loginPage/aida_logo.png"
<div class="content_body_recommend_center content_body_text"> />
<div class="content_body_recommend_center_title"> </div>
<h1>AiDA</h1>
<h3>bloom your creativity</h3>
</div> </div>
<div class="content_body_recommend_center_btn"> <div class="homeRecommend_right">
<a class="started_btn" href="https://code-create.com.hk/aida/" target="_blank">SUBSCRIBE NOW</a> <a class="started_btn" v-if="systemUser.value == 0" href="https://code-create.com.hk/aida/" target="_blank">Upgrade to an official user</a>
<a class="started_btn" href="https://code-create.com.hk/aida-trial/" target="_blank">START TRIAL</a> <div class="started_btn" v-if="systemUser.value == 1 && !isMoblie" @click="goHome">Home</div>
<div class="started_btn started_btn2" v-if="systemUser.value != -1" @click="logout">log off</div>
</div> </div>
</div> <div class="homeRecommend_right" v-if="systemUser.value == -1">
<div class="content_body_recommend_right mdhidden"> <div class="started_btn" @click="setLogin">Login</div>
<img class="content_body_img1 content_body_img" src="/image/mainImg/img6.png" alt=""> <div class="started_btn started_btn2" @click="setRegister">Visitor registration</div>
<img class="content_body_img2 content_body_img" src="/image/mainImg/img7.png" alt=""> </div>
<img class="content_body_img3 content_body_img" src="/image/mainImg/img8.png" alt=""> </header>
<img class="content_body_img4 content_body_img" src="/image/mainImg/img9.png" alt=""> <div class="homeRecommend_content_body_recommend">
<img class="content_body_img5 content_body_img" src="/image/mainImg/img10.png" alt=""> <div class="content_body_recommend_top">
<h1>DESIGN <br> AIDA</h1>
<div class="zindex">
Slooming <br>
Your Creativity
</div>
</div>
<img src="../../public/video/homeVideo.gif" alt="">
<!-- <video src="@/assets/video/homeVideo.mov" autoplay loop muted controls="controls" type="video/quicktime"></video> -->
<div class="content_body_recommend_content">
<div class="content_body_recommend_content_left">
Start enjoying the amazing experiences <br>
of using our AI-based <br>
interactive design assistant.
</div>
<div class="content_body_recommend_content_right zindex">
<i class="fi fi-rr-arrow-small-right"></i> Scroll Down
</div>
</div>
<div class="content_body_recommend_bottom ">
<div class="zindex" @click="startCreating">Start Creating</div>
</div>
</div> </div>
</div> </div>
<navRouter :routerList="navRouterList"></navRouter>
<router-view :isScroll="false"></router-view> <!-- <div class="content_body_recommend_center content_body_text">
<div class="content_body_recommend_center_title">
<h1>AiDA</h1>
<h3>bloom your creativity</h3>
</div>
<div class="content_body_recommend_center_btn">
<a class="started_btn" href="https://code-create.com.hk/aida/" target="_blank">SUBSCRIBE NOW</a>
<a class="started_btn" href="https://code-create.com.hk/aida-trial/" target="_blank">START TRIAL</a>
</div>
</div> -->
<div style="background-color: #fff;position: relative;">
<!-- <navRouter :routerList="navRouterList"></navRouter> -->
<router-view :isScroll="false"></router-view>
</div>
</div> </div>
<div class="homeRecommend_content_adminTop" @click="setAdminUp"> <div class="homeRecommend_content_adminTop" @click="setAdminUp">
<i class="fi fi-rr-arrow-small-up"></i> <i class="fi fi-rr-arrow-small-up"></i>
@@ -107,7 +122,7 @@ export default defineComponent({
// router.push("/register"); // router.push("/register");
} }
let setAdminUp = ()=>{ let setAdminUp = ()=>{
let scrollDom = document.querySelector('.homeRecommend_content_body') let scrollDom = document.querySelector('.homeRecommend_max')
scrollDom.scrollTo({ scrollDom.scrollTo({
top: 0, top: 0,
behavior: 'smooth' // 平滑滚动到顶部 behavior: 'smooth' // 平滑滚动到顶部
@@ -131,7 +146,27 @@ export default defineComponent({
let goHome = ()=>{ let goHome = ()=>{
router.push('/home'); router.push('/home');
} }
let startCreating = ()=>{
if(systemUser.value.value == -1){
setLogin()
}else if(systemUser.value.value == 0){
window.open('https://code-create.com.hk/aida/','_blank')
}else if(systemUser.value.value == 1){
goHome()
}
}
onMounted(()=>{ onMounted(()=>{
let scrollDom = document.querySelector('.homeRecommend_max')
scrollDom.addEventListener('scroll', function() {
if(scrollDom.scrollTop > 200){
document.querySelector('.homeRecommend_content_adminTop').style.opacity = '1'
document.querySelector('.homeRecommend_content_adminTop').style.zIndex = 999
}else{
document.querySelector('.homeRecommend_content_adminTop').style.opacity = '0'
document.querySelector('.homeRecommend_content_adminTop').style.opacity = '0'
document.querySelector('.homeRecommend_content_adminTop').style.zIndex = 0
}
});
if(window.innerWidth < 768){ if(window.innerWidth < 768){
isMoblie.value = true isMoblie.value = true
} }
@@ -146,6 +181,7 @@ export default defineComponent({
logout, logout,
goHome, goHome,
isMoblie, isMoblie,
startCreating,
} }
}, },
data() { data() {
@@ -158,49 +194,49 @@ export default defineComponent({
// } // }
}, },
mounted() { mounted() {
nextTick().then(()=>{ // nextTick().then(()=>{
let dom = document.querySelector('.homeRecommend_content_body') // let dom = document.querySelector('.homeRecommend_content_body')
let codeTween = document.querySelectorAll('.homeRecommend_content_body_recommend .content_body_img') // let codeTween = document.querySelectorAll('.homeRecommend_content_body_recommend .content_body_img')
let codeTweenText = document.querySelectorAll('.homeRecommend_content_body_recommend .content_body_text') // let codeTweenText = document.querySelectorAll('.homeRecommend_content_body_recommend .content_body_text')
for (let index = 0; index < codeTween.length; index++) { // for (let index = 0; index < codeTween.length; index++) {
gsap.from(codeTween[index],.5, {scale:.6 },); // gsap.from(codeTween[index],.5, {scale:.6 },);
gsap.registerPlugin(ScrollTrigger); // gsap.registerPlugin(ScrollTrigger);
let tl1 = gsap.timeline(); // let tl1 = gsap.timeline();
tl1.to(codeTween[index],1, {y:'-30px',opacity:0},) // tl1.to(codeTween[index],1, {y:'-30px',opacity:0},)
ScrollTrigger.create({ // ScrollTrigger.create({
trigger: codeTween[index], // 触发器元素 // trigger: codeTween[index], // 触发器元素
start: "top 0%", // 滚动触发器的起始滚动位置 // start: "top 0%", // 滚动触发器的起始滚动位置
end: '200% 20%', // 滚动触发器的结束滚动位置 // end: '200% 20%', // 滚动触发器的结束滚动位置
// markers: true, // 开启标注功能 // // markers: true, // 开启标注功能
scrub: true, // scrub: true,
animation:tl1, // animation:tl1,
scroller:dom,//设置指定元素为滚动依据 // scroller:dom,//设置指定元素为滚动依据
scrub:2, // scrub:2,
// onUpdate:(v)=>{ // // onUpdate:(v)=>{
// if(v.progress < 0.1){ // // if(v.progress < 0.1){
// v.trigger?.classList.remove('active') // // v.trigger?.classList.remove('active')
// }else{ // // }else{
// v.trigger?.classList.add('active') // // v.trigger?.classList.add('active')
// // v.trigger?.classList.add('active') // // // v.trigger?.classList.add('active')
// } // // }
// } // // }
}); // });
} // }
gsap.registerPlugin(ScrollTrigger); // gsap.registerPlugin(ScrollTrigger);
let tl1 = gsap.timeline(); // let tl1 = gsap.timeline();
tl1.from(codeTweenText,1, {'margin-top':'30px',opacity:1},) // tl1.from(codeTweenText,1, {'margin-top':'30px',opacity:1},)
ScrollTrigger.create({ // ScrollTrigger.create({
trigger: codeTweenText, // 触发器元素 // trigger: codeTweenText, // 触发器元素
start: "top 0%", // 滚动触发器的起始滚动位置 // start: "top 0%", // 滚动触发器的起始滚动位置
end: '200% 20%', // 滚动触发器的结束滚动位置 // end: '200% 20%', // 滚动触发器的结束滚动位置
// markers: true, // 开启标注功能 // // markers: true, // 开启标注功能
scrub: true, // scrub: true,
animation:tl1, // animation:tl1,
scroller:dom,//设置指定元素为滚动依据 // scroller:dom,//设置指定元素为滚动依据
scrub:2, // scrub:2,
}); // });
}) // })
}, },
methods: { methods: {
@@ -214,7 +250,11 @@ export default defineComponent({
display: flex; display: flex;
height: 100%; height: 100%;
flex-direction: column; flex-direction: column;
overflow-y: auto;
overflow-x: hidden;
&.homeRecommend_max::-webkit-scrollbar {
display: none;
}
.homeRecommend_content_body{ .homeRecommend_content_body{
flex: 1; flex: 1;
} }
@@ -223,9 +263,11 @@ export default defineComponent({
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
// padding: 0 30px; // padding: 0 30px;
padding: 0 9rem; // padding: 0 9rem;
padding: 4rem 2rem;
padding-bottom: 0;
width: 100%; width: 100%;
height: 7rem; // height: 7rem;
flex-shrink: 0; flex-shrink: 0;
background: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.2);
// border-bottom: 0.1rem solid rgba(3, 3, 3, 0.1); // border-bottom: 0.1rem solid rgba(3, 3, 3, 0.1);
@@ -294,142 +336,73 @@ export default defineComponent({
} }
.homeRecommend_content_body{ .homeRecommend_content_body{
overflow-y: auto; // overflow-y: auto;
overflow-x: hidden; // overflow-x: hidden;
&.homeRecommend_content_body::-webkit-scrollbar {
display: none; // &.homeRecommend_content_body::-webkit-scrollbar {
// display: none;
// }
.homeRecommend_content_sticky{
position: sticky;
top: 0;
}
.zindex{
z-index: 2;
}
@media (max-width: 768px) {
br{
display: none;
}
} }
.homeRecommend_content_body_recommend{ .homeRecommend_content_body_recommend{
// display: flex; padding: 0 2rem;
// justify-content: center; padding-right: 4rem;
position: relative;
border-bottom: 1px solid #ececec; border-bottom: 1px solid #ececec;
--margin:3rem;
.content_body_recommend_left, padding-top: 10rem;
.content_body_recommend_right{ padding-bottom: 15rem;
@media (max-width: 768px) {
padding-right: 2rem;
}
img{
position: absolute; position: absolute;
top: 0; top: 0;
img{ width: 50%;
border-radius: 2rem; right: 0;
position: absolute; top: -5%;
width: 20px; width: 70%;
object-fit: cover; @media (max-width: 768px) {
position: relative;
top: 0;
left: 50%;
transform: translateX(-50%);
}
}
.content_body_recommend_top,.content_body_recommend_content{
display: flex;
justify-content: space-between;
@media (max-width: 768px) {
flex-direction: column;
}
}
.content_body_recommend_top{
h1{
font-family: 'pixel';
line-height: .6;
font-size: 50rem;
margin: 0;
@media (max-width: 768px) {
font-size: 30rem;
text-align: center;
}
}
div{
font-size: 5rem;
@media (max-width: 768px) {
text-align: center;
}
} }
}
--margin:3rem;
.content_body_recommend_right{
right: 0;
.content_body_img1{
width: 20rem;
height: 20rem;
object-fit: cover;
top: 10rem;
right: calc(20rem + var(--margin));
}
.content_body_img2{
width: 15rem;
height: 15rem;
object-fit: cover;
top: calc(30rem + var(--margin));
right: calc(20rem + var(--margin));
}
.content_body_img3{
top: 38rem;
width: 30rem;
height: 30rem;
object-fit: cover;
right: calc(-13rem + var(--margin));
}
.content_body_img4{
width: 20rem;
height: 20rem;
object-fit: cover;
top: 51rem;
right: calc(20rem + var(--margin));
}
.content_body_img5{
width: 20rem;
height: 20rem;
object-fit: cover;
top: 15rem;
right: 0;
}
}
.content_body_recommend_left{
left: 0;
.content_body_img1{
width: 15rem;
height: 15rem;
object-fit: cover;
top: 5rem;
left: calc(20rem + var(--margin));
}
.content_body_img2{
width: 25rem;
height: 25rem;
object-fit: cover;
top: calc(20rem + var(--margin));
left: calc(20rem + var(--margin));
}
.content_body_img3{
width: 20rem;
height: 20rem;
object-fit: cover;
top: calc(10rem + var(--margin));
// left: calc(0 + var(--margin));
}
.content_body_img4{
width: 30rem;
height: 30rem;
object-fit: cover;
top: 36rem;
left: calc(-13rem + var(--margin));
}
.content_body_img5{
width: 20rem;
height: 20rem;
object-fit: cover;
top: 51rem;
left: calc(20rem + var(--margin));
}
.content_body_img6{
width: 20rem;
height: 20rem;
object-fit: cover;
top: 20rem;
left: calc(0 + var(--margin));
}
}
.content_body_recommend_center{
padding: 20rem 0;
text-align: center;
width: 50%;
position: relative;
left: 50%;
transform: translateX(-50%);
z-index: 2;
opacity: 0;
@media (max-width: 768px) {
width: 80%;
}
.content_body_recommend_center_title{
h1{
line-height: 1;
font-size: 13rem;
font-weight: 900;
margin: 7rem;
div{
color: #341e57;
}
}
h3{
line-height: 1;
margin: 7rem;
font-size: 5rem;
font-weight: 900;
}
}
.content_body_recommend_center_btn{ .content_body_recommend_center_btn{
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -439,6 +412,36 @@ export default defineComponent({
} }
} }
} }
.content_body_recommend_content{
align-items: center;
@media (max-width: 768px) {
align-items: flex-start;
}
.content_body_recommend_content_right{
font-family: 'pixel';
font-size: 15rem;
background: linear-gradient(90deg, #be5865, #39215b);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
line-height: 1;
i{
font-size: 6rem;
}
}
}
.content_body_recommend_bottom{
text-align: right;
div{
padding: 0 1rem;
display: inline-block;
background: #000000;
color: #fff;
border-radius: 4px;
position: relative;
cursor: pointer;
}
}
} }
} }
.homeRecommend_content_adminTop{ .homeRecommend_content_adminTop{
@@ -454,7 +457,9 @@ export default defineComponent({
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: #fff; background: #fff;
z-index: 999; z-index: 0;
transition: all .3s;
opacity: 0;
i{ i{
display: flex; display: flex;
font-size: 3rem; font-size: 3rem;

View File

@@ -7,7 +7,8 @@
<div v-show="isScroll" v-for="item in worksType" :key="item" class="modal_title_text_assistant" @click="setWorksSelect(item)" :class="{active:item.value == worksSelect}"> <div v-show="isScroll" v-for="item in worksType" :key="item" class="modal_title_text_assistant" @click="setWorksSelect(item)" :class="{active:item.value == worksSelect}">
{{ item.name }} {{ item.name }}
</div> </div>
<div v-show="!isScroll" class="modal_title_text_assistant active">All</div> <!-- <div v-show="!isScroll" class="modal_title_text_assistant active">All</div> -->
<!-- <div class="modal_search_menu"> <!-- <div class="modal_search_menu">
<generalMenu :dataList="menuList" @setprintModel="setprintModel" :item="selectMenu"></generalMenu> <generalMenu :dataList="menuList" @setprintModel="setprintModel" :item="selectMenu"></generalMenu>
</div> --> </div> -->
@@ -328,6 +329,14 @@ export default defineComponent({
&.otherUsersActive{ &.otherUsersActive{
padding: 0; padding: 0;
} }
.page_loading_box{
text-align: center;
height: 50px;
.page_loading{
display: block;
width: 50px;
height: 50px;
}
}
} }
</style> </style>