2023-01-06 16:00:15 +08:00
< template >
< div >
2023-08-23 17:50:09 +08:00
<!-- designDetailShow -- >
2023-01-06 16:00:15 +08:00
< a-modal class = "design_detail_modal_component"
v - model : visible = "designDetailShow"
: footer = "null"
2023-09-25 10:09:00 +08:00
width = "65%"
2023-01-06 16:00:15 +08:00
: maskClosable = "false"
: centered = "true"
2023-08-23 17:50:09 +08:00
: closable = "false"
2023-01-06 16:00:15 +08:00
>
2023-08-23 17:50:09 +08:00
< div class = "design_title_text" >
2023-10-30 17:26:36 +08:00
< div > { { $t ( 'DesignDetail.Details' ) } } < / div >
< div class = "design_title_text_intro" > { { $t ( 'DesignDetail.EditDetails' ) } } < / div >
2023-08-23 17:50:09 +08:00
< / div >
< div class = "design_closeIcon" @click.stop ="closeModal()" >
< i class = "fi fi-rr-cross-small" > < / i >
< / div >
2023-01-06 16:00:15 +08:00
< div class = "turn_button turn_left_button" v-show = "designShowPrview == 1" @click="changeDesignItem('last')"><span class="icon iconfont icon_turn icon-shangyibu" > < / span > < / div >
< div class = "turn_button turn_right_button" v-show = "designShowPrview == 1" @click="changeDesignItem('next')"><span class="icon iconfont icon_turn icon-xiayibu" > < / span > < / div >
2023-08-23 17:50:09 +08:00
<!-- < div class = "design_centent" >
< / div > -- >
2023-01-06 16:00:15 +08:00
< div class = "design_detail_modal_body" v-show = "designShowPrview == 1" >
2023-08-23 17:50:09 +08:00
2023-09-12 10:11:27 +08:00
< div class = "detail_modal_body_img" >
2023-08-23 17:50:09 +08:00
<!-- < img class = "detial_img" :src = "designItemDetail.designItemUrl" > -- >
2023-09-25 10:09:00 +08:00
< div v-show = "imgDesignImg" class="detail_modal_body" >
2023-10-12 17:09:05 +08:00
< div class = "detail_modal_body_nav" >
< div v-for = "item,index in designItemDetail?.clothes" :class="{active:item.clothesOpen}" @click="clothesOpen(index)" >
< img :src = "item?.path" alt = "" >
< / div >
< / div >
2023-10-27 11:09:32 +08:00
< div class = "detail_modal_model_content" >
< div class = "detail_modal_item_back" :class = "{active:body}" v-for = "item,index in frontBack.back" :style="item.style" >
< img :src = "item.imageUrl" alt = "" >
< / div >
< img class = "detail_modal_model" :src = "frontBack.body?.layersObject[0]?.imageUrl" alt = "" >
< div class = "detail_modal_item_front" :class = "{active:body}" v-for = "item,index in frontBack.front" :style="item.style" @click.stop="clothesDetail(item,index)" >
< img :src = "item.imageUrl" alt = "" >
< / div >
2023-09-12 10:11:27 +08:00
< / div >
2023-10-27 11:09:32 +08:00
2023-09-12 10:11:27 +08:00
< / div >
2023-10-11 17:34:14 +08:00
<!-- < div v-else class = "detial_img detial_img1" v-for = "item,index in frontBack.front" :style="item.style" @click.stop="clothesDetail(item,index)" >
< img :src = "item.imageUrl" alt = "" >
< / div > -- >
2023-10-20 17:21:45 +08:00
<!-- < img v-show = "!imgDesignImg" class="detial_img" src="../../assets/images/homePage/111111.png" > - - >
2023-09-12 10:11:27 +08:00
< img v-show = "!imgDesignImg" class="detial_img" :src="designItemDetail.designItemUrl" >
2023-10-11 17:34:14 +08:00
< div class = "detail_btn" >
2023-08-23 17:50:09 +08:00
<!-- 全屏 -- >
2023-09-12 10:11:27 +08:00
< i class = "fi fi-bs-expand-arrows-alt" @click ="showDesignImgDetail(2)" > < / i >
2023-08-23 17:50:09 +08:00
<!-- 编辑 -- >
2023-10-11 17:34:14 +08:00
< i v-show = "!body" class="fi fi-rr-edit" @click="showDesignImgDetail(3)" > < / i >
2023-08-23 17:50:09 +08:00
<!-- 层 -- >
2023-09-12 10:11:27 +08:00
< i class = "fi fi-rr-copy" @mousedown ="mousedownDesignImg" @mouseup ="mouseupDesignImg" > < / i >
2023-10-27 11:09:32 +08:00
< i v-show = "revocationShow>1" class="icon iconfont icon-chehui" @click="revocation" > < / i >
< i v-show = "oppositeRevocationShow>=1" class="icon iconfont icon-fanchehui" @click="oppositeRevocation" > < / i >
2023-08-23 17:50:09 +08:00
< / div >
2023-10-13 17:06:44 +08:00
< div v-show = "ifSubmit" class="subitOkPreviewBtn" @click="submit" >
2023-10-30 17:26:36 +08:00
{ { $t ( 'DesignDetail.Submit' ) } }
2023-10-13 17:06:44 +08:00
< / div >
2023-01-06 16:00:15 +08:00
< / div >
2023-08-23 17:50:09 +08:00
< div class = "detail_modal_body_category" >
2023-09-12 10:11:27 +08:00
< div v-show = "designOrder" class="detail_modal_right_top scroll_style" >
2023-08-23 17:50:09 +08:00
< div class = "clothes_detail_item clothes_detail_item_apparel" >
< div class = "clothes_item_header" >
< i class = "fi fi-rs-comments" > < / i >
2023-10-30 17:26:36 +08:00
< div > { { $t ( 'DesignDetail.CurrentApparel' ) } } < / div >
2023-09-25 10:09:00 +08:00
< i class = "fi fi-rr-edit" @click.stop ="openCurrent(1)" > < / i >
2023-08-23 17:50:09 +08:00
< / div >
2023-10-11 17:34:14 +08:00
< img :src = "designItemDetail?.clothes?.[currentIndex]?.path" alt = "" class = "centent" @click ="openCurrent(1)" >
2023-01-06 16:00:15 +08:00
< / div >
2023-08-23 17:50:09 +08:00
< div class = "clothes_detail_item clothes_detail_item_print" >
< div class = "clothes_item_header" >
< i class = "fi fi-rs-comments" > < / i >
2023-10-30 17:26:36 +08:00
< div > { { $t ( 'DesignDetail.CurrentPrint' ) } } < / div >
2023-09-25 10:09:00 +08:00
< i class = "fi fi-rr-edit" @click.stop ="openCurrent(2)" > < / i >
2023-08-23 17:50:09 +08:00
< / div >
2023-10-11 17:34:14 +08:00
< div class = "centent_div" v-if = "designItemDetail?.clothes?.[currentIndex]?.printObject?.prints[0]?.path" @click="openCurrent(2)" >
< img :src = "designItemDetail?.clothes?.[currentIndex]?.printObject?.prints[0]?.path" alt = "" >
2023-09-12 10:11:27 +08:00
< / div >
< i v-else class = "fi fi-rr-picture centent" @click ="openCurrent(2)" > < / i >
2023-01-06 16:00:15 +08:00
< / div >
2023-08-23 17:50:09 +08:00
< div class = "clothes_detail_item clothes_detail_item_color" >
< div class = "clothes_item_header" >
< i class = "fi fi-rs-comments" > < / i >
2023-10-30 17:26:36 +08:00
< div > { { $t ( 'DesignDetail.CurrentColor' ) } } < / div >
2023-09-25 10:09:00 +08:00
< i class = "fi fi-rr-edit" @click.stop ="openCurrent(3)" > < / i >
2023-08-23 17:50:09 +08:00
< / div >
2023-09-25 10:09:00 +08:00
< div class = "img_block_item centent" @click.stop ="openCurrent(3)" >
2023-08-23 17:50:09 +08:00
< div class = "color_item" >
2023-09-25 10:09:00 +08:00
< div class = "color_content" :style = "{background:`rgba(${designItemDetail?.clothes?.[currentIndex].color?.r},${designItemDetail?.clothes?.[currentIndex].color?.g},${designItemDetail?.clothes?.[currentIndex].color?.b},${designItemDetail?.clothes?.[currentIndex].color?.a?designItemDetail?.clothes?.[currentIndex].color.a:1})`}" > < / div >
2023-08-23 17:50:09 +08:00
< div class = "color_content_body" >
2023-09-25 10:09:00 +08:00
< div class = "color_des" > { { designItemDetail ? . clothes ? . [ currentIndex ] ? . color ? . tcx } } < / div >
< div class = "color_des" > { { designItemDetail ? . clothes ? . [ currentIndex ] ? . color ? . name } } < / div >
2023-08-23 17:50:09 +08:00
< / div >
< / div >
< / div >
< / div >
2023-10-13 17:06:44 +08:00
2023-01-06 16:00:15 +08:00
< / div >
< / div >
2023-08-23 17:50:09 +08:00
< DesignDetailAlter ref = "DesignDetailAlter" > < / DesignDetailAlter >
2023-01-06 16:00:15 +08:00
2023-08-23 17:50:09 +08:00
< / div >
2023-01-06 16:00:15 +08:00
< div class = "design_detail_perview" v-show = "designShowPrview == 2" >
< div class = "design_detail_perview_content" >
2023-10-20 17:21:45 +08:00
< magnifyingGlass ref = "magnifyingGlass" : designItemDetailUrl = 'designItemDetailUrl' > < / magnifyingGlass >
<!-- < img class = "perview_img" v-lazy = "designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl || ''" :key="designItemDetail.designItemUrl" > - - >
2023-01-06 16:00:15 +08:00
<!-- < div class = "generate_button" v-show = "designItemDetail.singleOverall == 'overall'" @click="generateHighDesign()" > Generate Product lmage < / div > - - >
< / div >
< / div >
2023-09-12 10:11:27 +08:00
< div class = "design_detail_perview" v-show = "designShowPrview == 3" >
2023-01-06 16:00:15 +08:00
< div class = "design_detail_perview_content" >
2023-09-12 10:11:27 +08:00
<!-- < div class = "generate_button" v-show = "designItemDetail.singleOverall == 'overall'" @click="generateHighDesign()" > Generate Product lmage < / div > - - >
2023-10-11 17:34:14 +08:00
< setDesignItem ref = "setDesignItem" @setDesignCoverage ="setDesignCoverage" @setSubmit ="setSubmit" > < / setDesignItem >
2023-01-06 16:00:15 +08:00
< / div >
2023-09-12 10:11:27 +08:00
2023-01-06 16:00:15 +08:00
< / div >
< / a-modal >
< div class = "mark_loading" v-show = "loadingShow" >
< a-spin size = "large" / >
< / div >
< / div >
< / template >
< script lang = "ts" >
2023-09-12 10:11:27 +08:00
import { defineComponent , computed , ref , provide } from 'vue'
2023-08-23 17:50:09 +08:00
import DesignDetailAlter from '@/component/Detail/DesignDetailAlter.vue'
2023-10-20 17:21:45 +08:00
import magnifyingGlass from '@/component/Detail/magnifyingGlass.vue'
2023-09-12 10:11:27 +08:00
import setDesignItem from '@/component/Detail/setDesignItem.vue'
2023-01-06 16:00:15 +08:00
import Draggable from 'vuedraggable'
import { Https } from "@/tool/https" ;
2023-09-12 10:11:27 +08:00
import { getUploadUrl , isMoible } from '@/tool/util'
2023-01-06 16:00:15 +08:00
import { useStore } from "vuex" ;
2023-10-11 17:34:14 +08:00
import GO from '@/tool/GO' ;
import { setCookie , getCookie , WriteCookie } from "@/tool/cookie" ;
2023-10-30 17:26:36 +08:00
import { useI18n } from 'vue-i18n'
2023-01-06 16:00:15 +08:00
export default defineComponent ( {
components : {
Draggable ,
2023-09-12 10:11:27 +08:00
DesignDetailAlter ,
setDesignItem ,
2023-10-20 17:21:45 +08:00
magnifyingGlass ,
2023-01-06 16:00:15 +08:00
} ,
setup ( ) {
const store = useStore ( ) ;
2023-09-25 10:09:00 +08:00
// let designItemDetail :any = computed(()=>{
// return store.state.DesignDetailModule.designItemDetail
// })
let designItemDetail : any = computed ( ( ) => {
2023-09-12 10:11:27 +08:00
return store . state . DesignDetailModule . designItemDetail
} )
2023-01-06 16:00:15 +08:00
let parentData : any = ref ( {
design : { } ,
index : 0 ,
collectionList : [ ] ,
type : '' ,
2023-08-23 17:50:09 +08:00
2023-01-06 16:00:15 +08:00
} ) //父组件传过来的数据
2023-09-12 10:11:27 +08:00
let others : any = ref ( {
left : 200 + 'px' ,
top : 100 + 'px' ,
} )
2023-09-25 10:09:00 +08:00
let currentIndex : any = ref ( 0 )
2023-09-12 10:11:27 +08:00
let current : any = ref ( { } ) //点击上衣或者下衣
provide ( 'current' , current )
2023-09-25 10:09:00 +08:00
let frontBack : any = ref ( { } )
2023-10-11 17:34:14 +08:00
let body = ref ( false )
let designItemId = ref ( )
let designOutfitId = ref ( )
let userInfo : any = { }
2023-10-13 17:06:44 +08:00
let ifSubmit = ref ( false )
2023-10-20 17:21:45 +08:00
let designItemDetailUrl = ref ( { } )
2023-10-27 11:09:32 +08:00
let setRevocationShow = ref ( false ) //判断是不是第一次进来和切换下一张
let oppositeRevocationShow : any = ref ( )
let revocationShow : any = ref ( )
2023-10-30 17:26:36 +08:00
let { t } = useI18n ( )
2023-01-06 16:00:15 +08:00
return {
designItemDetail ,
store ,
2023-08-23 17:50:09 +08:00
parentData ,
2023-09-12 10:11:27 +08:00
others ,
2023-09-25 10:09:00 +08:00
currentIndex ,
2023-09-12 10:11:27 +08:00
current ,
2023-09-25 10:09:00 +08:00
frontBack ,
2023-10-11 17:34:14 +08:00
body ,
designItemId ,
designOutfitId ,
2023-10-13 17:06:44 +08:00
userInfo ,
2023-10-20 17:21:45 +08:00
ifSubmit ,
2023-10-27 11:09:32 +08:00
designItemDetailUrl ,
setRevocationShow ,
oppositeRevocationShow ,
2023-10-30 17:26:36 +08:00
revocationShow ,
t ,
2023-01-06 16:00:15 +08:00
}
} ,
data ( ) {
return {
2023-09-12 10:11:27 +08:00
loadingShow : false , //加载中
2023-09-25 10:09:00 +08:00
designDetailShow : false ,
2023-01-06 16:00:15 +08:00
designShowPrview : 1 , //展示图片预览步骤
generateHighDesignImg : '' , //点击generate按钮生成的高级设计图
2023-09-12 10:11:27 +08:00
imgDesignImg : true ,
designOrder : false ,
2023-01-06 16:00:15 +08:00
}
} ,
2023-09-25 10:09:00 +08:00
watch : {
designItemDetail : {
2023-10-20 17:21:45 +08:00
handler : async function ( newVal , oldVal ) {
2023-09-25 10:09:00 +08:00
let designItemDetail = JSON . parse ( JSON . stringify ( this . store . state . DesignDetailModule . designItemDetail ) )
2023-10-13 17:06:44 +08:00
this . ifSubmit = designItemDetail . ifSubmit ? designItemDetail . ifSubmit : false
2023-10-20 17:21:45 +08:00
this . current = JSON ? . parse ( JSON ? . stringify ( designItemDetail ? . clothes ? . [ this ? . currentIndex ] ) )
2023-10-11 17:34:14 +08:00
if ( designItemDetail . others [ 0 ] . layersObject . length != 0 ) {
this . body = false
} else {
this . body = true
}
2023-10-20 17:21:45 +08:00
await this . setImgSize ( )
this . designItemDetailUrl = designItemDetail . currentFullBodyView ? designItemDetail . currentFullBodyView : designItemDetail . designItemUrl
2023-09-25 10:09:00 +08:00
}
} ,
currentIndex : {
handler : function ( newval ) {
}
} ,
} ,
2023-10-27 11:09:32 +08:00
provide ( ) {
return {
setRevocation : this . setRevocation
}
} ,
2023-09-12 10:11:27 +08:00
mounted ( ) {
2023-10-27 11:09:32 +08:00
let beforeunload = ( ) => {
this . removeRevocation ( )
window . removeEventListener ( 'beforeunload' , beforeunload )
}
window . addEventListener ( 'beforeunload' , beforeunload )
let onresizeTime : any
let this _ = this
window . onresize = ( ) => {
return ( ( ) => {
clearTimeout ( onresizeTime )
onresizeTime = setTimeout ( async ( ) => {
await this _ . setImgSize ( )
} , 500 )
} ) ( )
}
2023-10-11 17:34:14 +08:00
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
// })
2023-09-12 10:11:27 +08:00
} ,
2023-01-06 16:00:15 +08:00
methods : {
2023-08-23 17:50:09 +08:00
openCurrent ( num : Number ) {
let DesignDetailAlter : any = this . $refs . DesignDetailAlter
DesignDetailAlter . init ( num )
if ( num == 2 ) {
}
} ,
2023-01-06 16:00:15 +08:00
closeModal ( ) {
if ( this . designShowPrview == 1 ) {
this . designDetailShow = false
2023-09-12 10:11:27 +08:00
this . designOrder = false
let DesignDetailAlter : any = this . $refs . DesignDetailAlter
DesignDetailAlter . terminate ( )
2023-10-27 11:09:32 +08:00
// this.designItemDetail = {}
2023-10-20 17:21:45 +08:00
this . frontBack = { }
2023-10-27 11:09:32 +08:00
this . removeRevocation ( )
2023-09-12 10:11:27 +08:00
} else {
2023-10-20 17:21:45 +08:00
this . designShowPrview = 1 ;
this . designItemDetailUrl = { }
2023-01-06 16:00:15 +08:00
}
} ,
2023-08-23 17:50:09 +08:00
2023-10-11 17:34:14 +08:00
showDesignDetailModal ( data : any , str : string ) {
this . designItemId = data . design . designItemId
this . designOutfitId = data . design . designOutfitId
2023-09-25 10:09:00 +08:00
let url = Https . httpUrls . getDesignDetail + ` ?designItemId= ${ data . design . designItemId } &designPythonOutfitId= ${ data . design . designOutfitId } `
2023-01-06 16:00:15 +08:00
this . parentData = data
this . loadingShow = true
Https . axiosGet ( url ) . then (
( rv : any ) => {
2023-10-11 17:34:14 +08:00
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 )
2023-10-27 11:09:32 +08:00
this . setRevocation ( rv , '' )
2023-10-11 17:34:14 +08:00
if ( rv . others [ 0 ] . layersObject . length != 0 ) {
this . body = false
} else {
this . body = true
}
if ( str == 'setDesignItem' ) {
} else {
this . designShowPrview = 1
}
2023-09-25 10:09:00 +08:00
this . setImgSize ( )
2023-01-06 16:00:15 +08:00
this . generateHighDesignImg = rv . highDesignUrl
this . designDetailShow = true
this . loadingShow = false
}
) . catch ( rv => {
this . loadingShow = false
} )
} ,
2023-09-25 10:09:00 +08:00
async setImgSize ( ) {
let designItemDetail = JSON . parse ( JSON . stringify ( this . store . state . DesignDetailModule . designItemDetail ) )
let front : any = [ ]
let back : any = [ ]
let body : any
2023-10-11 17:34:14 +08:00
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 {
2023-10-27 11:09:32 +08:00
designItemDetail ? . others ? . forEach ( ( item : any ) => {
2023-10-11 17:34:14 +08:00
if ( item . type == 'Body' ) {
body = item
2023-09-25 10:09:00 +08:00
}
2023-10-11 17:34:14 +08:00
} ) ;
2023-10-30 10:03:49 +08:00
console . log ( body ? . layersObject ? . [ 0 ] ? . imageUrl ) ;
let ratio : any = await this ? . setPostition ( body ? . layersObject ? . [ 0 ] ? . imageUrl )
2023-10-11 17:34:14 +08:00
let frontIndex = 6
let backIndex = 3
designItemDetail . clothes . forEach ( ( v : any , index : any ) => {
2023-09-25 10:09:00 +08:00
2023-10-11 17:34:14 +08:00
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++
}
2023-09-25 10:09:00 +08:00
}
2023-10-11 17:34:14 +08:00
} )
body . style = {
width : body . layersObject [ 0 ] . imageSize ? . [ 0 ] * ratio + 'px' ,
height : body . layersObject [ 0 ] . imageSize ? . [ 1 ] * ratio + 'px' ,
2023-09-25 10:09:00 +08:00
}
2023-10-11 17:34:14 +08:00
}
2023-09-25 10:09:00 +08:00
this . frontBack = {
front : front ,
back : back ,
body : body ,
}
} ,
2023-10-11 17:34:14 +08:00
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)
} ,
2023-10-27 11:09:32 +08:00
removeRevocation ( ) {
sessionStorage . removeItem ( 'oppositeRevocation' )
sessionStorage . removeItem ( 'revocation' )
this . setRevocationShow = false
} ,
setRevocation ( designItemDetail : any , data : any ) { //设置撤销
let itemDetail = JSON . parse ( JSON . stringify ( this . store . state . DesignDetailModule . designItemDetail ) )
// let data = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designPreviewData))
let revocation = JSON . parse ( ( sessionStorage . getItem ( "revocation" ) as any ) )
let oppositeRevocation = JSON . parse ( ( sessionStorage . getItem ( "oppositeRevocation" ) as any ) )
if ( revocation ? . [ 0 ] ? . designItemDetail . designItemId != itemDetail . designItemId || sessionStorage . getItem ( "revocation" ) == null ) {
// sessionStorage.setItem('revocation', JSON.stringify([]));
// sessionStorage.setItem('oppositeRevocation',JSON.stringify([]));
revocation = [ ]
}
let detail = {
designItemDetail : designItemDetail ,
data : data ? data : ''
}
revocation . push ( detail )
this . revocationShow = revocation ? . length
this . oppositeRevocationShow = 0
sessionStorage . setItem ( 'revocation' , JSON . stringify ( revocation ) ) ;
sessionStorage . setItem ( 'oppositeRevocation' , JSON . stringify ( [ ] ) ) ;
} ,
revocation ( ) { //撤回
let oppositeRevocation = JSON . parse ( ( sessionStorage . getItem ( "oppositeRevocation" ) as any ) )
let revocation = JSON . parse ( ( sessionStorage . getItem ( "revocation" ) as any ) )
oppositeRevocation . push ( revocation [ revocation . length - 1 ] )
this . oppositeRevocationShow = oppositeRevocation . length
revocation . splice ( revocation . length - 1 , 1 )
this . revocationShow = revocation . length
if ( this . revocationShow > 1 ) {
this . store . commit ( 'setDesignPreviewData' , revocation [ revocation . length - 1 ] . data )
}
this . store . commit ( "setDesignItemDetail" , revocation [ revocation . length - 1 ] . designItemDetail ) ;
sessionStorage . setItem ( 'oppositeRevocation' , JSON . stringify ( oppositeRevocation ) ) ;
sessionStorage . setItem ( 'revocation' , JSON . stringify ( revocation ) ) ;
} ,
oppositeRevocation ( ) { //反撤回
let oppositeRevocation = JSON . parse ( ( sessionStorage . getItem ( "oppositeRevocation" ) as any ) )
let revocation = JSON . parse ( ( sessionStorage . getItem ( "revocation" ) as any ) )
this . store . commit ( 'setDesignPreviewData' , oppositeRevocation [ oppositeRevocation . length - 1 ] . data )
this . store . commit ( "setDesignItemDetail" , oppositeRevocation [ oppositeRevocation . length - 1 ] . designItemDetail ) ;
revocation . push ( oppositeRevocation [ oppositeRevocation . length - 1 ] )
this . revocationShow = revocation . length
oppositeRevocation . splice ( oppositeRevocation . length - 1 , 1 )
this . oppositeRevocationShow = oppositeRevocation . length
sessionStorage . setItem ( 'oppositeRevocation' , JSON . stringify ( oppositeRevocation ) ) ;
sessionStorage . setItem ( 'revocation' , JSON . stringify ( revocation ) ) ;
} ,
2023-10-11 17:34:14 +08:00
setSubmitItem ( str : any ) {
2023-09-25 10:09:00 +08:00
let designItemDetail = JSON . parse ( JSON . stringify ( this . store . state . DesignDetailModule . designItemDetail ) )
let clothes : any = [ ]
2023-10-12 17:09:05 +08:00
2023-09-25 10:09:00 +08:00
designItemDetail . clothes . forEach ( ( item : any ) => {
let clothesItem = {
2023-09-26 15:05:14 +08:00
color : ` ${ item . color . r } ${ item . color . g } ${ item . color . b } ` ,
2023-09-25 10:09:00 +08:00
id : item . id ,
2023-10-11 17:34:14 +08:00
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 ,
2023-09-25 10:09:00 +08:00
printObject : {
2023-10-11 17:34:14 +08:00
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 : [ ]
2023-09-25 10:09:00 +08:00
} ,
type : item . type ,
}
clothes . push ( clothesItem )
2023-10-11 17:34:14 +08:00
2023-09-25 10:09:00 +08:00
} ) ;
let data = {
designItemId : designItemDetail . designItemId ,
// designItemId:designItemDetail.designItemId,
designSingleItemDTOList : clothes ,
isPreview : false ,
2023-10-13 17:06:44 +08:00
ifSubmit : designItemDetail . isPreview ,
2023-10-11 17:34:14 +08:00
processId : String ( this . userInfo ? . userId ) ,
2023-09-25 10:09:00 +08:00
timeZone : Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone ,
}
2023-10-11 17:34:14 +08:00
if ( str == 'preview' ) {
data . isPreview = true
} else {
data . isPreview = false
2023-10-13 17:06:44 +08:00
delete data . ifSubmit
2023-10-11 17:34:14 +08:00
}
2023-10-12 17:09:05 +08:00
this . store . commit ( 'setDesignPreviewData' , data )
2023-10-11 17:34:14 +08:00
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 ( '' )
2023-09-25 10:09:00 +08:00
this . loadingShow = true
Https . axiosPost ( Https . httpUrls . designSingle , data ) . then (
( rv : any ) => {
this . loadingShow = false
let designCollectionList = this . store . state . HomeStoreModule . designCollectionList
2023-10-11 17:34:14 +08:00
let likeDesignCollectionList = this . store . state . HomeStoreModule . likeDesignCollectionList
2023-09-25 10:09:00 +08:00
designCollectionList . forEach ( ( item : any ) => {
if ( item . designItemId == rv . designItemId ) {
item . designOutfitUrl = rv . designItemUrl
}
} ) ;
2023-10-11 17:34:14 +08:00
likeDesignCollectionList . forEach ( ( item : any ) => {
if ( item . designItemId == rv . designItemId ) {
item . designOutfitUrl = rv . designItemUrl
}
} ) ;
this . closeModal ( )
2023-09-25 10:09:00 +08:00
this . store . commit ( 'setDesignCollectionList' , designCollectionList )
2023-10-11 17:34:14 +08:00
this . store . commit ( 'setLikeDesignCollectionList' , likeDesignCollectionList )
2023-09-25 10:09:00 +08:00
}
) . catch ( res => {
this . loadingShow = false
} ) ;
} ,
//按比设置单件衣服宽高位置
async setPostition ( url : any ) {
let img : any = await loadImage ( url )
2023-10-27 11:09:32 +08:00
let modal _body = < HTMLImageElement > document . getElementsByClassName ( 'detail_modal_model' ) [ 0 ]
console . log ( modal _body ) ;
2023-09-25 10:09:00 +08:00
const num = modal _body ? . offsetWidth / img . width ;
function loadImage ( url : any ) {
return new Promise ( ( resolve , reject ) => {
const img = new Image ( ) ;
img . onload = ( ) => {
resolve ( img )
} ;
img . onerror = reject ;
img . src = url ;
} ) ;
}
return num
} ,
2023-01-06 16:00:15 +08:00
//切换上一张或下一张图的详情
changeDesignItem ( type : string ) {
let { design , index , collectionList } = this . parentData
let newDesign = { }
let newIndex = 0
2023-09-25 10:09:00 +08:00
this . designOrder = false
2023-10-27 11:09:32 +08:00
this . removeRevocation ( )
2023-09-25 10:09:00 +08:00
let DesignDetailAlter : any = this . $refs . DesignDetailAlter
DesignDetailAlter . terminate ( )
2023-01-06 16:00:15 +08:00
if ( type === 'last' ) {
if ( index > 0 ) {
newIndex = this . parentData . index - 1
} else {
newIndex = this . parentData . collectionList . length - 1
}
} else {
if ( index < this . parentData . collectionList . length - 1 ) {
newIndex = this . parentData . index + 1
} else {
newIndex = 0
}
}
newDesign = collectionList [ newIndex ]
let data = {
design : newDesign ,
index : newIndex ,
collectionList : collectionList
}
2023-10-11 17:34:14 +08:00
this . showDesignDetailModal ( data , '' )
2023-01-06 16:00:15 +08:00
} ,
//显示图片详情
2023-09-12 10:11:27 +08:00
showDesignImgDetail ( num : any ) {
let designItemDetail = JSON . parse ( JSON . stringify ( this . store . state . DesignDetailModule . designItemDetail ) )
this . designShowPrview = num
let setDesignItem : any = this . $refs . setDesignItem
2023-01-06 16:00:15 +08:00
2023-09-12 10:11:27 +08:00
if ( this . designShowPrview == 3 ) {
setDesignItem . init ( )
}
// this.others = designItemDetail.others
// if(this.generateHighDesignImg){
// this.designShowPrview = 3
// }else{
// this.designShowPrview = 2
// }
2023-01-06 16:00:15 +08:00
} ,
2023-09-12 10:11:27 +08:00
//图片按下样子
mousedownDesignImg ( ) {
this . imgDesignImg = false
} ,
//图片抬起样子
mouseupDesignImg ( ) {
this . imgDesignImg = true
} ,
2023-10-12 17:09:05 +08:00
clothesOpen ( index : any ) {
this . clothesDetail ( '' , index )
} ,
clothesOpenActive ( index : any ) {
this . designItemDetail . clothes . forEach ( ( item : any ) => {
item . clothesOpen = false
} )
this . designItemDetail . clothes [ index ] . clothesOpen = true
} ,
2023-01-06 16:00:15 +08:00
//元素替换
clothesDetail ( clothes : any , index : number ) {
2023-09-25 10:09:00 +08:00
let designItemDetail = JSON . parse ( JSON . stringify ( this . store . state . DesignDetailModule . designItemDetail ) )
this . currentIndex = index
2023-09-12 10:11:27 +08:00
this . designOrder = true
2023-09-25 10:09:00 +08:00
this . current = designItemDetail . clothes [ this . currentIndex ]
2023-10-12 17:09:05 +08:00
this . clothesOpenActive ( index )
2023-10-11 17:34:14 +08:00
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 ,
2023-09-25 10:09:00 +08:00
}
this . store . commit ( 'setDesignPreviewData' , data )
2023-09-12 10:11:27 +08:00
let DesignDetailAlter : any = this . $refs . DesignDetailAlter
DesignDetailAlter . changePlace ( )
2023-01-06 16:00:15 +08:00
} ,
//重新设计
redesignItem ( ) {
let designItemDetail = JSON . parse ( JSON . stringify ( this . store . state . DesignDetailModule . designItemDetail ) )
delete designItemDetail . designItemUrl
let priority = designItemDetail . clothes . map ( ( v : any ) => {
return v . type
} )
let data = {
... designItemDetail ,
priority : priority ,
timeZone : Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone ,
}
this . loadingShow = true
Https . axiosPost ( Https . httpUrls . designSingle , data ) . then (
( rv : any ) => {
this . parentData . design . designItemUrl = rv . designItemUrl
this . $emit ( 'finishRedesign' , this . parentData )
this . closeModal ( )
this . loadingShow = false
}
) . catch ( res => {
this . loadingShow = false
} ) ;
}
}
} )
< / script >
< style lang = "less" >
. design _detail _modal _component {
color : # 000 ;
2023-10-11 17:34:14 +08:00
// max-width: 1440px ;
2023-09-12 10:11:27 +08:00
2023-08-23 17:50:09 +08:00
. ant - modal - content {
2023-10-20 17:21:45 +08:00
border - radius : 1 rem ;
2023-09-12 10:11:27 +08:00
// overflow: hidden;
2023-08-23 17:50:09 +08:00
. ant - modal - header {
background - color : # fff ;
border - bottom : none ;
}
. ant - modal - body {
padding : 4 rem 5 rem 0 rem ! important ;
// height: calc(65vh - 6.4rem);
height : 65 rem ;
display : flex ;
2023-09-12 10:11:27 +08:00
overflow - y : hidden ;
2023-08-23 17:50:09 +08:00
flex - direction : column ;
}
}
2023-01-06 16:00:15 +08:00
. ant - modal - close {
width : 3.6 rem ;
height : 3.6 rem ;
position : absolute ;
top : - 1.8 rem ;
right : - 1.8 rem ;
}
. ant - modal - header {
display : none ;
}
2023-09-12 10:11:27 +08:00
2023-01-06 16:00:15 +08:00
. turn _button {
width : 3.6 rem ;
height : 3.6 rem ;
background : # 000000 ;
border - radius : 50 % ;
position : absolute ;
top : calc ( 50 % - 1.8 rem ) ;
cursor : pointer ;
line - height : 3.6 rem ;
text - align : center ;
& . turn _left _button {
left : - 8 rem ;
}
& . turn _right _button {
right : - 8 rem ;
}
. icon _turn {
font - size : 2.4 rem ;
color : # ffffff ;
}
}
. design _detail _modal _body {
2023-08-23 17:50:09 +08:00
flex : 1 ;
2023-01-06 16:00:15 +08:00
display : flex ;
justify - content : space - between ;
width : 100 % ;
2023-09-12 10:11:27 +08:00
overflow : hidden ;
2023-08-23 17:50:09 +08:00
// padding: 1.5rem 1rem 2.5rem;
2023-01-06 16:00:15 +08:00
box - sizing : border - box ;
2023-08-23 17:50:09 +08:00
. detail _modal _body _img {
2023-10-27 11:09:32 +08:00
overflow : hidden ;
2023-08-23 17:50:09 +08:00
// width: 43.3rem;
width : 23 % ;
2023-01-06 16:00:15 +08:00
height : 100 % ;
background : # FFFFFF ;
display : flex ;
justify - content : center ;
align - items : center ;
2023-08-23 17:50:09 +08:00
position : relative ;
2023-09-12 10:11:27 +08:00
flex - direction : column ;
2023-09-25 10:09:00 +08:00
// height: 50%;
. detail _modal _body {
position : relative ;
2023-10-11 17:34:14 +08:00
// max-width: 245px;
2023-10-20 17:21:45 +08:00
width : 100 % ;
2023-10-12 17:09:05 +08:00
height : 100 % ;
. detail _modal _body _nav {
display : flex ;
position : absolute ;
top : 0 ;
left : 50 % ;
z - index : 999 ;
2023-10-27 11:09:32 +08:00
transform : translate ( - 50 % , - 120 % ) ;
transition : all .3 s ;
2023-10-12 17:09:05 +08:00
> div {
width : 4 rem ;
height : 4 rem ;
cursor : pointer ;
text - align : center ;
img {
// width: 100%;
height : 100 % ;
2023-10-13 17:06:44 +08:00
max - width : 100 % ;
object - fit : cover ;
2023-10-12 17:09:05 +08:00
}
& . active {
border : 2 px solid rgba ( 0 , 0 , 0 , 0.4 ) ;
img {
transform : scale ( .8 ) ;
opacity : .8 ;
}
}
}
> div : nth - child ( 1 ) {
margin - right : 1 rem ;
}
}
2023-09-25 10:09:00 +08:00
. detail _modal _item _front : last - child {
z - index : 1 ! important ;
}
> img {
width : 100 % ;
}
2023-10-27 11:09:32 +08:00
. detail _modal _model _content {
top : 50 % ;
transform : translate ( - 50 % , - 50 % ) ;
left : 50 % ;
2023-09-25 10:09:00 +08:00
position : relative ;
2023-10-27 11:09:32 +08:00
height : 80 % ;
display : inline - block ;
. detail _modal _model {
z - index : 1 ;
position : relative ;
2023-10-20 17:21:45 +08:00
width : auto ;
2023-10-27 11:09:32 +08:00
max - height : 100 % ;
2023-09-25 10:09:00 +08:00
}
2023-10-27 11:09:32 +08:00
. detail _modal _item _front , . detail _modal _item _back {
cursor : pointer ;
position : absolute ;
img {
// width: 100%;
max - height : 100 % ;
width : auto ;
}
& . active {
top : 50 % ;
left : 50 % ;
transform : translate ( - 50 % , - 50 % ) ;
}
2023-10-11 17:34:14 +08:00
}
2023-10-27 11:09:32 +08:00
. detail _modal _item _back {
z - index : 1 ! important ;
}
. detail _modal _item _front {
2023-09-25 10:09:00 +08:00
2023-10-27 11:09:32 +08:00
}
2023-09-12 10:11:27 +08:00
}
2023-10-27 11:09:32 +08:00
2023-09-12 10:11:27 +08:00
}
2023-10-13 17:06:44 +08:00
. subitOkPreviewBtn {
bottom : 2 rem ;
z - index : 999 ;
}
2023-09-25 10:09:00 +08:00
. clothes _item _img _block {
display : flex ;
}
2023-01-06 16:00:15 +08:00
. detial _img {
max - width : 100 % ;
2023-10-27 11:09:32 +08:00
max - height : 80 % ;
2023-01-06 16:00:15 +08:00
}
2023-10-11 17:34:14 +08:00
. detail _btn {
z - index : 9999 ;
}
. detial _img1 {
position : absolute ;
}
2023-08-23 17:50:09 +08:00
div {
i {
position : absolute ;
2023-09-12 10:11:27 +08:00
cursor : pointer ;
zoom : 1.2 ;
2023-10-27 11:09:32 +08:00
transition : all .3 s ;
2023-08-23 17:50:09 +08:00
& . fi - bs - expand - arrows - alt {
top : 0 ;
left : 0 ;
2023-10-27 11:09:32 +08:00
transform : translateX ( - 120 % ) ;
2023-08-23 17:50:09 +08:00
}
& . fi - rr - edit {
left : 0 ;
2023-10-20 17:21:45 +08:00
top : 3 rem ;
2023-10-27 11:09:32 +08:00
transform : translateX ( - 120 % ) ;
2023-08-23 17:50:09 +08:00
}
& . fi - rr - copy {
top : 0 ;
right : 0 ;
2023-10-27 11:09:32 +08:00
transform : translateX ( 120 % ) ;
}
& . icon - fanchehui {
top : 6 rem ;
right : 0 ;
transform : translateX ( 120 % ) ;
}
& . icon - chehui {
top : 3 rem ;
right : 0 ;
transform : translateX ( 120 % ) ;
}
}
i : hover {
}
}
& . detail _modal _body _img : hover {
. detail _modal _body {
. detail _modal _body _nav {
transform : translate ( - 50 % , 0 % ) ;
}
}
div {
i {
transform : translateX ( 0 ) ;
2023-08-23 17:50:09 +08:00
}
}
}
2023-01-06 16:00:15 +08:00
}
2023-08-23 17:50:09 +08:00
. detail _modal _body _category {
width : 17 % ;
2023-01-06 16:00:15 +08:00
height : 100 % ;
2023-09-12 10:11:27 +08:00
position : relative ;
2023-01-06 16:00:15 +08:00
. detail _modal _right _top {
width : 100 % ;
2023-10-20 17:21:45 +08:00
height : 100 % ;
2023-01-06 16:00:15 +08:00
background : # fff ;
overflow - y : auto ;
2023-10-20 17:21:45 +08:00
display : flex ;
flex - direction : column ;
2023-01-06 16:00:15 +08:00
. clothes _detail _item {
2023-10-20 17:21:45 +08:00
// margin-bottom: 5rem;
flex : 1 ;
2023-09-12 10:11:27 +08:00
. centent _div {
display : flex ;
2023-10-11 17:34:14 +08:00
cursor : pointer ;
2023-09-25 10:09:00 +08:00
justify - content : center ;
2023-09-12 10:11:27 +08:00
}
2023-08-23 17:50:09 +08:00
. centent {
cursor : pointer ;
left : 50 % ;
transform : translateX ( - 50 % ) ;
position : relative ;
display : inline - block ;
}
2023-01-06 16:00:15 +08:00
. clothes _item _header {
2023-08-23 17:50:09 +08:00
// height: 6.4rem;
margin - bottom : 1 rem ;
display : flex ;
font - size : 1.8 rem ;
2023-01-06 16:00:15 +08:00
color : # 000000 ;
2023-08-23 17:50:09 +08:00
justify - content : space - between ;
2023-01-06 16:00:15 +08:00
. icon - dangqianweizhi {
font - size : 1.8 rem ;
color : # 000000 ;
margin - right : 1 rem ;
}
2023-08-23 17:50:09 +08:00
i {
font - size : 1.8 rem ;
display : block ;
2023-09-25 10:09:00 +08:00
& . fi - rr - edit {
cursor : pointer ;
}
2023-08-23 17:50:09 +08:00
}
2023-01-06 16:00:15 +08:00
}
2023-08-23 17:50:09 +08:00
img {
width : 10 rem ;
height : 10 rem ;
}
2023-09-12 10:11:27 +08:00
& . clothes _detail _item _apparel {
img {
max - height : 100 % ;
2023-09-26 15:05:14 +08:00
width : auto ;
2023-09-12 10:11:27 +08:00
}
}
2023-08-23 17:50:09 +08:00
. color _item {
display : inline - block ;
vertical - align : top ;
border : 1 px solid # ebe9e9 ;
. color _content {
2023-09-12 10:11:27 +08:00
width : 8 rem ;
2023-08-23 17:50:09 +08:00
height : 4 rem ;
2023-09-12 10:11:27 +08:00
white - space : nowrap ;
overflow : hidden ;
text - overflow : ellipsis ;
2023-08-23 17:50:09 +08:00
}
. color _content _body {
. color _des {
font - size : 1.2 rem ;
font - weight : 600 ;
2023-10-11 17:34:14 +08:00
white - space : nowrap ;
width : 8 rem ;
overflow : hidden ;
text - overflow : ellipsis ;
2023-08-23 17:50:09 +08:00
}
}
& : nth - child ( 4 n ) {
margin - right : 0 ;
}
}
& . clothes _detail _item _print {
. fi - rr - picture {
display : flex ;
align - items : center ;
justify - content : center ;
zoom : 3 ;
margin : 1 rem 0 ;
}
}
2023-09-12 10:11:27 +08:00
& . subitOkPreviewBtn {
position : relative ;
margin - top : 2 rem ;
}
2023-01-06 16:00:15 +08:00
}
}
}
2023-08-23 17:50:09 +08:00
. detail _modal _body _select {
width : 20 % ;
. switch _type _list {
display : flex ;
align - items : center ;
position : relative ;
justify - content : space - around ;
. switch _type _item {
display : flex ;
align - items : center ;
// padding: 0 2rem;
height : 4 rem ;
background : # fff ;
border - radius : 0.8 rem ;
line - height : 4 rem ;
font - size : 1.6 rem ;
// margin-right: 2.2rem;
color : # 000 ;
cursor : pointer ;
position : relative ;
text - align : center ;
transform - origin : left ;
transform : scale ( 1 ) ;
transition : 0.3 s all ;
& . switch _type _item : : before {
position : absolute ;
content : "" ;
display : block ;
background : # 000 ;
height : 3 px ;
left : 50 % ;
transform : translateX ( - 50 % ) ;
bottom : 6 px ;
width : 0 px ;
transition : 0.3 s all ;
}
& . select _swtich {
color : # 000 ;
font - weight : 600 ;
transform : scale ( 1.15 ) ;
}
& . select _swtich : : before {
width : 100 % ;
}
. switch _icon {
font - size : 1.8 rem ;
margin - right : 0.8 rem ;
}
}
}
}
2023-01-06 16:00:15 +08:00
}
. design _detail _perview {
width : 100 % ;
height : 100 % ;
2023-10-11 17:34:14 +08:00
flex : 1 ;
overflow : hidden ;
2023-01-06 16:00:15 +08:00
& . design _detail _perview _second {
width : 100 % ;
height : 100 % ;
padding : 0.7 rem 9.1 rem 0.6 rem ;
display : flex ;
justify - content : space - between ;
align - items : center ;
}
. design _detail _perview _content {
height : 100 % ;
background : # fff ;
position : relative ;
margin : 0 auto ;
display : flex ;
align - items : center ;
justify - content : center ;
. perview _img {
max - width : 100 % ;
max - height : 100 % ;
}
. generate _button {
position : absolute ;
top : 0 ;
right : - 20.2 rem ;
padding : 0 1.5 rem ;
text - align : center ;
height : 3.6 rem ;
line - height : 3.6 rem ;
background : # 343579 ;
2023-10-11 17:34:14 +08:00
font - size : 1.4 rem ;
2023-01-06 16:00:15 +08:00
font - family : Roboto ;
color : # FFFFFF ;
cursor : pointer ;
}
& : hover . img _item _hover {
display : block ;
}
. img _item _hover {
position : absolute ;
width : 100 % ;
height : 100 % ;
left : 0 ;
top : 0 ;
background : rgba ( 0 , 0 , 0 , 0.4 ) ;
display : none ;
. img _operate _block {
width : 3.6 rem ;
height : 3.6 rem ;
background : rgba ( 0 , 0 , 0 , 0.6 ) ;
border - radius : 50 % ;
position : absolute ;
right : 2.2 rem ;
text - align : center ;
line - height : 3.6 rem ;
cursor : pointer ;
& . delete _img _block {
top : 2 rem ;
}
. operate _icon {
font - size : 1.8 rem ;
color : # fff ;
}
}
}
}
}
}
2023-08-23 17:50:09 +08:00
< / style >