143 lines
3.1 KiB
Vue
143 lines
3.1 KiB
Vue
<template>
|
||
<!-- <view class="bg-wrapper">
|
||
<image src="https://gymfuture.oss-cn-chengdu.aliyuncs.com/static/images/wave_top.png" mode="widthFix" class="wave-bg wave-top" />
|
||
<image src="https://gymfuture.oss-cn-chengdu.aliyuncs.com/static/images/wave_bottom.png" mode="widthFix" class="wave-bg wave-bottom" />
|
||
</view> -->
|
||
<view class="tab-page">
|
||
<view class="tab-page__header">
|
||
<text class="tab-page__title">发现</text>
|
||
<text class="tab-page__subtitle">活动 · 资讯 · 今日推荐</text>
|
||
</view>
|
||
|
||
<TodayRecommend />
|
||
|
||
<view class="discover-links">
|
||
<view class="discover-link" hover-class="discover-link--hover" @tap="goReferral">
|
||
<text class="discover-link__title">邀请好友</text>
|
||
<text class="discover-link__desc">邀请注册/购课,双方得积分</text>
|
||
</view>
|
||
<view class="discover-link" hover-class="discover-link--hover" @tap="goCouponCenter">
|
||
<text class="discover-link__title">领券中心</text>
|
||
<text class="discover-link__desc">限时优惠券,先到先得</text>
|
||
</view>
|
||
<view class="discover-link" hover-class="discover-link--hover" @tap="goPointsMall">
|
||
<text class="discover-link__title">积分商城</text>
|
||
<text class="discover-link__desc">积分兑换好礼</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="bottom-placeholder"></view>
|
||
</view>
|
||
<TabBar :active="3" />
|
||
</template>
|
||
|
||
<script setup>
|
||
import TodayRecommend from '@/components/index/TodayRecommend.vue'
|
||
import TabBar from '@/components/TabBar.vue'
|
||
import { PAGE, navigateToPage } from '@/common/constants/routes.js'
|
||
|
||
function goReferral() {
|
||
navigateToPage(PAGE.REFERRAL)
|
||
}
|
||
|
||
function goCouponCenter() {
|
||
navigateToPage(PAGE.COUPON_CENTER)
|
||
}
|
||
|
||
function goPointsMall() {
|
||
navigateToPage(PAGE.POINTS_MALL)
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.bg-wrapper {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
z-index: 1;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.wave-bg {
|
||
position: fixed;
|
||
left: 0;
|
||
width: 100%;
|
||
pointer-events: none;
|
||
opacity: 0.6;
|
||
}
|
||
|
||
.wave-top {
|
||
top: 0;
|
||
opacity: 0.5;
|
||
}
|
||
|
||
.wave-bottom {
|
||
bottom: 100rpx;
|
||
opacity: 0.35;
|
||
}
|
||
.tab-page {
|
||
min-height: 100vh;
|
||
padding-bottom: 160rpx;
|
||
position: relative;
|
||
z-index: 1;
|
||
}
|
||
|
||
.tab-page__header {
|
||
padding: 48rpx 32rpx 16rpx;
|
||
}
|
||
|
||
.tab-page__title {
|
||
display: block;
|
||
font-size: 40rpx;
|
||
font-weight: $font-weight-bold;
|
||
color: $text-dark;
|
||
}
|
||
|
||
.tab-page__subtitle {
|
||
display: block;
|
||
margin-top: 8rpx;
|
||
font-size: 24rpx;
|
||
color: $text-muted;
|
||
}
|
||
|
||
.discover-links {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16rpx;
|
||
padding: 24rpx 32rpx;
|
||
}
|
||
|
||
.discover-link {
|
||
padding: 24rpx 28rpx;
|
||
border-radius: $radius-md;
|
||
background: $bg-white;
|
||
box-shadow: $shadow-sm;
|
||
border: 1px solid $border-light;
|
||
transition: all 0.2s ease;
|
||
}
|
||
|
||
.discover-link:active {
|
||
transform: scale(0.98);
|
||
}
|
||
|
||
.discover-link__title {
|
||
display: block;
|
||
font-size: 28rpx;
|
||
font-weight: $font-weight-bold;
|
||
color: $text-dark;
|
||
}
|
||
|
||
.discover-link__desc {
|
||
display: block;
|
||
margin-top: 6rpx;
|
||
font-size: 22rpx;
|
||
color: $text-muted;
|
||
}
|
||
|
||
.bottom-placeholder {
|
||
height: 40rpx;
|
||
}
|
||
</style>
|