Commit b32994de by Lin

Merge branch 'saas+v5.8.3' of http://192.168.3.233:8090/glsx/gl_tape into saas+v5.8.3

2 parents 1957d92f 0fa9de97
<template>
<view class="goods-content">
<template v-if="goodsList.length">
<scroll-view scroll-y class="content-scroll-box" id="content-scroll" :style="{ height: contentHeight }"
:scroll-top="flagObject.scrollTop">
<template v-for="(i, index) in goodsList">
<view :class="['goods-item', goodsIndex == index ? 'active' : '', `status-${i.status}`]" :key="index"
@click="changeGoods(i, index)">
<view :class="['goods-status flex']">{{ statusText(i.status) }}</view>
<image class="goods-image" :src="i.chooseCardPicurl"></image>
<view class="goods-title">{{ i.name }}</view>
<view class="goods-description">
<rich-text :nodes="i.descriptionText"></rich-text>
</view>
<view class="goods-price">
¥ {{ i.updatedDate }}
<view class="old-price">¥ {{ i.merchantConfigId }}</view>
</view>
</view>
</template>
</scroll-view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'SkuBox',
props: {
defaultTabId: Number,
currentCar: [Number, String],
show: Boolean
},
data() {
return {
tabId: '1',
blockIndex: 0,
secondIndex: 0,
thirdlyIndex: 0,
goodsIndex: 0,
contentHeight: '0',
currentItem: {},
goodsList: [],
requested: false,
flagObject: {
goodsFlag: false,
scrollTop: 0
},
secondList: [],
secondName: ''
}
},
watch: {
defaultTabId: {
immediate: true,
handler(newval) {
if (this.show) this.tabId = newval
}
},
/**切换车型 */
currentCar: {
immediate: true,
handler(newval) {
if (this.show && this.requested) this.changeCar(newval)
}
},
show: {
immediate: true,
handler(newval) {
if (newval && !this.requested) {
this.requested = true
this.init(this.defaultTabId)
}
}
},
watchStatus: {
immediate: true,
handler(newval) {
this.tabId = '1'
}
},
},
computed: {
watchStatus() {
return this.$store.state.user.historyStatus;
},
blockClass() {
return ['block-0', 'block-1', 'block-2'][this.blockIndex]
},
boutiqueMediaConfig() {
return this.$store.state.user.boutiqueMediaConfig
},
list() {
let item = this.boutiqueMediaConfig[this.currentCar]
return item?.retrofitting || []
}
},
mounted() {
},
methods: {
changeCar(newval) {
let [item] = this.boutiqueMediaConfig[newval].retrofitting
this.changeTabId(item.tabId, 0, false)
},
init(tabId) {
let index = this.boutiqueMediaConfig[this.currentCar].retrofitting.findIndex(e => e.tabId == tabId)
this.changeTabId(tabId, index, false)
},
changeTabId(tabId, index, filter = true) {
if (filter && tabId == this.tabId && index == this.blockIndex) return
this.tabId = tabId
this.blockIndex = index
this.setSecondList()
},
async setSecondList() {
let secondList = this.boutiqueMediaConfig[this.currentCar].retrofitting,
index = secondList.findIndex(e => e.tabId == this.tabId)
if (index == -1) index = 0
let { list } = secondList[index]
this.secondList = list
this.secondClick(0, false)
},
setScrollHeight() {
this.$nextTick(() => {
let query = uni.createSelectorQuery()
query.select(`#content-scroll`).boundingClientRect(data => {
this.contentHeight = `calc(100% - ${data.top - 72}px)`
this.flagObject.scrollTop = 0
}).exec()
})
},
secondClick(index, filter = true) {
if (filter && this.secondIndex == index) return
let { secondList } = this
this.secondIndex = index
this.secondName = secondList[index].category
if (this.tabId == 2 && this.secondName == '窗膜') {
let { infoList } = this.secondList[index],
arr = Array.from(new Set([...infoList.map((e) => e.brand)])),
brandList = []
arr.map(e => {
let obj = {
brandName: e,
list: []
}
infoList.map(i => {
if (i.brand == e) obj.list.push(i)
})
brandList.push(obj)
})
this.brandList = brandList
this.thirdlyClick(0, false)
} else this.getGoodsList()
},
thirdlyClick(index, filter = true) {
if (filter && this.thirdlyIndex == index) return
this.thirdlyIndex = index
this.getGoodsList()
},
changeGoods(item, index, filter = true) {
if (filter && this.goodsIndex == index) return
this.goodsIndex = index
this.currentItem = item
this.changePreView()
},
getGoodsList() {
this.goodsList = []
this.flagObject.goodsFlag = false
let { secondIndex, secondList, tabId, brandList, thirdlyIndex, secondName } = this
let goodsList = this.setGoodsData(tabId == 2 && secondName == '窗膜' ? brandList[thirdlyIndex].list : secondList[secondIndex].infoList)
this.goodsList = goodsList
this.flagObject.goodsFlag = true
this.flagObject.scrollTop = -100
this.changeGoods(goodsList[0], 0, false)
setTimeout(() => {
this.setScrollHeight()
}, 500)
},
changePreView() {
this.$emit('changePreView', this.currentItem)
},
setGoodsData(data, key) {
let goodsList = []
data.map(e => {
if (e.description) e.descriptionText = e.description.replace(/<\/?br\s*\/?>|\\n|\n/g, '<br>')
goodsList.push(e)
})
console.log(goodsList)
return goodsList
},
firstClass(list = []) {
return list.length == 2 ? 'two-block' : ''
},
statusText(status) {
return status == 1 ? '主推' : '次推'
},
}
}
</script>
<style scoped lang='scss'>
.goods-content {
width: 100%;
height: 100%;
.content-scroll-box {
.goods-item {
position: relative;
width: calc(100% - #{toRpx(64)});
border: toRpx(3) solid #292D3333;
border-radius: toRpx(16);
padding: toRpx(24) toRpx(32) toRpx(24) toRpx(232);
margin-bottom: toRpx(24);
transition: all 0.15s;
.goods-status {
position: absolute;
right: 0;
top: 0;
height: toRpx(36);
color: #FFFFFF;
font-size: toRpx(24);
justify-content: center;
background: linear-gradient(90deg, #5C8AFF 0%, #49B6FF 100%);
padding: 0 20rpx;
border-radius: 0 toRpx(16) 0 toRpx(16);
}
.goods-image {
position: absolute;
width: toRpx(176);
height: toRpx(240);
top: toRpx(24);
left: toRpx(32);
}
.goods-title {
font-weight: 500;
font-size: toRpx(30);
color: #1A1A2E;
line-height: toRpx(36);
}
.goods-description {
margin-top: toRpx(8);
font-size: toRpx(26);
color: #6C6F75;
line-height: toRpx(36);
max-height: toRpx(144);
overflow: hidden;
}
.goods-price {
margin-top: toRpx(8);
font-size: toRpx(36);
color: #F24724;
line-height: toRpx(44);
display: flex;
align-items: baseline;
.old-price {
font-size: toRpx(26);
color: #999EA8;
text-decoration: line-through;
margin-left: toRpx(12);
}
}
}
.status-1 {
.goods-status {
background: linear-gradient(270deg, #FF6748 0%, #F24724 100%);
}
&::after{
position: absolute;
content: '';
width: 296rpx;
height: 228rpx;
top: 0;
right: 0;
background: url('https://img02.glsx.com.cn/weapp/resource/app-tape/common/goods-status-1.webp') no-repeat center center;
background-size: 100% 100%;
z-index: -1;
}
}
.active {
border-color: #292D33;
.goods-description {
max-height: none;
overflow: auto;
}
}
}
.nothing {
flex-direction: column;
padding-top: toRpx(136);
font-size: toRpx(28);
color: #999999;
line-height: toRpx(40);
&-icon {
width: toRpx(676);
height: toRpx(284);
margin-bottom: toRpx(24);
background-image: url('@/assets/images/boutique/nothing.webp');
background-size: 100%;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
margin: 0 auto; margin: 0 auto;
padding-top: toRpx(236); padding-top: toRpx(252);
animation: show-view-opacity 0.15s forwards; animation: show-view-opacity 0.15s forwards;
.views-title-box { .views-title-box {
height: toRpx(96); height: toRpx(96);
......
<template> <template>
<view class="layout"> <view class="layout">
<wnCanvas <wnCanvas :canvasId="`c-${madiaId}`" :drawStatus="penSwitch" custom :scaleSwitch="false" ref="receptionCanvas">
:canvasId="`c-${madiaId}`"
:drawStatus="penSwitch"
custom
:scaleSwitch="false"
ref="receptionCanvas"
>
<template slot="customContent"> <template slot="customContent">
<view class="layout-content"> <view class="layout-content">
<view class="select-box flex"> <view class="select-box flex">
<view <view class="select flex" @click.stop="showSelect">
class="select flex" {{ currentCarString }}
@click.stop="showSelect" <view class="sprite-icon icon-arrow-bottom" v-if="carList.length > 1 && !change_disabled"></view>
>
{{currentCarString}}
<view
class="sprite-icon icon-arrow-bottom"
v-if="carList.length > 1 && !change_disabled"
></view>
</view> </view>
<view <view class="pop-box" v-show="isSelect">
class="pop-box" <template v-for="(i, index) in carList">
v-show="isSelect" <view :key="i.carModelId"
> :class="['type-item flex', { active: i.carModelId == currentCarId }, { 'has-line': showLine(i, index) }, { 'is-first': index == 0 }]"
<template v-for="(i,index) in carList"> @click="changeCar(i)">{{ i.carModelName }}</view>
<view
:key="i.carModelId"
:class="['type-item flex',{active:i.carModelId == currentCarId},{'has-line':showLine(i,index)},{'is-first':index == 0}]"
@click="changeCar(i)"
>{{i.carModelName}}</view>
</template> </template>
</view> </view>
</view> </view>
<view <view class="risk-informed flex" @click="$refs.riskInformedPop.open()">
class="risk-informed flex"
@click="$refs.riskInformedPop.open()"
>
风险告知 风险告知
<view class="sprite-icon icon-info_shield"></view> <view class="sprite-icon icon-info_shield"></view>
</view> </view>
<view <view class="content-box flex" v-show="hasOptionals ? tabIndex != tabs.length - 1 : true">
class="content-box flex"
v-show="tabIndex == 0"
>
<template v-if="currentItem && currentItem.modelDisplayPicurl"> <template v-if="currentItem && currentItem.modelDisplayPicurl">
<view <view class="left-content flex" :key="updateViewKey" @click="showPicture(currentItem)">
class="left-content" <template v-if="showActivity">
:key="updateViewKey" <image :src="currentItem.modelDisplayPicurl" class="img" />
@click="showPicture(currentItem)" <view class="img-bg-1"></view>
> <view class="img-bg-2"></view>
<image <view class="img-mask">
:src="currentItem.modelDisplayPicurl" <image :src="currentItem.modelDisplayPicurl" class="icon" />
class="poster" </view>
/> </template>
<view <template v-else>
class="tips" <image :src="currentItem.modelDisplayPicurl" class="poster" />
v-if="currentItem.detailPicurl" </template>
>* 点击图片查看详情 &gt;</view> <view class="tips" v-if="currentItem.detailPicurl">* 点击图片查看详情 &gt;</view>
</view> </view>
</template> </template>
<view class="right-content"> <view class="right-content">
<view :class="['sku-box',isPreview ? 'preview' : '']"> <template v-if="showActivity">
<sku-box <view class="sku-box">
:currentCar="currentCarId" <goods-box :currentCar="currentCarId" :show="show" @changePreView="changePreView" ref="goodsBox" />
:defaultTabId="tabId"
:show="show && tabIndex == 0"
@changePreView="changePreView"
ref="sku"
/>
</view> </view>
<view </template>
class="coupon-btn flex" <template v-else>
v-if="!isPreview" <view :class="['sku-box', isPreview ? 'preview' : '']">
@click="couponPopupRef.open(customerType, customerInfo)" <sku-box :currentCar="currentCarId" :defaultTabId="tabId" :show="show && tabIndex == 0"
>{{couponText}}</view> @changePreView="changePreView" ref="sku" />
</view>
</template>
<view class="coupon-btn flex" v-if="!isPreview" @click="couponPopupRef.open(customerType, customerInfo)">
{{ couponText }}</view>
</view> </view>
</view> </view>
<optional-table <optional-table v-show="hasOptionals && tabIndex == tabs.length - 1" :currentCar="currentCarId"
v-show="tabIndex == 1" :show="show && tabIndex == tabs.length - 1"></optional-table>
:currentCar="currentCarId"
:show="show && tabIndex == 1"
></optional-table>
<template v-if="tabs.length > 1"> <template v-if="tabs.length > 1">
<view class="tabs-box flex"> <view class="tabs-box flex">
<template v-for="(i,index) in tabs"> <template v-for="(i, index) in tabs">
<view <view :class="['tab flex', { active: index == tabIndex }]" :key="index" @click="changeTab(index)">{{ i
:class="['tab flex',{active:index==tabIndex}]" }}</view>
:key="index"
@click="changeTab(index)"
>{{i}}</view>
</template> </template>
<view :class="['block',{'block-right':tabIndex == 1}]"></view> <view :class="['block', `block-${tabIndex}`]"></view>
</view> </view>
</template> </template>
</view> </view>
</template> </template>
</wnCanvas> </wnCanvas>
<car-brands <car-brands ref="carBrandRef" @select="handleSelect" />
ref="carBrandRef" <coupon-pop :carInfo="carInfo" ref="couponPopup" @reception="reception" :show="show" @hideTool="$emit('hideTool')"
@select="handleSelect" tips="微信扫码进入客户录单页" :title="customerType == 1 ? '创建客户档案' : '录入客户订单'" />
/> <risk-informed-box ref="riskInformedPop" :popupImg="popupImg" />
<coupon-pop
:carInfo="carInfo"
ref="couponPopup"
@reception="reception"
:show="show"
@hideTool="$emit('hideTool')"
tips="微信扫码进入客户录单页"
:title="customerType == 1 ?'创建客户档案' : '录入客户订单'"
/>
<risk-informed-box
ref="riskInformedPop"
:popupImg="popupImg"
/>
</view> </view>
</template> </template>
...@@ -123,9 +80,10 @@ import CarBrands from '@/components/CarBrands.vue' ...@@ -123,9 +80,10 @@ import CarBrands from '@/components/CarBrands.vue'
import CouponPop from './CouponPop.vue' import CouponPop from './CouponPop.vue'
import RiskInformedBox from './RiskInformedBox.vue' import RiskInformedBox from './RiskInformedBox.vue'
import OptionalTable from './OptionalTable.vue' import OptionalTable from './OptionalTable.vue'
import GoodsBox from './GoodsBox.vue'
export default { export default {
name: 'Reception', name: 'Reception',
components: { SkuBox, CarBrands, CouponPop, RiskInformedBox, OptionalTable }, components: { SkuBox, CarBrands, CouponPop, RiskInformedBox, OptionalTable, GoodsBox },
props: { props: {
customerType: Number, customerType: Number,
show: Boolean, show: Boolean,
...@@ -136,7 +94,7 @@ export default { ...@@ -136,7 +94,7 @@ export default {
madiaId: Number, madiaId: Number,
penSwitch: Boolean, penSwitch: Boolean,
}, },
data () { data() {
return { return {
currentCarString: '', currentCarString: '',
customerInfo: {}, customerInfo: {},
...@@ -144,30 +102,31 @@ export default { ...@@ -144,30 +102,31 @@ export default {
carInfo: {}, carInfo: {},
currentImgUrl: '', currentImgUrl: '',
currentItem: null, currentItem: null,
tabs: [],
tabIndex: 0, tabIndex: 0,
isSelect: false, isSelect: false,
currentCarId: '' currentCarId: '',
hasBeforeActivity: true,
hasAfterActivity: true,
} }
}, },
watch: { watch: {
watchCustomerInfo: { watchCustomerInfo: {
immediate: true, immediate: true,
handler (newval) { handler(newval) {
this.customerInfo = newval this.customerInfo = newval
} }
}, },
propCarId: { propCarId: {
immediate: true, immediate: true,
handler (newval) { handler(newval) {
this.currentCarId = newval this.currentCarId = newval
this.currentCarString = this.carList.find(e => e.carModelId == newval)?.carModelName || '' this.currentCarString = this.carList.find(e => e.carModelId == newval)?.carModelName || ''
} }
}, },
currentCarId: { currentCarId: {
immediate: true, immediate: true,
handler (newval) { handler(newval) {
if (!this.hasOptionals && this.tabIndex == 1) this.tabIndex = 0 if (!this.hasOptionals && this.tabIndex != 0) this.tabIndex = 0
if (this.show && newval && !this.isPreview && this.customerType == 1) { if (this.show && newval && !this.isPreview && this.customerType == 1) {
uni.showLoading({ uni.showLoading({
mask: true mask: true
...@@ -179,7 +138,7 @@ export default { ...@@ -179,7 +138,7 @@ export default {
}, },
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler (newval) { handler(newval) {
this.tabIndex = 0 this.tabIndex = 0
this.currentItem = null this.currentItem = null
this.closeAllPopup() this.closeAllPopup()
...@@ -187,53 +146,74 @@ export default { ...@@ -187,53 +146,74 @@ export default {
}, },
show: { show: {
immediate: true, immediate: true,
handler (newval) { handler(newval) {
if (newval) { if (newval) {
this.isSelect = false this.isSelect = false
if (newval && this.currentItem && this.tabIndex == 0) this.changePreView(this.currentItem, false, false) let index = 0
if (this.hasBeforeActivity || this.hasAfterActivity) {
index = 1
}
if (this.hasBeforeActivity && this.hasAfterActivity) index = 2
if (newval && this.currentItem && this.tabIndex == index) this.changePreView(this.currentItem, false, false)
} }
} }
} }
}, },
computed: { computed: {
watchStatus () { showActivity() {
let { hasBeforeActivity, hasAfterActivity, tabIndex } = this,
skuIndex = 0
if (hasBeforeActivity || hasAfterActivity) skuIndex = 1
if (hasBeforeActivity && hasAfterActivity) skuIndex = 2
return tabIndex != skuIndex
},
watchStatus() {
return this.$store.state.user.historyStatus; return this.$store.state.user.historyStatus;
}, },
watchCustomerInfo () { watchCustomerInfo() {
return this.$store.state.user.customerInfo return this.$store.state.user.customerInfo
}, },
isPreview () { isPreview() {
return this.type == 'preview' return this.type == 'preview'
}, },
couponText () { couponText() {
return this.customerType == 0 ? '录入客户订单' : '创建客户档案' return this.customerType == 0 ? '录入客户订单' : '创建客户档案'
}, },
couponPopupRef () { couponPopupRef() {
return this.$refs.couponPopup return this.$refs.couponPopup
}, },
change_disabled () { change_disabled() {
return this.customerType == 0 || this.$refs?.couponPopup?.pageParams.QRURL return this.customerType == 0 || this.$refs?.couponPopup?.pageParams.QRURL
}, },
receptionTrack () { receptionTrack() {
return this.$store.state.user.receptionTrack return this.$store.state.user.receptionTrack
}, },
boutiqueMediaConfig () { boutiqueMediaConfig() {
return this.$store.state.user.boutiqueMediaConfig return this.$store.state.user.boutiqueMediaConfig
}, },
/**选装 */ /**是否有选装项目 */
hasOptionals () { hasOptionals() {
let flag = false let flag = false
if (this.show) flag = this.boutiqueMediaConfig[this.currentCarId].optionals && this.boutiqueMediaConfig[this.currentCarId].optionals.length if (this.show) flag = this.boutiqueMediaConfig[this.currentCarId].optionals && this.boutiqueMediaConfig[this.currentCarId].optionals.length
return flag return flag
}, },
carList () { carList() {
return this.$store.state.user.boutiqueCarList return this.$store.state.user.boutiqueCarList
} },
tabs() {
let { hasBeforeActivity, hasAfterActivity, hasOptionals } = this,
tabs = ['加装']
if (hasAfterActivity) tabs.unshift('售后钜惠')
if (hasBeforeActivity) tabs.unshift('新享特惠')
if (hasOptionals) tabs.push('选装')
return tabs
},
}, },
methods: { methods: {
changeCar (item) { changeCar(item) {
if (this.change_disabled || this.currentCarId == item.carModelId) return uni.hideLoading() if (this.change_disabled || this.currentCarId == item.carModelId) return uni.hideLoading()
this.currentCarString = item.carModelName this.currentCarString = item.carModelName
this.currentCarId = item.carModelId this.currentCarId = item.carModelId
...@@ -241,7 +221,7 @@ export default { ...@@ -241,7 +221,7 @@ export default {
this.updateViewKey = Date.now() this.updateViewKey = Date.now()
this.clearCanvas() this.clearCanvas()
}, },
changePreView (e, leave = true, clearBoard = true) { changePreView(e, leave = true, clearBoard = true) {
let { currentItem } = this, let { currentItem } = this,
{ id, carModelName, name, materialType } = e, { id, carModelName, name, materialType } = e,
key = `${carModelName}_${id}`, key = `${carModelName}_${id}`,
...@@ -266,7 +246,7 @@ export default { ...@@ -266,7 +246,7 @@ export default {
} }
this.$store.dispatch("setReceptionTrack", { key, value }) this.$store.dispatch("setReceptionTrack", { key, value })
}, },
handleSelect (item) { handleSelect(item) {
this.customerInfo.carModel = item.name || '' this.customerInfo.carModel = item.name || ''
this.customerInfo.carModelId = item.id || '' this.customerInfo.carModelId = item.id || ''
Object.assign(this.customerInfo, { Object.assign(this.customerInfo, {
...@@ -279,49 +259,56 @@ export default { ...@@ -279,49 +259,56 @@ export default {
this.carInfo = item this.carInfo = item
uni.hideLoading() uni.hideLoading()
}, },
showPicture (off = true) { showPicture(off = true) {
let { detailPicurl } = this.currentItem let { detailPicurl } = this.currentItem
this.currentImgUrl = off ? detailPicurl : '' this.currentImgUrl = off ? detailPicurl : ''
}, },
reception (e) { reception(e) {
this.clearCustomerReceivedTimer() this.clearCustomerReceivedTimer()
this.$emit('reception', e) this.$emit('reception', e)
}, },
clearCustomerReceivedTimer () { clearCustomerReceivedTimer() {
if (this.couponPopupRef?.pageParams?.qrTimer) { if (this.couponPopupRef?.pageParams?.qrTimer) {
clearInterval(this.couponPopupRef.pageParams.qrTimer) clearInterval(this.couponPopupRef.pageParams.qrTimer)
this.couponPopupRef.pageParams.qrTimer = null this.couponPopupRef.pageParams.qrTimer = null
} }
}, },
closeAllPopup () { closeAllPopup() {
this.$refs.riskInformedPop?.close() this.$refs.riskInformedPop?.close()
this.$refs.couponPopup?.close() this.$refs.couponPopup?.close()
}, },
previewLeave (currentItem) { previewLeave(currentItem) {
if (this.isPreview) return if (this.isPreview) return
let key = `${currentItem.carModelName}_${currentItem.id}`, let key = `${currentItem.carModelName}_${currentItem.id}`,
value = this.receptionTrack[key] value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime) value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value }) this.$store.dispatch("setReceptionTrack", { key, value })
}, },
clearSkuState () { clearSkuState() {
this.$refs.sku.requested = false this.$refs.sku.requested = false
}, },
clearCanvas () { clearCanvas() {
this.$refs.receptionCanvas.clearBoard() this.$refs.receptionCanvas.clearBoard()
}, },
changeTab (index) { changeTab(index) {
if (this.tabIndex == index) return if (this.tabIndex == index) return
let skuIndex = 0
if (this.hasBeforeActivity || this.hasAfterActivity) skuIndex = 1
if (this.hasBeforeActivity && this.hasAfterActivity) skuIndex = 2
if (this.tabIndex == skuIndex) this.previewLeave(this.currentItem)
this.tabIndex = index this.tabIndex = index
if (index == 1) this.previewLeave(this.currentItem) this.currentItem = null
else this.$refs.sku.changeCar(this.currentCarId) this.$nextTick(() => {
if(skuIndex == 2 && index < 2) this.$refs.goodsBox.changeCar(this.currentCarId)
if (index == skuIndex) this.$refs.sku.changeCar(this.currentCarId)
this.clearCanvas() this.clearCanvas()
})
}, },
showSelect () { showSelect() {
if (this.carList.length == 1 || this.change_disabled) return if (this.carList.length == 1 || this.change_disabled) return
this.isSelect = !this.isSelect this.isSelect = !this.isSelect
}, },
showLine (item, index) { showLine(item, index) {
let result = true, let result = true,
{ carList } = this { carList } = this
if (index != 0 && item.id == carList[index - 1].id) result = false if (index != 0 && item.id == carList[index - 1].id) result = false
...@@ -339,11 +326,13 @@ export default { ...@@ -339,11 +326,13 @@ export default {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
&-content { &-content {
height: 100%; height: 100%;
margin: $margin; margin: $margin;
position: relative; position: relative;
} }
.risk-informed { .risk-informed {
position: absolute; position: absolute;
right: toRpx(24); right: toRpx(24);
...@@ -353,10 +342,12 @@ export default { ...@@ -353,10 +342,12 @@ export default {
color: #333333; color: #333333;
line-height: toRpx(48); line-height: toRpx(48);
z-index: 2; z-index: 2;
.sprite-icon { .sprite-icon {
margin-left: toRpx(8); margin-left: toRpx(8);
} }
} }
.select-box { .select-box {
padding-top: toRpx(66); padding-top: toRpx(66);
position: fixed; position: fixed;
...@@ -365,12 +356,14 @@ export default { ...@@ -365,12 +356,14 @@ export default {
width: 100%; width: 100%;
justify-content: center; justify-content: center;
z-index: 2; z-index: 2;
.select { .select {
color: #333333; color: #333333;
font-size: toRpx(36); font-size: toRpx(36);
font-weight: 500; font-weight: 500;
line-height: toRpx(44); line-height: toRpx(44);
} }
.pop-box { .pop-box {
width: toRpx(272); width: toRpx(272);
border-radius: toRpx(16); border-radius: toRpx(16);
...@@ -382,6 +375,7 @@ export default { ...@@ -382,6 +375,7 @@ export default {
transform: translateX(-50%); transform: translateX(-50%);
padding: toRpx(12) 0; padding: toRpx(12) 0;
animation: show-view-opacity 0.15s forwards; animation: show-view-opacity 0.15s forwards;
.type-item { .type-item {
padding: 0 toRpx(24); padding: 0 toRpx(24);
margin: toRpx(8) 0; margin: toRpx(8) 0;
...@@ -389,18 +383,23 @@ export default { ...@@ -389,18 +383,23 @@ export default {
color: #292d33; color: #292d33;
font-size: toRpx(28); font-size: toRpx(28);
position: relative; position: relative;
&:first-child { &:first-child {
margin-top: 0; margin-top: 0;
} }
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
&.active { &.active {
background-color: #ecf1ff; background-color: #ecf1ff;
} }
} }
.has-line { .has-line {
margin-top: toRpx(18); margin-top: toRpx(18);
&::after { &::after {
content: ''; content: '';
width: calc(100% - #{toRpx(48)}); width: calc(100% - #{toRpx(48)});
...@@ -412,6 +411,7 @@ export default { ...@@ -412,6 +411,7 @@ export default {
transform: translateX(-50%); transform: translateX(-50%);
} }
} }
.is-first { .is-first {
&::after { &::after {
display: none; display: none;
...@@ -419,18 +419,66 @@ export default { ...@@ -419,18 +419,66 @@ export default {
} }
} }
} }
.content-box { .content-box {
height: 100%; height: 100%;
padding: toRpx(144) 0 toRpx(64) toRpx(64); padding: toRpx(144) 0 toRpx(64) toRpx(64);
animation: show-view-opacity 0.15s forwards; animation: show-view-opacity 0.15s forwards;
.left-content { .left-content {
width: toRpx(1328); width: toRpx(1328);
height: 100%; height: 100%;
position: relative; position: relative;
justify-content: center;
overflow: hidden;
.poster { .poster {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.img {
width: 100%;
height: 336px;
}
.img-bg-1 {
position: absolute;
width: 100%;
height: 718rpx;
background: #fff;
opacity: 0.6;
z-index: -1;
}
.img-bg-2 {
position: absolute;
width: 100%;
height: 766rpx;
background: #fff;
opacity: 0.3;
z-index: -2;
}
.img-mask {
width: 100%;
height: 336px;
position: absolute;
top: 50%;
left: 50%;
zoom: 2;
transform: translate(-50%, -50%);
z-index: -3;
filter: blur(64rpx);
.icon {
width: 100%;
height: 100%;
}
}
.tips { .tips {
position: absolute; position: absolute;
right: toRpx(32); right: toRpx(32);
...@@ -440,14 +488,17 @@ export default { ...@@ -440,14 +488,17 @@ export default {
color: #999999; color: #999999;
line-height: toRpx(36); line-height: toRpx(36);
} }
@keyframes tips-show { @keyframes tips-show {
0% { 0% {
transform: scale(0.1); transform: scale(0.1);
} }
100% { 100% {
transform: scale(1); transform: scale(1);
} }
} }
.default { .default {
width: 100%; width: 100%;
height: toRpx(664); height: toRpx(664);
...@@ -457,18 +508,22 @@ export default { ...@@ -457,18 +508,22 @@ export default {
transform: translateY(-50%); transform: translateY(-50%);
} }
} }
.right-content { .right-content {
width: calc(100% - #{toRpx(1362)}); width: calc(100% - #{toRpx(1362)});
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-left: auto; margin-left: auto;
.sku-box { .sku-box {
height: calc(100% - #{toRpx(116)}); height: calc(100% - #{toRpx(116)});
} }
.preview { .preview {
height: 100%; height: 100%;
} }
.coupon-btn { .coupon-btn {
margin-top: auto; margin-top: auto;
width: calc(100% - #{toRpx(64)}); width: calc(100% - #{toRpx(64)});
...@@ -483,44 +538,64 @@ export default { ...@@ -483,44 +538,64 @@ export default {
} }
} }
} }
.tabs-box { .tabs-box {
position: absolute; position: absolute;
top: toRpx(156); top: toRpx(156);
left: toRpx(80); left: toRpx(80);
width: toRpx(212); // width: toRpx(212);
height: toRpx(64); height: toRpx(80);
background: #f2f2f2; background: #F5F7FA;
border-radius: toRpx(40); border-radius: toRpx(20);
box-sizing: border-box; box-sizing: border-box;
border: toRpx(2) solid #f2f2f2; border: toRpx(8) solid #F5F7FA;
gap: toRpx(8);
.tab { .tab {
width: 50%; width: toRpx(210);
height: toRpx(64);
height: 100%; height: 100%;
justify-content: center; justify-content: center;
font-size: toRpx(28); font-size: toRpx(28);
color: #666666; color: #6C6F75;
line-height: toRpx(44); line-height: toRpx(44);
position: relative; position: relative;
z-index: 2; z-index: 2;
transition: all 0.15s; transition: all 0.15s;
} }
.active { .active {
font-weight: 500; font-weight: 500;
color: #ffffff; color: #292D33;
} }
.block { .block {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 0; left: 0;
transform: translateY(-50%); transform: translateY(-50%);
width: 50%; width: toRpx(210);
height: 100%; height: toRpx(64);
background: #333333; background: #fff;
border-radius: toRpx(40); border-radius: toRpx(16);
transition: all 0.15s; transition: all 0.15s;
box-shadow: 0px 2rpx 6rpx 0px #0000001A;
} }
.block-right {
left: 50%; .block-0 {
left: 0;
}
.block-1 {
left: toRpx(218);
}
.block-2 {
left: toRpx(436);
}
.block-3 {
left: toRpx(654);
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!