2025-09-12 17:23:03 +08:00
|
|
|
<template>
|
2025-09-17 11:40:17 +08:00
|
|
|
<view class="message-container">
|
|
|
|
|
<!-- 固定背景的容器 -->
|
|
|
|
|
<view class="background-container"></view>
|
|
|
|
|
|
|
|
|
|
<!-- 可滚动的内容区域 -->
|
|
|
|
|
<view class="content-container" :style="'height:'+height+'px'">
|
|
|
|
|
|
2025-09-18 10:56:29 +08:00
|
|
|
<u-swiper class="u-m-t-60" :list="list" name="url" height="324"></u-swiper>
|
2025-09-17 11:40:17 +08:00
|
|
|
|
|
|
|
|
<view class="menu-list">
|
2025-09-18 10:56:29 +08:00
|
|
|
<swiper class="swiper" @change="changeMenu">
|
2025-09-17 11:40:17 +08:00
|
|
|
<swiper-item>
|
2025-09-18 10:56:29 +08:00
|
|
|
<u-grid :col="4" :border="false">
|
|
|
|
|
<u-grid-item bg-color="transparent">
|
|
|
|
|
<u-icon name="/static/home/1.png" :size="120"></u-icon>
|
|
|
|
|
<view class="grid-text">精选直播</view>
|
2025-09-17 11:40:17 +08:00
|
|
|
</u-grid-item>
|
2025-09-18 10:56:29 +08:00
|
|
|
<u-grid-item bg-color="transparent">
|
|
|
|
|
<u-icon name="/static/home/2.png" :size="120"></u-icon>
|
|
|
|
|
<view class="grid-text">订单数据</view>
|
2025-09-17 11:40:17 +08:00
|
|
|
</u-grid-item>
|
2025-09-18 10:56:29 +08:00
|
|
|
<u-grid-item bg-color="transparent" @click="openMall">
|
|
|
|
|
<u-icon name="/static/home/3.png" :size="120"></u-icon>
|
|
|
|
|
<view class="grid-text">商城好物</view>
|
2025-09-17 11:40:17 +08:00
|
|
|
</u-grid-item>
|
2025-09-18 10:56:29 +08:00
|
|
|
<u-grid-item bg-color="transparent">
|
|
|
|
|
<u-icon name="/static/home/4.png" :size="120"></u-icon>
|
|
|
|
|
<view class="grid-text">获得积分</view>
|
2025-09-17 11:40:17 +08:00
|
|
|
</u-grid-item>
|
|
|
|
|
</u-grid>
|
|
|
|
|
</swiper-item>
|
|
|
|
|
<swiper-item>
|
2025-09-18 10:56:29 +08:00
|
|
|
<u-grid :col="4" :border="false">
|
|
|
|
|
<u-grid-item bg-color="transparent">
|
|
|
|
|
<u-icon name="/static/home/5.png" :size="120"></u-icon>
|
|
|
|
|
<view class="grid-text">微信读书</view>
|
2025-09-17 11:40:17 +08:00
|
|
|
</u-grid-item>
|
|
|
|
|
</u-grid>
|
|
|
|
|
</swiper-item>
|
|
|
|
|
</swiper>
|
|
|
|
|
|
|
|
|
|
<view class="indicator-dots">
|
2025-09-18 10:56:29 +08:00
|
|
|
<view class="indicator-dots-item" :class="current==0?'indicator-dots-active':''">
|
2025-09-17 11:40:17 +08:00
|
|
|
</view>
|
2025-09-18 10:56:29 +08:00
|
|
|
<view class="indicator-dots-item" :class="current==1?'indicator-dots-active':''">
|
2025-09-17 11:40:17 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<Tabbar id="tabbarId"></Tabbar>
|
|
|
|
|
</view>
|
2025-09-12 17:23:03 +08:00
|
|
|
</template>
|
|
|
|
|
|
2025-09-17 11:40:17 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref, computed, getCurrentInstance } from 'vue';
|
|
|
|
|
import {
|
|
|
|
|
onReady
|
|
|
|
|
} from '@dcloudio/uni-app';
|
|
|
|
|
import { onReady as onUniReady } from '@dcloudio/uni-app';
|
|
|
|
|
const instance = getCurrentInstance();
|
|
|
|
|
|
|
|
|
|
const height = ref(0)
|
|
|
|
|
|
|
|
|
|
const loadHeight = () => {
|
|
|
|
|
uni.getSystemInfo({
|
|
|
|
|
success(res) {
|
|
|
|
|
let screenHeight = res.screenHeight
|
|
|
|
|
uni.createSelectorQuery().in(instance.proxy).select("#tabbarId").boundingClientRect((data : any) => {
|
|
|
|
|
height.value = screenHeight - data.height
|
|
|
|
|
}).exec()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const list = [
|
|
|
|
|
{ url: '/static/banner/1.png' },
|
|
|
|
|
{ url: '/static/banner/2.png' },
|
|
|
|
|
{ url: '/static/banner/3.png' },
|
|
|
|
|
]
|
2025-09-18 10:56:29 +08:00
|
|
|
|
|
|
|
|
const current = ref(0)
|
|
|
|
|
const changeMenu = (val : any) => {
|
|
|
|
|
current.value = val.detail.current
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const openMall = () => {
|
2025-09-18 09:52:30 +08:00
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/mall/mall'
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-09-17 11:40:17 +08:00
|
|
|
|
|
|
|
|
onUniReady(() => {
|
|
|
|
|
loadHeight()
|
|
|
|
|
})
|
2025-09-12 17:23:03 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-09-17 11:40:17 +08:00
|
|
|
.message-container {
|
|
|
|
|
width: 100%;
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
/* 防止容器本身滚动 */
|
|
|
|
|
|
|
|
|
|
/* 固定背景 */
|
|
|
|
|
.background-container {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: linear-gradient(180deg, #2F75F9 0%, #F0F3FF 34.13%);
|
|
|
|
|
z-index: 1;
|
|
|
|
|
/* 确保背景在内容下方 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 内容滚动区域 */
|
|
|
|
|
.content-container {
|
|
|
|
|
position: relative;
|
|
|
|
|
z-index: 2;
|
|
|
|
|
/* 确保内容在背景上方 */
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow-y: scroll;
|
|
|
|
|
height: 100%;
|
|
|
|
|
// padding: 32rpx;
|
|
|
|
|
|
|
|
|
|
.menu-list {
|
2025-09-18 10:56:29 +08:00
|
|
|
border-top-left-radius: 32rpx;
|
|
|
|
|
border-top-right-radius: 32rpx;
|
|
|
|
|
box-shadow: 0rpx -8rpx 20rpx 0rpx #628AC080;
|
|
|
|
|
padding-bottom: 20rpx;
|
2025-09-17 11:40:17 +08:00
|
|
|
|
|
|
|
|
.swiper {
|
2025-09-18 10:56:29 +08:00
|
|
|
height: 200rpx;
|
2025-09-17 11:40:17 +08:00
|
|
|
|
|
|
|
|
.grid-text {
|
2025-09-18 10:56:29 +08:00
|
|
|
font-family: Work Sans;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-style: Regular;
|
2025-09-17 11:40:17 +08:00
|
|
|
font-size: 28rpx;
|
2025-09-18 10:56:29 +08:00
|
|
|
leading-trim: NONE;
|
|
|
|
|
line-height: 32rpx;
|
|
|
|
|
letter-spacing: -2%;
|
|
|
|
|
text-align: center;
|
2025-09-17 11:40:17 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.indicator-dots {
|
|
|
|
|
// margin-top: 40rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.indicator-dots-item {
|
|
|
|
|
background-color: $u-tips-color;
|
|
|
|
|
height: 6px;
|
|
|
|
|
width: 6px;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
margin: 0 3px;
|
|
|
|
|
}
|
2025-09-12 17:23:03 +08:00
|
|
|
|
2025-09-17 11:40:17 +08:00
|
|
|
.indicator-dots-active {
|
|
|
|
|
background-color: $u-type-primary;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-09-12 17:23:03 +08:00
|
|
|
</style>
|