|
|
@ -1,22 +1,25 @@ |
|
|
|
<template> |
|
|
|
<view class=""> |
|
|
|
<!-- <view class="" style="width: 100%;height: 130rpx;"> |
|
|
|
|
|
|
|
</view> --> |
|
|
|
<view class="custom-tab-bar"> |
|
|
|
<view |
|
|
|
class="tab-item" |
|
|
|
v-for="(item, i) in tabBarList" |
|
|
|
:key="i" |
|
|
|
v-if="tabBarShowList[i]" |
|
|
|
@click="switchTab(i)" |
|
|
|
> |
|
|
|
<text :style="{ color: currentTab === i ? item.selectColor : '#fff' }">{{ |
|
|
|
<view class=""> |
|
|
|
<view class="custom-tab-bar-placeholder"></view> |
|
|
|
<view class="custom-tab-bar"> |
|
|
|
<view |
|
|
|
class="tab-item" |
|
|
|
v-for="(item, i) in tabBarList" |
|
|
|
:key="i" |
|
|
|
v-if="tabBarShowList[i]" |
|
|
|
@click="switchTab(i)" |
|
|
|
> |
|
|
|
<image |
|
|
|
:src="currentTab === i ? item.select_img : item.img" |
|
|
|
style="height: 80rpx" |
|
|
|
mode="heightFix" |
|
|
|
></image> |
|
|
|
<!-- <text :style="{ color: currentTab === i ? item.selectColor : '#fff' }">{{ |
|
|
|
item.text |
|
|
|
}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
}}</text> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
@ -33,12 +36,16 @@ export default { |
|
|
|
{ |
|
|
|
pagePath: "pages/index/index", |
|
|
|
selectColor: "#00FF00", |
|
|
|
img: require("@/static/image/tabbar/home.png"), |
|
|
|
select_img: require("@/static/image/tabbar/home_select.png"), |
|
|
|
text: "首页", |
|
|
|
}, |
|
|
|
{ |
|
|
|
pagePath: "pages/index/readingBody", |
|
|
|
selectColor: "#00FF00", |
|
|
|
text: "阅读体", |
|
|
|
img: require("@/static/image/tabbar/book.png"), |
|
|
|
select_img: require("@/static/image/tabbar/book_select.png"), |
|
|
|
}, |
|
|
|
// { |
|
|
|
// pagePath: "pages/index/sensoryStore", |
|
|
@ -49,16 +56,22 @@ export default { |
|
|
|
pagePath: "pages/index/timeShopBank", |
|
|
|
selectColor: "#00FF00", |
|
|
|
text: "时间银行", |
|
|
|
img: require("@/static/image/tabbar/time.png"), |
|
|
|
select_img: require("@/static/image/tabbar/time_select.png"), |
|
|
|
}, |
|
|
|
{ |
|
|
|
pagePath: "pages/index/intelligentAgent", |
|
|
|
selectColor: "#00FFFF", |
|
|
|
text: "智能体", |
|
|
|
img: require("@/static/image/tabbar/agent.png"), |
|
|
|
select_img: require("@/static/image/tabbar/agent_select.png"), |
|
|
|
}, |
|
|
|
{ |
|
|
|
pagePath: "pages/index/iSoul", |
|
|
|
selectColor: "#00FF00", |
|
|
|
text: "iSoul", |
|
|
|
img: require("@/static/image/tabbar/isoul.png"), |
|
|
|
select_img: require("@/static/image/tabbar/isoul_select.png"), |
|
|
|
}, |
|
|
|
], |
|
|
|
tabBarShowList: [], |
|
|
@ -105,9 +118,15 @@ export default { |
|
|
|
display: flex; |
|
|
|
justify-content: space-around; |
|
|
|
align-items: center; |
|
|
|
height: 123rpx; |
|
|
|
z-index: 30; |
|
|
|
background: #989898; |
|
|
|
padding: 20rpx 0; |
|
|
|
background: white; |
|
|
|
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx); |
|
|
|
} |
|
|
|
|
|
|
|
.custom-tab-bar-placeholder { |
|
|
|
height: calc(env(safe-area-inset-bottom) + 120rpx); |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
|
|
|
|
.tab-item { |
|
|
|