diff --git a/.env.test b/.env.test
index 7f5fd7f5..261a1f5b 100644
--- a/.env.test
+++ b/.env.test
@@ -1,2 +1,3 @@
NODE_ENV = 'development'
VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
+# VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
diff --git a/.env.test_build b/.env.test_build
index 6457fbcb..75d587fe 100644
--- a/.env.test_build
+++ b/.env.test_build
@@ -1,2 +1,4 @@
NODE_ENV = 'production'
+# VUE_APP_BASE_URL = 'https://aida.com.hk/test'
VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
+
diff --git a/9.26-16:31dist.7z b/9.26-16:31dist.7z
new file mode 100644
index 00000000..e2e5dcb1
Binary files /dev/null and b/9.26-16:31dist.7z differ
diff --git a/src/assets/images/loginPage/aida_logo_centent.jpg b/src/assets/images/loginPage/aida_logo_centent.jpg
new file mode 100644
index 00000000..22fc475c
Binary files /dev/null and b/src/assets/images/loginPage/aida_logo_centent.jpg differ
diff --git a/src/assets/style/style.css b/src/assets/style/style.css
index 06883489..ea7b38eb 100644
--- a/src/assets/style/style.css
+++ b/src/assets/style/style.css
@@ -75,9 +75,13 @@ li {
.select_block .ant-select:not(.ant-select-customize-input) .ant-select-selector {
background: transparent;
height: 4rem;
- border: 0.1rem solid #000 !important;
+ border: 0.1rem solid rgba(0, 0, 0, 0) !important;
border-radius: 0;
box-shadow: none !important;
+ width: 15rem;
+ background: #FFFFFF;
+ border-radius: 1rem;
+ margin: 0 1rem;
}
.select_block .ant-select-single .ant-select-selector .ant-select-selection-item,
.select_block .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
@@ -86,6 +90,9 @@ li {
font-size: 1.3rem;
font-weight: bold;
}
+.select_block .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
+ padding: 0 1rem;
+}
.started_btn {
padding: 0.5rem 2rem;
display: inline-block;
@@ -114,6 +121,9 @@ li {
.modal_component .ant-modal-content .ant-modal-body {
padding: 0;
}
+.ant-modal-body {
+ font-size: 1.4rem;
+}
.operate_file_block {
width: 100%;
height: 3rem;
@@ -187,6 +197,12 @@ li {
border-color: #543087;
background: #543087;
}
+.ant-spin-dot-item {
+ background-color: #543087;
+}
+.ant-spin {
+ color: #000;
+}
.pin_block {
text-align: center;
margin-top: 0.5rem;
diff --git a/src/assets/style/style.less b/src/assets/style/style.less
index 62ae25b9..faf36735 100644
--- a/src/assets/style/style.less
+++ b/src/assets/style/style.less
@@ -83,9 +83,14 @@ ul,li{
.ant-select:not(.ant-select-customize-input) .ant-select-selector{
background: transparent;
height: 4rem;
- border: 0.1rem solid #000 !important;
+ border: 0.1rem solid rgba(0,0,0,0) !important;
+ // border: 0.1rem solid #000 !important;
border-radius: 0;
box-shadow: none !important;
+ width: 15rem;
+ background: #FFFFFF;
+ border-radius: 1rem;
+ margin: 0 1rem;
}
.ant-select-single .ant-select-selector .ant-select-selection-item, .ant-select-single .ant-select-selector .ant-select-selection-placeholder{
line-height: 3.8rem;
@@ -93,6 +98,9 @@ ul,li{
font-size: 1.3rem;
font-weight: bold;
}
+ .ant-select-single:not(.ant-select-customize-input) .ant-select-selector{
+ padding: 0 1rem;
+ }
}
//started公共按钮样式
.started_btn{
@@ -132,6 +140,9 @@ ul,li{
}
}
}
+.ant-modal-body{
+ font-size: 1.4rem;
+}
//衣服类型下拉菜单
.operate_file_block{
width: 100%;
@@ -231,6 +242,13 @@ ul,li{
}
}
}
+//loding样式
+.ant-spin-dot-item{
+ background-color: #543087;
+}
+.ant-spin{
+ color: #000;
+}
.pin_block{
text-align: center;
margin-top:.5rem;
diff --git a/src/component/Detail/DesignDetail.vue b/src/component/Detail/DesignDetail.vue
index 826c96bb..395e03cb 100644
--- a/src/component/Detail/DesignDetail.vue
+++ b/src/component/Detail/DesignDetail.vue
@@ -29,26 +29,23 @@
-
+
-
![]()
-
+
![]()
-
+
-
+
@@ -61,7 +58,7 @@
Current Apparel
-
![]()
+
-
-
![]()
+
+
@@ -100,14 +97,14 @@
-
![]()
+
@@ -130,6 +127,8 @@ import Draggable from 'vuedraggable'
import { Https } from "@/tool/https";
import {getUploadUrl,isMoible} from '@/tool/util'
import { useStore } from "vuex";
+import GO from '@/tool/GO';
+import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
export default defineComponent({
components:{
ElementReplace,
@@ -161,6 +160,11 @@ export default defineComponent({
let current:any = ref({})//点击上衣或者下衣
provide('current',current)
let frontBack:any = ref({})
+ let body = ref(false)
+ let designItemId = ref()
+ let designOutfitId = ref()
+ let userInfo:any = {}
+
return{
designItemDetail,
store,
@@ -169,6 +173,10 @@ export default defineComponent({
currentIndex,
current,
frontBack,
+ body,
+ designItemId,
+ designOutfitId,
+ userInfo
}
},
data(){
@@ -184,8 +192,14 @@ export default defineComponent({
watch:{
designItemDetail:{
handler: function(newval) {
+
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
- this.current = JSON.parse(JSON.stringify(designItemDetail.clothes[this.currentIndex]))
+ this.current = JSON.parse(JSON.stringify(designItemDetail?.clothes?.[this.currentIndex]))
+ if(designItemDetail.others[0].layersObject.length != 0){
+ this.body = false
+ }else{
+ this.body = true
+ }
this.setImgSize()
}
},
@@ -195,23 +209,42 @@ export default defineComponent({
},
},
mounted(){
- let url = Https.httpUrls.getDesignDetail + `?designItemId=33683&designPythonOutfitId=33445`
- this.loadingShow = true
- Https.axiosGet(url).then(
- async (rv: any) => {
- this.store.commit('setDesignItemDetail',rv)
- this.setImgSize()
- this.generateHighDesignImg = rv.highDesignUrl
- this.designShowPrview = 1
- this.designDetailShow = true
- this.loadingShow = false
- }
- ).catch(rv=>{
- this.loadingShow = false
- })
+ let userInfo:any = getCookie("userInfo")
+ this.userInfo = JSON.parse(userInfo);
+ // let url = Https.httpUrls.getDesignDetail + `?designItemId=34242&designPythonOutfitId=34004`
+ // this.loadingShow = true
+ // Https.axiosGet(url).then(
+ // async (rv: any) => {
+ // rv.clothes.forEach((item:any)=>{
+ // let a
+ // if(item.layersObject[0].imageCategory.indexOf("back") == -1){
+ // a = item.layersObject[0]
+ // item.layersObject[0] = item.layersObject[1]
+ // item.layersObject[1] = a
+ // }
+ // if(item.printObject.prints == null){
+ // item.printObject.prints = [{}]
+ // }
+ // })
+ // this.store.commit('setDesignItemDetail',rv)
+ // if(rv.others[0].printObject.path == null){
+ // this.body = false
+ // }else{
+ // this.body = true
+ // }
+ // this.setImgSize()
+ // this.generateHighDesignImg = rv.highDesignUrl
+ // this.designShowPrview = 1
+ // this.designDetailShow = true
+ // this.loadingShow = false
+ // }
+ // ).catch(rv=>{
+ // this.loadingShow = false
+ // })
},
methods:{
openCurrent(num: Number) {
+ let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.init(num)
if(num ==2 ){
@@ -230,20 +263,41 @@ export default defineComponent({
}
},
- showDesignDetailModal(data:any){
-
+ showDesignDetailModal(data:any,str:string){
+ this.designItemId = data.design.designItemId
+ this.designOutfitId = data.design.designOutfitId
let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
this.parentData = data
this.loadingShow = true
Https.axiosGet(url).then(
(rv: any) => {
- this.store.commit('setDesignItemDetail',rv)
+ rv.clothes.forEach((item:any)=>{
+ let a
+ if(item.layersObject[0].imageCategory.indexOf("back") == -1){
+ a = item.layersObject[0]
+ item.layersObject[0] = item.layersObject[1]
+ item.layersObject[1] = a
+ }
+ if(item.printObject.prints == null){
+ item.printObject.prints = [{}]
+ }
+ })
+
+ this.store.commit('setDesignItemDetail',rv)
+ if(rv.others[0].layersObject.length != 0){
+ this.body = false
+ }else{
+ this.body = true
+ }
+ if(str == 'setDesignItem'){
+
+ }else{
+ this.designShowPrview = 1
+ }
this.setImgSize()
this.generateHighDesignImg = rv.highDesignUrl
- this.designShowPrview = 1
this.designDetailShow = true
this.loadingShow = false
-
}
).catch(rv=>{
this.loadingShow = false
@@ -254,93 +308,147 @@ export default defineComponent({
let front:any = []
let back:any = []
let body:any
-
- designItemDetail.others.forEach((item:any) => {
- if(item.type == 'Body'){
- body = item
- }
- });
-
- let ratio:any = await this.setPostition(body.layersObject[0].imageUrl)
- designItemDetail.clothes.forEach((v:any,index:number)=>{
- let zIndex = 3
- for (let i = v.layersObject.length-1; i >= 0; i--) {
- v.layersObject[i].style = {
- top:v.layersObject[i].position?.[0]*ratio+'px',
- left:v.layersObject[i].position?.[1]*ratio+'px',
- width:v.layersObject[i].imageSize?.[0]*ratio+'px',
- height:v.layersObject[i].imageSize?.[1]*ratio+'px',
- zIndex:zIndex-=1
+ if(this.body){
+ designItemDetail.clothes.forEach((v:any,index:number)=>{
+ let zIndex = 3
+ for (let i = v.layersObject.length-1; i >= 0; i--) {
+ if(v.layersObject[i].imageCategory.indexOf("back") == -1){
+ front[index] = v.layersObject[i]
+ }else{
+ back[index] = v.layersObject[i]
+ }
}
+ })
+ }else{
+ designItemDetail.others.forEach((item:any) => {
+ if(item.type == 'Body'){
+ body = item
+ }
+ });
+ let ratio:any = await this.setPostition(body.layersObject[0]?.imageUrl)
+ let frontIndex = 6
+ let backIndex = 3
+ designItemDetail.clothes.forEach((v:any,index:any)=>{
- if(v.layersObject[i].imageCategory.indexOf("back") == -1){
- front[index] = v.layersObject[i]
- }else{
- back[index] = v.layersObject[i]
+ for (let i = v.layersObject.length-1; i >= 0; i--) {
+ v.layersObject[i].style = {
+ top:v.layersObject[i].position?.[0]*ratio+'px',
+ left:v.layersObject[i].position?.[1]*ratio+'px',
+ width:v.layersObject[i].imageSize?.[0]*ratio+'px',
+ height:v.layersObject[i].imageSize?.[1]*ratio+'px',
+ // zIndex:zIndex-=1
+ }
+ v.layersObject[i].centers={
+ left:0,
+ top:0,
+ }
+ v.layersObject[i].designOpenrtionBtn = false
+ if(v.layersObject[i].imageCategory.indexOf("back") == -1){
+ front[index] = v.layersObject[i]
+ front[index].style.zIndex = frontIndex-=1
+ }else{
+ back[index] = v.layersObject[i]
+ back[index].style.zIndex = backIndex-=1
+ // back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++
+ }
}
+ })
+ let bodyImgWH = document.getElementsByClassName("design_compile_content")[0].getElementsByClassName("perview_img")[0]
+
+ body.style = {
+ width:body.layersObject[0].imageSize?.[0]*ratio+'px',
+ height:body.layersObject[0].imageSize?.[1]*ratio+'px',
}
-
- // v.layersObject.forEach((item:any)=>{
- // item.style = {
- // top:item.position?.[0]*ratio+'px',
- // left:item.position?.[1]*ratio+'px',
- // width:item.imageSize?.[0]*ratio+'px',
- // height:item.imageSize?.[1]*ratio+'px',
- // zIndex:zIndex+=1
- // }
- // console.log(zIndex);
- // if(item.imageCategory == 'blouse_back'){
- // back[index] = item
- // }else{
- // front[index] = item
- // }
- // })
- })
-
-
+ }
this.frontBack = {
front:front,
back:back,
body:body,
}
+
},
- submit(){
+ setDesignCoverage(str:string){
+ let {design,index,collectionList} = this.parentData
+ let newIndex = 0
+ let newDesign = {}
+ collectionList.forEach((item:any,index:number) => {
+ if(item.designItemId === this.designItemId){
+ newIndex = index
+ }
+ });
+ newDesign = collectionList[newIndex]
+ newIndex = this.parentData.index
+ let data = {
+ design:newDesign,
+ index:newIndex,
+ collectionList:collectionList
+ }
+ this.designShowPrview = 1
+ // this.showDesignDetailModal(data,str)
+ },
+
+ setSubmitItem(str:any){
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
let clothes:any = []
designItemDetail.clothes.forEach((item:any) => {
let clothesItem = {
color: `${item.color.r} ${item.color.g} ${item.color.b}`,
id:item.id,
- path:item.path,
+ path:item.minIOPath,
+ offset:item.layersObject[1].offset == null?[0,0]:item.layersObject[1].offset,
+ scale:item.layersObject[1].scale?item.layersObject[1].scale:1,
printObject:{
- ifSingle:item.printObject.ifSingle,
- path:item.printObject.path?item.printObject.path :'',
- prints:item.printObject.prints?item.printObject.prints:[]
+ ifSingle:item.printObject.ifSingle == null ? false : item.printObject.ifSingle,
+ // path:item.printObject.path?item.printObject.path :'',
+ prints:item?.printObject?.prints[0]?.minIOPath?item?.printObject?.prints:[]
},
type:item.type,
}
clothes.push(clothesItem)
+
});
let data = {
designItemId:designItemDetail.designItemId,
// designItemId:designItemDetail.designItemId,
designSingleItemDTOList:clothes,
isPreview:false,
+ processId:String(this.userInfo?.userId),
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
}
+ if(str == 'preview'){
+ data.isPreview = true
+ }else{
+ data.isPreview = false
+ }
+ return data
+ },
+ setSubmit(str:any){
+ let setDesignItem:any = this.$refs.setDesignItem
+ let data = this.setSubmitItem(str)
+ setDesignItem.setPreview(data)
+ },
+ async submit(){
+ let data = this.setSubmitItem('')
this.loadingShow = true
Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv: any) => {
this.loadingShow = false
- this.closeModal()
let designCollectionList = this.store.state.HomeStoreModule.designCollectionList
+ let likeDesignCollectionList = this.store.state.HomeStoreModule.likeDesignCollectionList
designCollectionList.forEach((item:any) => {
-
if(item.designItemId == rv.designItemId){
item.designOutfitUrl = rv.designItemUrl
}
});
+ likeDesignCollectionList.forEach((item:any) => {
+ if(item.designItemId == rv.designItemId){
+ item.designOutfitUrl = rv.designItemUrl
+ }
+ });
+ this.closeModal()
this.store.commit('setDesignCollectionList',designCollectionList)
+ this.store.commit('setLikeDesignCollectionList',likeDesignCollectionList)
+
}
).catch(res=>{
this.loadingShow = false
@@ -392,7 +500,7 @@ export default defineComponent({
index:newIndex,
collectionList:collectionList
}
- this.showDesignDetailModal(data)
+ this.showDesignDetailModal(data,'')
},
//显示图片详情
@@ -427,27 +535,25 @@ export default defineComponent({
this.currentIndex = index
this.designOrder = true
this.current = designItemDetail.clothes[this.currentIndex]
- console.log(this.current);
-
- let data = {
- designItemId:designItemDetail.designItemId,
- // designItemId:designItemDetail.designItemId,
- designSingleItemDTOList:[
- {
- color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
- id:this.current.id,
- path:this.current.path?this.current.path:'',
- printObject:{
- ifSingle:this.current.printObject.ifSingle,
- prints:[{
- path:this.current.printObject.path?this.current.printObject.path :'',
- }],
- },
- type:this.current.type,
- }
- ],
- isPreview:true,
- timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
+ let data:any = this.setSubmitItem('preview')
+ data.designSingleItemDTOList[this.currentIndex] = {
+ color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
+ id:this.current.id,
+ path:this.current.minIOPath?this.current.minIOPath:'',
+ offset:this.current.layersObject[1].offset?this.current.layersObject[1].offset:[0,0],
+ scale:this.current.layersObject[1].scale?this.current.layersObject[1].scale:1,
+ printObject:{
+ ifSingle:this.current?.printObject?.ifSingle == null ? false : this.current?.printObject?.ifSingle,
+ // prints:this.current?.printObject[0]?.path == null ? [] : [{
+ // location:[0,0],
+ // angle:0,
+ // priority:1,
+ // path:this.current?.printObject?.path?this.current.printObject.path :'',
+ // minIOPath:this.current?.printObject?.minIOPath?this.current.printObject.minIOPath :'',
+ // }],
+ prints:this.current?.printObject?.prints[0]?.minIOPath?this.current?.printObject?.prints:[]
+ },
+ type:this.current.type,
}
this.store.commit('setDesignPreviewData',data)
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
@@ -472,7 +578,6 @@ export default defineComponent({
this.$emit('finishRedesign',this.parentData)
this.closeModal()
this.loadingShow = false
- this.closeModal()
}
).catch(res=>{
this.loadingShow = false
@@ -488,7 +593,7 @@ export default defineComponent({