Commit 1957d92f by Lin

feat: 轻改场景首页修改

1 parent 0f5a6103
......@@ -5,7 +5,7 @@
@stopAudio="stopAudio" @showReadCountTips="showReadCountTips" @closeTips="closeTips"
@closeActivityCenter="closeActivityCenter" />
<view class="tips-box" :style="tipsObject.style" @click.stop="closeTips">{{ tipsObject.text }}</view>
<view class="right-side">
<view class="right-side" v-if="sceneType != 1">
<view :class="['app-content-box right-content', { 'show-content-box': tabIndex == 0 }]">
<view class="start" @click="start">
<template v-if="sceneType != 7">
......@@ -50,6 +50,78 @@
:isPermissionFunction="isPermission" />
</template>
</view>
<!-- 轻改场景改版 -->
<view class="right-side" v-if="sceneType == 1">
<view :class="['app-content-box right-content right-content-scene1', { 'show-content-box': tabIndex == 0 }]">
<view class="tab-box flex">
<view class="tab-list flex">
<view
v-for="(tab, index) in homeContentTabs"
:key="tab.key"
:class="['tab-item', { active: homeContentTabIndex === index }]"
@click="handleHomeContentTabClick(index)"
>
<text class="tab-item__text">{{ tab.label }}</text>
<view v-if="homeContentTabIndex === index" class="tab-item__line"></view>
</view>
</view>
<template v-if="sceneType != 7">
<view class="reception-btn" @click="start">
<image class="start-icon" :src="require('@/assets/images/common/icon-reception-start.png')" mode="aspectFit"></image>
<view class="start-text">开始接待</view>
</view>
</template>
</view>
<view
v-show="homeContentTabIndex === 0"
class="right-content-box flex right-content-box-scene1"
>
<view class="content-left" style="padding-bottom: 40px;">
<view class="module-box box-class scene1-box-shadow">
<view class="common-title">产品介绍</view>
<view class="content-box">
<template v-if="swiperCustom">
<slot name="swiperCustom" />
</template>
<template v-else>
<swiper-component :moduleList="moduleList" @click="swiperClick" :stopAutoPlay="previewOff"
:imgKey="bannerKey" :loadComplete="loadComplete"
:noDataObject="swiperNoDataObject"></swiper-component>
</template>
</view>
</view>
<view class="tool-box-2 box-class scene1-box-shadow" style="height: 252px;">
<view class="common-title">展业工具</view>
<view class="content-box">
<Entrance @entranceClick="entranceClick"></Entrance>
</view>
</view>
</view>
<view class="content-right box-class scene1-box-shadow">
<view class="common-title">服务中心</view>
<view class="content-box">
<MessageIndex class="message-box" ref="messageRef" />
</view>
</view>
</view>
<view v-show="homeContentTabIndex === 1" class="right-content-box flex right-content-box-scene1"
style="border-radius: 24px; padding: 16px 20px;box-sizing: border-box;">
<view class="home-tab-panel__placeholder">限时产品活动</view>
</view>
<view v-show="homeContentTabIndex === 2" class="right-content-box flex right-content-box-scene1"
style="border-radius: 24px; padding: 16px 20px;box-sizing: border-box;">
<view class="home-tab-panel__placeholder">挖掘潜客机会</view>
</view>
</view>
<view :class="['app-content-box right-content', { 'show-content-box': tabIndex == 99 }]">
<component :is="'Point'" ref="pointRef" :userInfo="userInfo" @showPage="handleShowPage" />
</view>
<template v-if="tabIndex != 0 && tabIndex != 99">
<component :is="componentName" ref="pointRef" :userInfo="userInfo" @showPage="handleShowPage"
:isPermissionFunction="isPermission" />
</template>
</view>
<view class="store-addr" v-if="footerBox">
<view class="icon-addr sprite-icon icon-addr"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view>
......@@ -257,6 +329,12 @@ export default {
pointComponentName: 'Point',
// userInfo: {},
tabIndex: 0,
homeContentTabs: [
{ label: '首页', key: 'home' },
{ label: '限时产品活动', key: 'activity' },
{ label: '挖掘潜客机会', key: 'customer' }
],
homeContentTabIndex: 0,
showBeisen: false,
tipsObject: {},
autoplay: true,
......@@ -343,6 +421,9 @@ export default {
const { sceneType } = uni.$storage.get('userInfo') || {}
return sceneType
},
currentHomeContentTab() {
return this.homeContentTabs[this.homeContentTabIndex] || null
},
activityWindowPopStatus() {
return this.$store.getters.activityWindowPopStatus
}
......@@ -373,6 +454,10 @@ export default {
this.getStoreBaseSceneCodeList()
},
methods: {
handleHomeContentTabClick(index) {
this.homeContentTabIndex = index
console.log('当前选中标签:', this.currentHomeContentTab)
},
_syncShowFloatLog() {
this.showFloatLog = FloatLogConfig.isLogBallVisible()
},
......@@ -959,7 +1044,11 @@ export default {
animation: show-box 0.15s forwards;
overflow: hidden;
}
.right-content-scene1 {
box-sizing: border-box;
background: #ebf7a6;
border-radius: toRpx(48);
}
@keyframes show-box {
0% {
left: 100%;
......@@ -986,6 +1075,101 @@ export default {
}
}
.tab-box {
width: 100%;
height: toRpx(112);
box-sizing: border-box;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
.tab-list {
width: 50%;
height: 100%;
align-items: center;
gap: toRpx(48);
padding-left: toRpx(48);
box-sizing: border-box;
.tab-item {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
cursor: pointer;
.tab-item__text {
font-size: toRpx(32);
line-height: toRpx(44);
color: #292D33;
transition: color 0.2s;
}
&.active .tab-item__text {
color: #2C66F7;
}
.tab-item__line {
position: absolute;
bottom: toRpx(16);
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(6);
border-radius: toRpx(3);
background: #2C66F7;
}
}
}
.reception-btn {
width: toRpx(640);
height: toRpx(88);
text-align: center;
display: flex;
align-items: center;
justify-content: center;
border-radius: toRpx(24);
border: 1px solid #ffffff;
background: linear-gradient(90deg, #61C0FF 0%, #2C66F7 100%);
border-radius: toRpx(24);
margin-right: toRpx(48);
.start-icon {
width: toRpx(48);
height: toRpx(48);
}
.start-text {
color: #ffffff;
font-size: toRpx(32);
}
}
}
.tab-box + .right-content-box,
.home-tab-panel {
height: calc(100% - #{toRpx(112)});
}
.home-tab-panel {
width: 100%;
box-sizing: border-box;
padding: toRpx(32) toRpx(48) toRpx(80);
&__placeholder {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background: #ffffff59;
backdrop-filter: blur(toRpx(16));
border-radius: toRpx(48);
font-size: toRpx(32);
color: #292D33;
}
}
.right-content-box {
width: 100%;
height: calc(100% - #{toRpx(232)});
......@@ -1000,7 +1184,9 @@ export default {
border-radius: toRpx(48);
overflow: hidden;
}
.scene1-box-shadow {
box-shadow: 0 2px 12px 0 rgba(44, 102, 247, 0.10);
}
.content-box {
position: relative;
width: 100%;
......@@ -1033,6 +1219,13 @@ export default {
margin: 0 toRpx(48);
}
}
.tool-box-2 {
height: calc(100% - #{toRpx(512)});
.content-box {
width: calc(100% - #{toRpx(96)});
margin: 0 toRpx(48);
}
}
}
.content-right {
......@@ -1040,7 +1233,12 @@ export default {
// width: toRpx(800);
}
}
.right-content-box-scene1 {
border-radius: 24px;
padding: 16px 20px;
box-sizing: border-box;
background-color: #ffffff;
}
.app-content-box {
width: 100%;
position: absolute;
......@@ -1048,6 +1246,18 @@ export default {
top: 0;
opacity: 0;
z-index: -999;
&.right-content-scene1 {
width: 98%;
height: calc(100vh - 68px);
top: 0;
right: 24px;
bottom: 0;
left: 0;
margin: auto;
transform: none;
animation: none;
}
}
.show-content-box {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!