Commit 3f7b2d98 by Lin

更新 HomeFrame 组件,替换标签列表为 TypeTabComponent,优化活动类型图标逻辑,调整样式以提升布局效果。更新相关图片资源以支持新图标。修…

…复 CustomerSide 组件的边距问题。
1 parent 8bcf0ad4

1009 Bytes | W: | H:

1.2 KB | W: | H:

assets/images/common/activity-type-afterSale.png
assets/images/common/activity-type-afterSale.png
assets/images/common/activity-type-afterSale.png
assets/images/common/activity-type-afterSale.png
  • 2-up
  • Swipe
  • Onion skin

1009 Bytes | W: | H:

1.07 KB | W: | H:

assets/images/common/activity-type-preSale.png
assets/images/common/activity-type-preSale.png
assets/images/common/activity-type-preSale.png
assets/images/common/activity-type-preSale.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -8,7 +8,11 @@
:class="['type-tag-item', { active: activityTypeIndex === index }]"
@click="handleActivityTypeClick(index)"
>
<image class="type-tag-item-img" :src="require(`@/assets/images/common/activity-type-${item.key}.png`)" mode="aspectFit"></image>
<image
class="type-tag-item-img"
:src="activityTypeIndex === index ? item.activeIcon : item.icon"
mode="aspectFit"
></image>
<text class="type-tag-item-text">{{ item.label }}</text>
</view>
</view>
......@@ -111,8 +115,18 @@ export default {
data() {
return {
activityTypeTabs: [
{ label: '新享特惠', key: 'preSale' },
{ label: '售后钜惠', key: 'afterSale' }
{
label: '新享特惠',
key: 'preSale',
icon: require('@/assets/images/common/activity-type-preSale.png'),
activeIcon: require('@/assets/images/common/activity-type-preSale-active.png')
},
{
label: '售后钜惠',
key: 'afterSale',
icon: require('@/assets/images/common/activity-type-afterSale.png'),
activeIcon: require('@/assets/images/common/activity-type-afterSale-active.png')
}
],
activityTypeIndex: 0,
carModelTabs: [
......
......@@ -175,7 +175,7 @@ export default {
justify-content: space-between;
padding: toRpx(8) 0 toRpx(28) 0;
border-bottom: 1px solid #F5F7FA;
margin-top: toRpx(36);
.header-left {
display: flex;
align-items: center;
......
......@@ -54,17 +54,14 @@
<view class="right-side" v-if="sceneType == 1">
<view :class="['app-content-box right-content right-content-scene1 app-content-box-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>
<type-tab-component
class="home-content-tab"
:typeList="homeContentTabs"
:tabIndex="homeContentTabIndex"
@tabClick="handleHomeContentTabClick"
nameKey="label"
:styleV2="true"
/>
<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>
......@@ -75,6 +72,7 @@
<view
v-show="homeContentTabIndex === 0"
class="right-content-box flex right-content-box-scene1"
style="margin-top: 16px;"
>
<view class="content-left" style="padding-bottom: 40px;">
<view class="module-box box-class scene1-box-shadow">
......@@ -274,6 +272,7 @@ import { FileUploadManager } from '@/utils/recordManager/index.js'
import ActivityTime from './components/ActivityTime/index.vue'
import CustomerSide from './components/CustomerSide/index.vue'
import CustomerOpportunities from '@/components/CustomerOpportunities/index.vue'
import TypeTabComponent from '../TypeTabComponent.vue'
export default {
// mixins: [recorder, uploader, timeout, versionCheck, merge, interceptionMixin],
......@@ -312,6 +311,7 @@ export default {
ActivityTime,
CustomerSide,
CustomerOpportunities,
TypeTabComponent,
},
props: {
id: [String, Number],
......@@ -1087,6 +1087,7 @@ export default {
box-sizing: border-box;
background: #ebf7a6;
border-radius: toRpx(48);
border: 2px solid #FFF;
}
@keyframes show-box {
0% {
......@@ -1116,52 +1117,21 @@ export default {
.tab-box {
width: 100%;
height: toRpx(112);
box-sizing: border-box;
flex-shrink: 0;
display: flex;
align-items: center;
align-items: flex-end;
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;
}
overflow: hidden;
position: relative;
z-index: 1;
.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;
}
}
.home-content-tab {
flex: 1;
min-width: 0;
overflow: hidden;
}
.reception-btn {
width: toRpx(640);
height: toRpx(88);
......@@ -1187,7 +1157,8 @@ export default {
.tab-box + .right-content-box,
.home-tab-panel {
height: calc(100% - #{toRpx(112)});
flex: 1;
min-height: 0;
}
.home-tab-panel {
......@@ -1273,11 +1244,13 @@ export default {
}
}
.right-content-box-scene1 {
border-radius: 24px;
// border-radius: 24px;
padding: 16px 20px;
box-sizing: border-box;
background-color: #ffffff;
height: calc(100%);
flex: 1;
min-height: 0;
transform: translateY(toMinusRpx(32));
.tab-container {
width: 100%;
height: 100%;
......@@ -1338,7 +1311,6 @@ export default {
}
.customer-opportunities-box{
padding: 0;
height: calc(100% - #{toRpx(112)});
}
.app-content-box {
width: 100%;
......@@ -1349,6 +1321,9 @@ export default {
z-index: -999;
&.app-content-box-scene1 {
height: calc(100vh - 68px);
display: flex;
flex-direction: column;
overflow: hidden;
}
&.right-content-scene1 {
width: 98%;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!