第一次上传

This commit is contained in:
Ls
2026-03-09 16:39:03 +08:00
commit 3d9efaf15c
924 changed files with 326227 additions and 0 deletions

View File

@@ -0,0 +1,881 @@
<template>
<view class="index-page">
<!-- 页面整体加载状态 -->
<view v-if="loding" class="page-loading">
<!-- 固定顶部区域 -->
<view class="top-fixed">
<view class="status-bar-placeholder"></view>
<view class="top-section-fixed">
<view class="location-box-skeleton">
<view class="skeleton-location-icon"></view>
<view class="skeleton-location-text"></view>
<view class="skeleton-arrow-icon"></view>
</view>
<view class="search-wrapper">
<view class="search-box-skeleton"></view>
</view>
</view>
</view>
<!-- 状态栏占位 - 沉浸式状态栏 -->
<view class="status-bar"></view>
<!-- 占位区域 - 抵消固定顶部的高度 -->
<view class="top-placeholder"></view>
<!-- 分类骨架屏 -->
<view class="category-section">
<SkeletonCategory />
</view>
<!-- 商家列表骨架屏 -->
<view class="shop-list">
<view class="shop-waterfall">
<view class="waterfall-column">
<SkeletonShopCard v-for="i in 3" :key="'left-' + i" />
</view>
<view class="waterfall-column">
<SkeletonShopCard v-for="i in 3" :key="'right-' + i" />
</view>
</view>
</view>
</view>
<!-- 实际内容 -->
<view v-else>
<!-- 固定顶部区域 -->
<view class="top-fixed">
<view class="status-bar-placeholder"></view>
<view class="top-section-fixed">
<view class="location-box" @click.stop>
<text class="ri-map-pin-line location-icon-small"></text>
<text class="location-text">宏安·连城首府</text>
<text class="ri-arrow-down-s-line arrow-icon"></text>
</view>
<view class="search-wrapper">
<view class="search-box" @click="goToSearch">
<input type="text" class="search-input" placeholder="知白茶社"
placeholder-class="search-placeholder" disabled />
<view class="search-btn">搜索</view>
</view>
</view>
</view>
</view>
<!-- 状态栏占位 - 沉浸式状态栏 -->
<view class="status-bar"></view>
<!-- 占位区域 - 抵消固定顶部的高度 -->
<view class="top-placeholder"></view>
<!-- 分类导航 - 三行五列 -->
<view class="category-section">
<view class="category-grid">
<view v-for="(category, index) in categoryData" :key="category.id" class="category-item"
@click="selectCategory(category.type)">
<view class="category-icon-box" :style="{ background: category.bgColor }">
<text :class="category.iconClass"></text>
</view>
<text class="category-name">{{ category.name }}</text>
</view>
</view>
</view>
<!-- 商家列表 - 瀑布流布局 -->
<view class="shop-list">
<view class="shop-waterfall">
<!-- 左列 -->
<view class="waterfall-column">
<view v-for="shop in leftGoodsList" :key="shop.merchId" class="shop-card" @click="goToShop(shop.id)">
<view class="shop-cover-wrapper">
<image class="shop-cover" :src="Service.GetMateUrlByImg(shop.logo)" mode="aspectFill" />
<!-- 浮动标签 - 左下角距离 -->
<view class="float-tag float-distance">
<text class="ri-map-pin-2-line tag-icon"></text>
<text class="tag-text">{{formatDistance(shop.distance)}}</text>
</view>
<!-- 右上角商家标签 -->
<view class="shop-badges">
<text v-if="shop.code=='Discounts'" class="badge-partner">联盟商家</text>
<text v-else class="badge-coop">合作商家</text>
</view>
</view>
<view class="shop-info">
<view class="shop-header">
<text class="shop-name">{{ shop.name }}</text>
</view>
<view class="shop-meta">
<text class="shop-sales">月售:{{ shop.sale }}</text>
<text class="shop-avg-price">人均{{ shop.price }}</text>
</view>
<view class="shop-footer">
<view class="shop-tags">
<!-- :class="getTagClass(coupon)" -->
<view v-for="(coupon, idx) in 1" :key="idx" class="shop-tag tag-points">
15%积分
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 右列 -->
<view class="waterfall-column">
<view v-for="shop in rightGoodsList" :key="shop.merchId" class="shop-card" @click="goToShop(shop.id)">
<view class="shop-cover-wrapper">
<image class="shop-cover" :src="Service.GetMateUrlByImg(shop.logo)" mode="aspectFill" />
<!-- 浮动标签 - 左下角距离 -->
<view class="float-tag float-distance">
<text class="ri-map-pin-2-line tag-icon"></text>
<text class="tag-text">{{formatDistance(shop.distance)}}</text>
</view>
<!-- 右上角商家标签 -->
<view class="shop-badges">
<text v-if="shop.code=='Discounts'" class="badge-partner">联盟商家</text>
<text v-else class="badge-coop">合作商家</text>
</view>
</view>
<view class="shop-info">
<view class="shop-header">
<text class="shop-name">{{ shop.name }}</text>
</view>
<view class="shop-meta">
<text class="shop-sales">月售:{{ shop.sale }}</text>
<text class="shop-avg-price">人均{{ shop.price }}</text>
</view>
<view class="shop-footer">
<view class="shop-tags">
<view v-for="(coupon, idx) in shop.tips" :key="idx" :class="getTagClass(coupon)" class="shop-tag">
{{ coupon }}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 空状态 -->
<up-loadmore :status="status" />
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import {
onLoad, onShareAppMessage, onShareTimeline
} from '@dcloudio/uni-app'
import {
ref,
onMounted,
computed
} from 'vue'
import SkeletonCategory from '../../components/skeleton/skeleton-category.vue'
import SkeletonShopCard from '../../components/skeleton/skeleton-shop-card.vue'
import { vpLoginService, Service } from '@/Service/vp/vpLoginService'
import { vpMerchService } from '@/Service/vp/vpMerchService'
// 数据
const location = ref('宏安·连城首府')
const categories = ref([])
const shops = ref([])
const currentCategory = ref('all')
let status = ref('nomore')
let loding = ref(false)
// 加载状态
const categoryLoading = ref(true)
const shopLoading = ref(true)
// 分类数据 - 15个分类(美团风格)
const categoryData = [{
id: 1,
name: '外卖',
type: 'delivery',
iconClass: 'ri-restaurant-2-line',
bgColor: '#FFCC00'
},
{
id: 2,
name: '美食',
type: 'food',
iconClass: 'ri-restaurant-line',
bgColor: '#FF6B00'
},
{
id: 3,
name: '酒店民宿',
type: 'hotel',
iconClass: 'ri-hotel-bed-line',
bgColor: '#00B8D4'
},
{
id: 4,
name: '休闲/玩乐',
type: 'fun',
iconClass: 'ri-gamepad-line',
bgColor: '#7C4DFF'
},
{
id: 5,
name: '电影/演出',
type: 'movie',
iconClass: 'ri-movie-line',
bgColor: '#FF4081'
},
{
id: 6,
name: '生活服务',
type: 'service',
iconClass: 'ri-service-line',
bgColor: '#9C27B0'
},
{
id: 7,
name: '丽人/医美',
type: 'beauty',
iconClass: 'ri-hearts-line',
bgColor: '#E91E63'
},
{
id: 8,
name: '结婚/摄影',
type: 'wedding',
iconClass: 'ri-camera-line',
bgColor: '#00BCD4'
},
{
id: 9,
name: '亲子/儿童',
type: 'kids',
iconClass: 'ri-emotion-happy-line',
bgColor: '#FF9800'
},
{
id: 10,
name: '家装/建材',
type: 'home',
iconClass: 'ri-home-gear-line',
bgColor: '#4CAF50'
},
{
id: 11,
name: '学习/培训',
type: 'education',
iconClass: 'ri-book-mark-line',
bgColor: '#2196F3'
},
{
id: 12,
name: '医疗/健康',
type: 'medical',
iconClass: 'ri-hospital-line',
bgColor: '#00B8D4'
},
{
id: 13,
name: '酒吧/ KTV',
type: 'bar',
iconClass: 'ri-goblet-line',
bgColor: '#9C27B0'
},
{
id: 14,
name: '健身/运动',
type: 'fitness',
iconClass: 'ri-run-line',
bgColor: '#FF6B00'
},
{
id: 15,
name: '更多',
type: 'more',
iconClass: 'ri-more-fill',
bgColor: '#9E9E9E'
}
]
let longitude = ref(0)
let latitude = ref(0)
let leftGoodsList=ref<Array<any>>([])
let rightGoodsList=ref<Array<any>>([])
let tabList=ref<Array<any>>([])
let page=ref(1)
onLoad(() => {
getLocation()
})
// 分享
onShareAppMessage((res) => {
return {
path: '/pages/index/index'
}
});
onShareTimeline(() => {
return {
path: '/pages/index/index'
}
})
const getLocation = () => {
uni.getLocation({
type: 'wgs84',
success: function (res) {
longitude.value = res.longitude
latitude.value = res.latitude
if (!Service.GetUserToken()) {
login()
return
}
getdata()
},
fail: function (e) {
console.log(e);
}
});
}
const login = () => {
uni.getProvider({
service: 'oauth',
success: function (res : any) {
uni.login({
onlyAuthorize: true,
provider: res.provider,
success: function (loginRes) {
vpLoginService.WxLogin(loginRes.code, 1, longitude.value, latitude.value, '').then(content => {
if (content.code == 0) {
Service.SetUserToken(res.data.accToken)
getdata()
} else {
Service.Msg(content.msg)
}
})
}
})
}
});
}
const getdata = () => {
leftGoodsList.value = []
rightGoodsList.value = []
status.value = 'loadmore'
page.value = 1
getList()
}
const getList = () => {
if (status.value !== 'loadmore') {
return
}
status.value = 'loading'
vpMerchService.GetMerchList('', '', longitude.value, latitude.value, page.value).then(res => {
res.data.merchList.forEach((goodsItem : any, GoodsIndex : number) => {
if (GoodsIndex % 2 == 0) {
leftGoodsList.value.push(goodsItem)
} else {
rightGoodsList.value.push(goodsItem)
}
})
tabList.value = res.data.assortList
status.value = res.data.merchList.length == 10 ? 'loadmore' : 'nomore'
page.value++
})
}
// 选择分类 - 跳转到商家列表页
const selectCategory = (type) => {
}
// 格式化距离
const formatDistance = (distance : any) => {
if (distance < 1000) {
return `${distance}m`
}
return `${(distance / 1000).toFixed(1)}km`
}
// 根据标签文本获取样式类
const getTagClass = (tagText:string) => {
const tagMap = {
'12%积分': 'tag-points',
'15%积分': 'tag-points',
'可用积分': 'tag-points-available',
'可用券': 'tag-coupon'
}
return tagMap[tagText] || 'tag-default'
}
// 跳转到店铺详情
const goToShop = (id : any) => {
uni.navigateTo({
url: `/pages/shop/shop?id=${id}`
})
}
// 跳转到搜索页面
const goToSearch = () => {
uni.navigateTo({
url: '/pages/search/search'
})
}
</script>
<style lang="scss" scoped>
.index-page {
min-height: 100vh;
background: #F5F5F5;
padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
}
/* 状态栏占位 - 沉浸式 */
.status-bar {
background: linear-gradient(135deg, #FF6B00, #FF9500);
height: var(--status-bar-height);
width: 100%;
}
/* 固定顶部区域 - 始终固定 */
.top-fixed {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
}
.status-bar-placeholder {
background: linear-gradient(135deg, #FF6B00, #FF9500);
height: var(--status-bar-height);
width: 100%;
}
.top-section-fixed {
background: linear-gradient(135deg, #FF6B00, #FF9500);
padding: 32rpx 20rpx 28rpx;
}
/* 占位区域 - 抵消固定顶部的高度 */
.top-placeholder {
height: calc(var(--status-bar-height) + 170rpx);
width: 100%;
}
.location-box {
display: flex;
align-items: center;
margin-bottom: 28rpx;
}
.location-icon-small {
font-size: 28rpx;
color: #FFFFFF;
margin-right: 8rpx;
}
.location-text {
font-size: 28rpx;
color: #FFFFFF;
font-weight: 500;
margin-right: 8rpx;
}
.arrow-icon {
font-size: 24rpx;
color: #FFFFFF;
}
/* 搜索区域 */
.search-wrapper {
display: flex;
align-items: center;
}
/* 搜索框 */
.search-box {
flex: 1;
display: flex;
align-items: center;
background: #FFFFFF;
border-radius: 32rpx;
padding: 6rpx 16rpx;
gap: 8rpx;
}
.search-input {
flex: 1;
font-size: 26rpx;
color: #222222;
height: 48rpx;
line-height: 48rpx;
}
.search-placeholder {
color: #999999;
}
.search-btn {
background: #FF6B00;
color: #FFFFFF;
font-size: 24rpx;
padding: 6rpx 18rpx;
border-radius: 20rpx;
font-weight: 500;
flex-shrink: 0;
}
/* 分类导航 - 三行五列 */
.category-section {
background: #FFFFFF;
padding: 32rpx 20rpx;
margin-bottom: 20rpx;
}
.category-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 32rpx 20rpx;
}
.category-item {
display: flex;
flex-direction: column;
align-items: center;
}
.category-icon-box {
width: 88rpx;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 16rpx;
margin-bottom: 12rpx;
}
.category-icon-box text {
font-size: 44rpx;
color: #FFFFFF;
}
.category-name {
font-size: 24rpx;
color: #222222;
white-space: nowrap;
}
/* 商家列表 - 瀑布流布局 */
.shop-list {
padding: 0 20rpx;
}
.shop-waterfall {
display: flex;
gap: 16rpx;
}
.waterfall-column {
flex: 1;
display: flex;
flex-direction: column;
gap: 16rpx;
}
.shop-card {
background: #FFFFFF;
border-radius: 12rpx;
overflow: hidden;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
break-inside: avoid;
}
.shop-cover-wrapper {
position: relative;
width: 100%;
height: 200rpx;
}
.shop-cover {
width: 100%;
height: 100%;
}
/* 浮动标签 */
.float-tag {
position: absolute;
padding: 2rpx 6rpx;
border-radius: 3rpx;
font-size: 16rpx;
backdrop-filter: blur(10rpx);
-webkit-backdrop-filter: blur(10rpx);
display: flex;
align-items: center;
gap: 2rpx;
}
.float-distance {
left: 6rpx;
bottom: 6rpx;
background: rgba(0, 0, 0, 0.65);
color: #FFFFFF;
}
.float-distance .tag-icon {
font-size: 14rpx;
color: #FFFFFF;
}
.float-distance .tag-text {
font-size: 16rpx;
color: #FFFFFF;
}
.shop-info {
padding: 16rpx;
}
// 右上角
.shop-badges {
position: absolute;
top: 16rpx;
right: 16rpx;
display: flex;
flex-direction: column;
gap: 8rpx;
align-items: flex-end;
}
/* 商家信息 */
.shop-header {
margin-bottom: 12rpx;
}
.shop-name {
font-size: 28rpx;
font-weight: 500;
color: #222222;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 1.4;
}
.shop-meta {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12rpx;
}
.shop-sales {
font-size: 22rpx;
color: #999999;
}
.shop-avg-price {
font-size: 26rpx;
color: #FF6B00;
font-weight: 700;
}
/* 商家标签 */
.shop-tags {
display: flex;
flex-wrap: wrap;
gap: 4rpx;
}
/* 标签 */
.tag-badge {
display: inline-block;
padding: 4rpx 12rpx;
border-radius: 6rpx;
font-size: 20rpx;
font-weight: 500;
margin-right: 12rpx;
flex-shrink: 0;
}
.tag-coupon {
background: #FFF8E1;
color: #FF6B00;
}
.shop-price {
font-size: 28rpx;
font-weight: 600;
color: #FF4D4F;
margin-right: 8rpx;
}
.shop-original {
font-size: 22rpx;
color: #999999;
text-decoration: line-through;
}
/* 空状态 */
.empty {
grid-column: 1 / -1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 0;
}
.empty-icon {
font-size: 120rpx;
color: #CCCCCC;
margin-bottom: 24rpx;
}
.empty-text {
font-size: 28rpx;
color: #999999;
}
/* 底部导航栏 - 小巧精致风格 */
.tabbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-around;
padding: 12rpx 0 calc(12rpx + env(safe-area-inset-bottom));
box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.04);
z-index: 999;
height: calc(90rpx + env(safe-area-inset-bottom));
}
.tabbar-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 10rpx 0;
position: relative;
height: 100%;
}
.tabbar-icon {
font-size: 44rpx;
color: #CCCCCC;
margin-bottom: 8rpx;
transition: all 0.3s ease;
line-height: 1;
}
.tabbar-text {
font-size: 22rpx;
color: #CCCCCC;
font-weight: 400;
transition: all 0.3s ease;
line-height: 1.2;
}
/* 激活状态 */
.tabbar-item.active .tabbar-icon {
color: #FF6B00;
transform: scale(1.1);
}
.tabbar-item.active .tabbar-text {
color: #FF6B00;
font-weight: 500;
}
/* 首页头部骨架屏样式 */
.location-box-skeleton {
display: flex;
align-items: center;
margin-bottom: 28rpx;
}
.skeleton-location-icon {
width: 28rpx;
height: 28rpx;
border-radius: 4rpx;
background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 25%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3) 75%);
background-size: 200% 100%;
animation: loading-white 1.5s ease-in-out infinite;
margin-right: 8rpx;
}
.skeleton-location-text {
width: 200rpx;
height: 28rpx;
border-radius: 4rpx;
background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 25%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3) 75%);
background-size: 200% 100%;
animation: loading-white 1.5s ease-in-out infinite;
margin-right: 8rpx;
}
.skeleton-arrow-icon {
width: 24rpx;
height: 24rpx;
border-radius: 4rpx;
background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 25%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3) 75%);
background-size: 200% 100%;
animation: loading-white 1.5s ease-in-out infinite;
}
.search-box-skeleton {
width: 100%;
height: 60rpx;
border-radius: 32rpx;
background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 25%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3) 75%);
background-size: 200% 100%;
animation: loading-white 1.5s ease-in-out infinite;
}
@keyframes loading-white {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.page-loading {
min-height: 100vh;
background: #F5F5F5;
}
</style>

View File

@@ -0,0 +1,405 @@
<template>
<view class="coupon-page">
<!-- 沉浸式状态栏 -->
<view class="status-bar"></view>
<!-- 顶部导航 -->
<view class="nav-bar">
<image class="back-icon" src="/static/icons/back.svg" @click="goBack" mode="aspectFit" />
<text class="nav-title">优惠券</text>
<view class="nav-placeholder"></view>
</view>
<!-- Tab 切换 - 简约文字Tab -->
<view class="tab-bar">
<view v-for="(tab, index) in tabs" :key="index" class="tab-item" :class="{ active: currentTab === index }"
@click="switchTab(index)">
<text class="tab-text">{{ tab.label }}</text>
<text v-if="tab.count > 0" class="tab-count">({{ tab.count }})</text>
</view>
</view>
<!-- 优惠券列表 - 简约卡片 -->
<view class="coupon-list">
<view v-for="coupon in coupons" :key="coupon.id" class="coupon-card" :class="`coupon-${coupon.status}`">
<!-- 左侧金额 -->
<view class="coupon-left">
<view v-if="coupon.code === 'discount'" class="coupon-amount">
<text class="amount-number">{{ coupon.deductMoney }}</text>
<text class="amount-unit">折</text>
</view>
<view v-else-if="coupon.code === 'reduction'" class="coupon-amount">
<text class="amount-symbol">¥</text>
<text class="amount-number">{{ coupon.deductMoney }}</text>
</view>
<view v-else class="coupon-amount">
<text class="amount-gift">礼品</text>
</view>
</view>
<!-- 分割线 -->
<view class="coupon-divider">
<view class="divider-circle top"></view>
<view class="divider-line"></view>
<view class="divider-circle bottom"></view>
</view>
<!-- 右侧信息 -->
<view class="coupon-right">
<view class="coupon-title">{{ coupon.title }}</view>
<view class="coupon-condition">
<text v-if="coupon.needMoney > 0">满{{ coupon.needMoney }}元可用</text>
<text v-else>无门槛</text>
</view>
<view class="coupon-expire">有效期至 {{ coupon.endTime }}</view>
<!-- 状态标识 -->
<view v-if="coupon.status === 1" class="coupon-status used">
<text>已使用</text>
</view>
<view v-else-if="coupon.status === 2" class="coupon-status expired">
<text>已过期</text>
</view>
</view>
</view>
<!-- 空状态 -->
<view v-if="coupons.length === 0" class="empty">
<text class="empty-text">{{ emptyText }}</text>
</view>
<view v-else class="empty">
<up-loadmore :status="status" />
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { onShow, onLoad, onReachBottom } from "@dcloudio/uni-app";
import { Service } from "@/Service/Service"
import { ref, computed } from "vue";
import { vpDiscountService } from "@/Service/vp/vpDiscountService"
let coupons = ref<Array<any>>([])
let status = ref<string>('loadmore')
let pageNo = ref<number>(1)
// 数据
const currentTab = ref(0)
const tabs = ref([
{ label: '未使用', value: 'unused', count: 0 },
{ label: '已使用', value: 'used', count: 0 },
{ label: '已过期', value: 'expired', count: 0 }
])
// 空状态文本
const emptyText = computed(() => {
const textMap = ['暂无可用优惠券', '暂无已使用的优惠券', '暂无已过期的优惠券']
return textMap[currentTab.value]
})
onShow(() => {
getData()
})
onReachBottom(() => {
getList()
});
const getData = () => {
coupons.value = []
status.value = 'loadmore'
pageNo.value = 1
getList()
}
const getList = () => {
if (status.value == 'nomore' || status.value == 'loading') {
return
}
status.value = 'loading'
vpDiscountService.GetUserDiscountList(currentTab.value, pageNo.value).then(res => {
if (res.code == 0) {
coupons.value = [...coupons.value, ...res.data.list]
status.value = 10 == res.data.list.length ? 'loadmore' : 'nomore'
pageNo.value++
} else {
Service.Msg(res.msg)
}
})
}
// 切换Tab
const switchTab = (index : number) => {
currentTab.value = index
getData()
}
// 返回我的页面
const goBack = () => {
Service.GoPageBack()
}
</script>
<style lang="scss" scoped>
.coupon-page {
min-height: 100vh;
background-color: #F5F5F5;
}
/* 状态栏 */
.status-bar {
background: linear-gradient(135deg, #FF6B00, #FF9500);
height: var(--status-bar-height);
width: 100%;
}
/* 导航栏 */
.nav-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 60rpx 24rpx 20rpx 24rpx;
background: linear-gradient(135deg, #FF6B00, #FF9500);
}
.back-icon {
width: 48rpx;
height: 48rpx;
padding: 8rpx;
}
.nav-title {
font-size: 36rpx;
font-weight: 600;
color: #FFFFFF;
}
.nav-placeholder {
width: 48rpx;
}
/* Tab栏 - 简约文字Tab */
.tab-bar {
display: flex;
background: #FFFFFF;
padding: 20rpx 20rpx 0;
border-bottom: 1rpx solid #E5E5E5;
}
.tab-item {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding-bottom: 20rpx;
position: relative;
}
.tab-item.active .tab-text {
color: #222;
font-weight: 600;
}
.tab-item.active::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 32rpx;
height: 4rpx;
background: #FF6B00;
border-radius: 2rpx;
}
.tab-text {
font-size: 28rpx;
color: #666;
}
.tab-count {
font-size: 24rpx;
color: inherit;
margin-left: 4rpx;
}
/* 优惠券列表 */
.coupon-list {
padding: 20rpx;
}
.coupon-card {
background: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
display: flex;
overflow: hidden;
}
/* 未使用 - 橙色边框 */
.coupon-unused {
border: 2rpx solid #FF6B00;
}
/* 已使用 - 灰色 */
.coupon-used {
opacity: 0.5;
}
/* 已过期 - 灰色 */
.coupon-expired {
opacity: 0.5;
}
/* 左侧金额区 */
.coupon-left {
flex-shrink: 0;
width: 200rpx;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #FFF4E6, #FFE0B2);
padding: 32rpx 20rpx;
}
.coupon-amount {
display: flex;
align-items: baseline;
}
.amount-symbol {
font-size: 28rpx;
font-weight: 600;
color: #FF6B00;
}
.amount-number {
font-size: 56rpx;
font-weight: 600;
color: #FF6B00;
line-height: 1;
}
.amount-unit {
font-size: 24rpx;
font-weight: 500;
color: #FF6B00;
margin-left: 4rpx;
}
.amount-gift {
font-size: 28rpx;
font-weight: 600;
color: #FF6B00;
}
/* 分割线 */
.coupon-divider {
position: relative;
width: 4rpx;
background: #F5F5F5;
}
.divider-circle {
position: absolute;
width: 20rpx;
height: 20rpx;
background: #F5F5F5;
border-radius: 50%;
left: 50%;
transform: translateX(-50%);
}
.divider-circle.top {
top: -10rpx;
}
.divider-circle.bottom {
bottom: -10rpx;
}
.divider-line {
position: absolute;
top: 10rpx;
bottom: 10rpx;
left: 50%;
width: 2rpx;
background: repeating-linear-gradient(to bottom,
#F5F5F5 0rpx,
#F5F5F5 6rpx,
transparent 6rpx,
transparent 12rpx);
transform: translateX(-50%);
}
/* 右侧信息 */
.coupon-right {
flex: 1;
padding: 24rpx 20rpx;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.coupon-title {
font-size: 30rpx;
font-weight: 600;
color: #222;
margin-bottom: 12rpx;
}
.coupon-condition {
font-size: 22rpx;
color: #999;
margin-bottom: 8rpx;
}
.coupon-expire {
font-size: 22rpx;
color: #999;
}
/* 状态标识 */
.coupon-status {
position: absolute;
top: 50%;
right: 20rpx;
transform: translateY(-50%);
}
.coupon-status text {
font-size: 24rpx;
font-weight: 600;
}
.coupon-status.used text {
color: #999;
}
.coupon-status.expired text {
color: #999;
}
/* 空状态 */
.empty {
display: flex;
align-items: center;
justify-content: center;
padding: 120rpx 0;
}
.empty-text {
font-size: 26rpx;
color: #999;
}
</style>