罗世杰:feat:初始化统计色块,完成店铺列表和找店列表的切换,完成首页导航

This commit is contained in:
LuoShijie
2023-11-06 00:08:37 +08:00
parent 79d26d70cf
commit 237f2451b8
19 changed files with 323 additions and 115 deletions

View File

@@ -3,10 +3,17 @@
<InputAndSwiper></InputAndSwiper>
<view class="home-content">
<HomeNavCard></HomeNavCard>
<HomeNoticeBar></HomeNoticeBar>
<ShowShopList/>
<SearchShopListItem></SearchShopListItem>
<SearchShopListItem></SearchShopListItem>
<HomeNoticeBar :text="notice"/>
<Statistics :data="statisticsNum"/>
<view class="show-and-search">
<view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0">
<text>店铺列表</text>
</view>
<view class="search-tab list-tab" :class="{ 'tab-activate': chooseIndex === 1 }" @click="this.chooseIndex=1">
<text>找店列表</text>
</view>
</view>
<SearchShopList v-if="chooseIndex"/><ShowShopList v-else/>
</view>
<TabBar :current-page="0"></TabBar>
</view>
@@ -14,13 +21,19 @@
<script>
import HomeNoticeBar from "./HomeNoticeBar.vue"
import HomeNavCard from "./HomeNavCard.vue"
import Statistics from "./Statistics.vue"
export default {
components: {
HomeNoticeBar
HomeNavCard,
HomeNoticeBar,
Statistics
},
data() {
return {
notice: '寒雨连江夜入吴 平明送客楚山孤 洛阳亲友如相问 一片冰心在玉壶',
chooseIndex: 0,
statisticsNum: [231753, 1345]
}
},
onLoad() {
@@ -28,6 +41,11 @@
},
methods: {
},
computed: {
isActive(currentIndex) {
// 怎么完善此处的代码
}
}
}
</script>
@@ -39,6 +57,31 @@
.home-content {
margin: 0 10px;
}
.show-and-search{
display: flex;
.list-tab {
z-index: 2;
width: 259rpx;
height: 70rpx;
background: #B7EBD2;
border-radius: 11px 100px 0px 0px;
color: #fff;
font-size: 15px;
line-height: 21px;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
}
.search-tab {
z-index: 1;
transform: translateX(-61rpx);
}
.tab-activate {
background: linear-gradient(#E86262,#CC3333);
z-index: 3;
}
}
}
</style>