Browse Source

首页

dev_des
1054425342@qq.com 2 months ago
parent
commit
3d984d15af
  1. 57
      components/CustomTabBar.vue
  2. 2
      components/MusicControl.vue
  3. 2
      pages/index/iSoul.vue
  4. 38
      pages/index/index.vue
  5. BIN
      static/image/tabbar/agent.png
  6. BIN
      static/image/tabbar/agent_select.png
  7. BIN
      static/image/tabbar/book.png
  8. BIN
      static/image/tabbar/book_select.png
  9. BIN
      static/image/tabbar/home.png
  10. BIN
      static/image/tabbar/home_select.png
  11. BIN
      static/image/tabbar/isoul.png
  12. BIN
      static/image/tabbar/isoul_select.png
  13. BIN
      static/image/tabbar/time.png
  14. BIN
      static/image/tabbar/time_select.png

57
components/CustomTabBar.vue

@ -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 {

2
components/MusicControl.vue

@ -64,7 +64,7 @@ export default {
.music-control {
position: fixed;
right: 30rpx;
bottom: 150rpx;
bottom: 210rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;

2
pages/index/iSoul.vue

@ -718,8 +718,6 @@ view {
.profile-container {
background: white;
min-height: 100vh;
padding-bottom: 200rpx;
color: white;
}

38
pages/index/index.vue

@ -17,6 +17,7 @@
/>
<view class="content" @click="handleContentClick">
<Book></Book>
<!-- 权益商品区域 -->
<ProductSection
v-show="productList.length"
@ -25,7 +26,7 @@
moreUrl="/subPackages/equityGoods/index"
detailUrlPrefix="/subPackages/equityGoods/detail"
@like-toggle="handleLikeToggle"
color="#D2FFDE"
color="#D2FFDE"
/>
<ProductSection
@ -38,9 +39,8 @@
detailUrlPrefix="/subPackages/techan/detail"
@like-toggle="handleLikeToggle"
isFeel
color="#D3FCFF"
color="#D3FCFF"
/>
<view class="tab-bar-placeholder"></view>
</view>
<CustomTabBar :currentTab="0" />
@ -54,6 +54,8 @@ import headerVue from "@/components/header.vue";
import CustomTabBar from "@/components/CustomTabBar.vue";
import DynamicIsland from "@/components/DynamicIsland.vue";
import ProductSection from "@/components/ProductSection.vue";
import Book from "@/components/Book.vue";
export default {
components: {
CustomTabBar,
@ -61,6 +63,7 @@ export default {
MusicControl,
DynamicIsland,
ProductSection,
Book
},
computed: {
//
@ -120,21 +123,20 @@ export default {
async onReady() {
let res = await this.$main.getLocationInfo();
console.log(res);
if(!res.cityId){
res = {
address: "江苏省苏州市吴中区太湖东路288号",
area: "吴中区",
areaId: "320506",
city: "苏州市",
cityId: "320500",
latitude: 31.26249,
longitude: 120.63212,
province: "江苏省",
provinceId: "320000",
street: "太湖东路",
}
}
if (!res.cityId) {
res = {
address: "江苏省苏州市吴中区太湖东路288号",
area: "吴中区",
areaId: "320506",
city: "苏州市",
cityId: "320500",
latitude: 31.26249,
longitude: 120.63212,
province: "江苏省",
provinceId: "320000",
street: "太湖东路",
};
}
this.addressInfo = res;
this.selectedText = res && res.city;
uni.setStorageSync("SYS_ADDRESS_INFO", JSON.stringify(res));

BIN
static/image/tabbar/agent.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
static/image/tabbar/agent_select.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/image/tabbar/book.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
static/image/tabbar/book_select.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
static/image/tabbar/home.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/image/tabbar/home_select.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/image/tabbar/isoul.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
static/image/tabbar/isoul_select.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/image/tabbar/time.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
static/image/tabbar/time_select.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Loading…
Cancel
Save