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
......@@ -171,7 +171,7 @@ export default {
height: 100%;
box-sizing: border-box;
margin: 0 auto;
padding-top: toRpx(236);
padding-top: toRpx(252);
animation: show-view-opacity 0.15s forwards;
.views-title-box {
height: toRpx(96);
......
<template>
<view class="layout">
<wnCanvas
:canvasId="`c-${madiaId}`"
:drawStatus="penSwitch"
custom
:scaleSwitch="false"
ref="receptionCanvas"
>
<wnCanvas :canvasId="`c-${madiaId}`" :drawStatus="penSwitch" custom :scaleSwitch="false" ref="receptionCanvas">
<template slot="customContent">
<view class="layout-content">
<view class="select-box flex">
<view
class="select flex"
@click.stop="showSelect"
>
{{currentCarString}}
<view
class="sprite-icon icon-arrow-bottom"
v-if="carList.length > 1 && !change_disabled"
></view>
<view class="select flex" @click.stop="showSelect">
{{ currentCarString }}
<view class="sprite-icon icon-arrow-bottom" v-if="carList.length > 1 && !change_disabled"></view>
</view>
<view
class="pop-box"
v-show="isSelect"
>
<template v-for="(i,index) in carList">
<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>
<view class="pop-box" v-show="isSelect">
<template v-for="(i, index) in carList">
<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>
</view>
</view>
<view
class="risk-informed flex"
@click="$refs.riskInformedPop.open()"
>
<view class="risk-informed flex" @click="$refs.riskInformedPop.open()">
风险告知
<view class="sprite-icon icon-info_shield"></view>
</view>
<view
class="content-box flex"
v-show="tabIndex == 0"
>
<view class="content-box flex" v-show="hasOptionals ? tabIndex != tabs.length - 1 : true">
<template v-if="currentItem && currentItem.modelDisplayPicurl">
<view
class="left-content"
:key="updateViewKey"
@click="showPicture(currentItem)"
>
<image
:src="currentItem.modelDisplayPicurl"
class="poster"
/>
<view
class="tips"
v-if="currentItem.detailPicurl"
>* 点击图片查看详情 &gt;</view>
<view class="left-content flex" :key="updateViewKey" @click="showPicture(currentItem)">
<template v-if="showActivity">
<image :src="currentItem.modelDisplayPicurl" class="img" />
<view class="img-bg-1"></view>
<view class="img-bg-2"></view>
<view class="img-mask">
<image :src="currentItem.modelDisplayPicurl" class="icon" />
</view>
</template>
<template v-else>
<image :src="currentItem.modelDisplayPicurl" class="poster" />
</template>
<view class="tips" v-if="currentItem.detailPicurl">* 点击图片查看详情 &gt;</view>
</view>
</template>
<view class="right-content">
<view :class="['sku-box',isPreview ? 'preview' : '']">
<sku-box
:currentCar="currentCarId"
:defaultTabId="tabId"
:show="show && tabIndex == 0"
@changePreView="changePreView"
ref="sku"
/>
</view>
<view
class="coupon-btn flex"
v-if="!isPreview"
@click="couponPopupRef.open(customerType, customerInfo)"
>{{couponText}}</view>
<template v-if="showActivity">
<view class="sku-box">
<goods-box :currentCar="currentCarId" :show="show" @changePreView="changePreView" ref="goodsBox" />
</view>
</template>
<template v-else>
<view :class="['sku-box', isPreview ? 'preview' : '']">
<sku-box :currentCar="currentCarId" :defaultTabId="tabId" :show="show && tabIndex == 0"
@changePreView="changePreView" ref="sku" />
</view>
</template>
<view class="coupon-btn flex" v-if="!isPreview" @click="couponPopupRef.open(customerType, customerInfo)">
{{ couponText }}</view>
</view>
</view>
<optional-table
v-show="tabIndex == 1"
:currentCar="currentCarId"
:show="show && tabIndex == 1"
></optional-table>
<optional-table v-show="hasOptionals && tabIndex == tabs.length - 1" :currentCar="currentCarId"
:show="show && tabIndex == tabs.length - 1"></optional-table>
<template v-if="tabs.length > 1">
<view class="tabs-box flex">
<template v-for="(i,index) in tabs">
<view
:class="['tab flex',{active:index==tabIndex}]"
:key="index"
@click="changeTab(index)"
>{{i}}</view>
<template v-for="(i, index) in tabs">
<view :class="['tab flex', { active: index == tabIndex }]" :key="index" @click="changeTab(index)">{{ i
}}</view>
</template>
<view :class="['block',{'block-right':tabIndex == 1}]"></view>
<view :class="['block', `block-${tabIndex}`]"></view>
</view>
</template>
</view>
</template>
</wnCanvas>
<car-brands
ref="carBrandRef"
@select="handleSelect"
/>
<coupon-pop
:carInfo="carInfo"
ref="couponPopup"
@reception="reception"
:show="show"
@hideTool="$emit('hideTool')"
tips="微信扫码进入客户录单页"
:title="customerType == 1 ?'创建客户档案' : '录入客户订单'"
/>
<risk-informed-box
ref="riskInformedPop"
:popupImg="popupImg"
/>
<car-brands ref="carBrandRef" @select="handleSelect" />
<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>
</template>
......@@ -123,9 +80,10 @@ import CarBrands from '@/components/CarBrands.vue'
import CouponPop from './CouponPop.vue'
import RiskInformedBox from './RiskInformedBox.vue'
import OptionalTable from './OptionalTable.vue'
import GoodsBox from './GoodsBox.vue'
export default {
name: 'Reception',
components: { SkuBox, CarBrands, CouponPop, RiskInformedBox, OptionalTable },
components: { SkuBox, CarBrands, CouponPop, RiskInformedBox, OptionalTable, GoodsBox },
props: {
customerType: Number,
show: Boolean,
......@@ -136,7 +94,7 @@ export default {
madiaId: Number,
penSwitch: Boolean,
},
data () {
data() {
return {
currentCarString: '',
customerInfo: {},
......@@ -144,30 +102,31 @@ export default {
carInfo: {},
currentImgUrl: '',
currentItem: null,
tabs: [],
tabIndex: 0,
isSelect: false,
currentCarId: ''
currentCarId: '',
hasBeforeActivity: true,
hasAfterActivity: true,
}
},
watch: {
watchCustomerInfo: {
immediate: true,
handler (newval) {
handler(newval) {
this.customerInfo = newval
}
},
propCarId: {
immediate: true,
handler (newval) {
handler(newval) {
this.currentCarId = newval
this.currentCarString = this.carList.find(e => e.carModelId == newval)?.carModelName || ''
}
},
currentCarId: {
immediate: true,
handler (newval) {
if (!this.hasOptionals && this.tabIndex == 1) this.tabIndex = 0
handler(newval) {
if (!this.hasOptionals && this.tabIndex != 0) this.tabIndex = 0
if (this.show && newval && !this.isPreview && this.customerType == 1) {
uni.showLoading({
mask: true
......@@ -179,7 +138,7 @@ export default {
},
watchStatus: {
immediate: true,
handler (newval) {
handler(newval) {
this.tabIndex = 0
this.currentItem = null
this.closeAllPopup()
......@@ -187,53 +146,74 @@ export default {
},
show: {
immediate: true,
handler (newval) {
handler(newval) {
if (newval) {
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: {
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;
},
watchCustomerInfo () {
watchCustomerInfo() {
return this.$store.state.user.customerInfo
},
isPreview () {
isPreview() {
return this.type == 'preview'
},
couponText () {
couponText() {
return this.customerType == 0 ? '录入客户订单' : '创建客户档案'
},
couponPopupRef () {
couponPopupRef() {
return this.$refs.couponPopup
},
change_disabled () {
change_disabled() {
return this.customerType == 0 || this.$refs?.couponPopup?.pageParams.QRURL
},
receptionTrack () {
receptionTrack() {
return this.$store.state.user.receptionTrack
},
boutiqueMediaConfig () {
boutiqueMediaConfig() {
return this.$store.state.user.boutiqueMediaConfig
},
/**选装 */
hasOptionals () {
/**是否有选装项目 */
hasOptionals() {
let flag = false
if (this.show) flag = this.boutiqueMediaConfig[this.currentCarId].optionals && this.boutiqueMediaConfig[this.currentCarId].optionals.length
return flag
},
carList () {
carList() {
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: {
changeCar (item) {
changeCar(item) {
if (this.change_disabled || this.currentCarId == item.carModelId) return uni.hideLoading()
this.currentCarString = item.carModelName
this.currentCarId = item.carModelId
......@@ -241,7 +221,7 @@ export default {
this.updateViewKey = Date.now()
this.clearCanvas()
},
changePreView (e, leave = true, clearBoard = true) {
changePreView(e, leave = true, clearBoard = true) {
let { currentItem } = this,
{ id, carModelName, name, materialType } = e,
key = `${carModelName}_${id}`,
......@@ -266,7 +246,7 @@ export default {
}
this.$store.dispatch("setReceptionTrack", { key, value })
},
handleSelect (item) {
handleSelect(item) {
this.customerInfo.carModel = item.name || ''
this.customerInfo.carModelId = item.id || ''
Object.assign(this.customerInfo, {
......@@ -279,49 +259,56 @@ export default {
this.carInfo = item
uni.hideLoading()
},
showPicture (off = true) {
showPicture(off = true) {
let { detailPicurl } = this.currentItem
this.currentImgUrl = off ? detailPicurl : ''
},
reception (e) {
reception(e) {
this.clearCustomerReceivedTimer()
this.$emit('reception', e)
},
clearCustomerReceivedTimer () {
clearCustomerReceivedTimer() {
if (this.couponPopupRef?.pageParams?.qrTimer) {
clearInterval(this.couponPopupRef.pageParams.qrTimer)
this.couponPopupRef.pageParams.qrTimer = null
}
},
closeAllPopup () {
closeAllPopup() {
this.$refs.riskInformedPop?.close()
this.$refs.couponPopup?.close()
},
previewLeave (currentItem) {
previewLeave(currentItem) {
if (this.isPreview) return
let key = `${currentItem.carModelName}_${currentItem.id}`,
value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value })
},
clearSkuState () {
clearSkuState() {
this.$refs.sku.requested = false
},
clearCanvas () {
clearCanvas() {
this.$refs.receptionCanvas.clearBoard()
},
changeTab (index) {
changeTab(index) {
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
if (index == 1) this.previewLeave(this.currentItem)
else this.$refs.sku.changeCar(this.currentCarId)
this.clearCanvas()
this.currentItem = null
this.$nextTick(() => {
if(skuIndex == 2 && index < 2) this.$refs.goodsBox.changeCar(this.currentCarId)
if (index == skuIndex) this.$refs.sku.changeCar(this.currentCarId)
this.clearCanvas()
})
},
showSelect () {
showSelect() {
if (this.carList.length == 1 || this.change_disabled) return
this.isSelect = !this.isSelect
},
showLine (item, index) {
showLine(item, index) {
let result = true,
{ carList } = this
if (index != 0 && item.id == carList[index - 1].id) result = false
......@@ -339,11 +326,13 @@ export default {
position: absolute;
top: 0;
left: 0;
&-content {
height: 100%;
margin: $margin;
position: relative;
}
.risk-informed {
position: absolute;
right: toRpx(24);
......@@ -353,10 +342,12 @@ export default {
color: #333333;
line-height: toRpx(48);
z-index: 2;
.sprite-icon {
margin-left: toRpx(8);
}
}
.select-box {
padding-top: toRpx(66);
position: fixed;
......@@ -365,12 +356,14 @@ export default {
width: 100%;
justify-content: center;
z-index: 2;
.select {
color: #333333;
font-size: toRpx(36);
font-weight: 500;
line-height: toRpx(44);
}
.pop-box {
width: toRpx(272);
border-radius: toRpx(16);
......@@ -382,6 +375,7 @@ export default {
transform: translateX(-50%);
padding: toRpx(12) 0;
animation: show-view-opacity 0.15s forwards;
.type-item {
padding: 0 toRpx(24);
margin: toRpx(8) 0;
......@@ -389,18 +383,23 @@ export default {
color: #292d33;
font-size: toRpx(28);
position: relative;
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
&.active {
background-color: #ecf1ff;
}
}
.has-line {
margin-top: toRpx(18);
&::after {
content: '';
width: calc(100% - #{toRpx(48)});
......@@ -412,6 +411,7 @@ export default {
transform: translateX(-50%);
}
}
.is-first {
&::after {
display: none;
......@@ -419,18 +419,66 @@ export default {
}
}
}
.content-box {
height: 100%;
padding: toRpx(144) 0 toRpx(64) toRpx(64);
animation: show-view-opacity 0.15s forwards;
.left-content {
width: toRpx(1328);
height: 100%;
position: relative;
justify-content: center;
overflow: hidden;
.poster {
width: 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 {
position: absolute;
right: toRpx(32);
......@@ -440,14 +488,17 @@ export default {
color: #999999;
line-height: toRpx(36);
}
@keyframes tips-show {
0% {
transform: scale(0.1);
}
100% {
transform: scale(1);
}
}
.default {
width: 100%;
height: toRpx(664);
......@@ -457,18 +508,22 @@ export default {
transform: translateY(-50%);
}
}
.right-content {
width: calc(100% - #{toRpx(1362)});
height: 100%;
display: flex;
flex-direction: column;
margin-left: auto;
.sku-box {
height: calc(100% - #{toRpx(116)});
}
.preview {
height: 100%;
}
.coupon-btn {
margin-top: auto;
width: calc(100% - #{toRpx(64)});
......@@ -483,44 +538,64 @@ export default {
}
}
}
.tabs-box {
position: absolute;
top: toRpx(156);
left: toRpx(80);
width: toRpx(212);
height: toRpx(64);
background: #f2f2f2;
border-radius: toRpx(40);
// width: toRpx(212);
height: toRpx(80);
background: #F5F7FA;
border-radius: toRpx(20);
box-sizing: border-box;
border: toRpx(2) solid #f2f2f2;
border: toRpx(8) solid #F5F7FA;
gap: toRpx(8);
.tab {
width: 50%;
width: toRpx(210);
height: toRpx(64);
height: 100%;
justify-content: center;
font-size: toRpx(28);
color: #666666;
color: #6C6F75;
line-height: toRpx(44);
position: relative;
z-index: 2;
transition: all 0.15s;
}
.active {
font-weight: 500;
color: #ffffff;
color: #292D33;
}
.block {
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
width: 50%;
height: 100%;
background: #333333;
border-radius: toRpx(40);
width: toRpx(210);
height: toRpx(64);
background: #fff;
border-radius: toRpx(16);
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!