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