feat: 首页数据

This commit is contained in:
2025-07-26 18:16:14 +08:00
parent cb22c0531c
commit 84b6d1c063
11 changed files with 214 additions and 157 deletions

View File

@@ -1,76 +1,54 @@
<template>
<view class="container">
<view class="mk-title">
<text class="title">避世放松 能量调节</text>
<image class="wave" src="@/static/wave_icon.png" mode="widthFix"/>
</view>
<view class="container-scroll">
<view class="mk-card-item" v-for="(item, index) in 8" :key="index">
<image src="/static/test/mk_img_1.png"></image>
<text>#森系环境 #出工人必备-{{item}}</text>
</view>
</view>
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration">
<swiper-item>
<view class="swiper-item uni-bg-red">A</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-green">B</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-blue">C</view>
</swiper-item>
</swiper>
</view>
</template>
<script setup>
<script>
</script>
<style lang="scss" scoped>
.container {
.mk-title {
padding: 4px 0;
display: inline-block;
position: relative;
.title {
font-weight: 400;
font-size: 16px;
color: #000000;
z-index: 2;
position: relative;
}
.wave {
position: absolute;
bottom: 2px;
left: 0;
width: 100%;
z-index: 1;
}
<style scoped lang="scss">
.container {
.uni-margin-wrap {
width: 690rpx;
width: 100%;
}
.swiper {
height: 300rpx;
border-radius: 8px;
}
.swiper-item {
display: block;
height: 300rpx;
line-height: 300rpx;
text-align: center;
}
.container-scroll {
display: flex;
flex-direction: row;
overflow-x: auto;
margin-top: 4px;
/* 隐藏滚动条 */
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
.mk-card-item {
display: flex;
flex-direction: column;
width: 188px;
height: 154px;
background-color: #ffffff;
border-radius: 10px;
margin-right: 8px;
image {
width: 188px;
height: 112px;
}
text {
padding: 12px;
text-align: center;
font-weight: 500;
font-size: 12px;
color: #333333;
}
}
.uni-bg-red {
background-color: red;
}
.uni-bg-green {
background-color: green;
}
.uni-bg-blue {
background-color: blue;
}
}
</style>