feat: 优化消息互动中心与首页Banner呈现,同步全量业务数据与高清图标

这个提交包含在:
2026-10-24 11:39:44 +08:00
父节点 0f84426c33
当前提交 d18b597010
共有 109 个文件被更改,包括 3385 次插入 和 526 次删除

查看文件

@@ -53,8 +53,10 @@ view,
text,
scroll-view,
swiper,
image {
image,
button {
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
/* 通用容器 */
@@ -129,6 +131,7 @@ image {
}
.fc-safe-bottom {
height: constant(safe-area-inset-bottom);
height: env(safe-area-inset-bottom);
}

查看文件

@@ -5,12 +5,46 @@
import { get, post } from '../utils/request.js'
export const messageApi = {
/** 消息列表(type: system / interact) */
/**
* 消息列表
* @param {Object} params { type?: string, page?: number, size?: number }
* @returns {Promise<Object>} 分页列表数据
*/
list: (params = {}) => get('/message/list', params, { silent: true }),
/** 未读消息数(首页角标) → { count } */
/**
* 未读消息数(首页角标)
* @returns {Promise<Object>} { count: number }
*/
unreadCount: () => get('/message/unread-count', {}, { silent: true }),
/** 标记已读 */
/**
* 标记单条已读
* @param {number|string} id 消息ID
* @returns {Promise<Object>} { read: boolean }
*/
read: (id) => post(`/message/${id}/read`, {}, { silent: true }),
/**
* 一键全部已读
* @param {Object} params { type?: string }
* @returns {Promise<Object>} { success: boolean, affected: number }
*/
readAll: (params = {}) => post('/message/read-all', params),
/**
* 一键清理消息
* @param {Object} params { type?: string }
* @returns {Promise<Object>} { success: boolean, affected: number }
*/
clear: (params = {}) => post('/message/clear', params),
/**
* 删除单条消息
* @param {number|string} id 消息ID
* @returns {Promise<Object>} { success: boolean }
*/
delete: (id) => post(`/message/${id}/delete`, {}),
}
export default messageApi

查看文件

@@ -14,9 +14,9 @@ export const BANNER_ART = ['banner-art-1.png', 'banner-art-2.png', 'banner-art-3
/** 内置生态绿渐变(1/2/3 号,取自 uni.scss 主色家族),后台未配置颜色时按位置取用 */
export const BANNER_BG = [
'linear-gradient(105deg, #00e070 0%, #00c860 42%, #046b3b 100%)',
'linear-gradient(105deg, #00d96c 0%, #00b85c 40%, #023a21 100%)',
'linear-gradient(105deg, #00e878 0%, #049e52 45%, #045c34 100%)',
'linear-gradient(105deg, #00d26a 0%, #10b981 50%, #34d399 100%)',
'linear-gradient(105deg, #10b981 0%, #34d399 50%, #6ee7b7 100%)',
'linear-gradient(105deg, #059669 0%, #10b981 50%, #34d399 100%)',
]
/**

查看文件

@@ -24,9 +24,9 @@ export const datasets = {
/** 首页轮播广告位(color 为生态绿家族渐变,image 为空时前端用「绿底 + 白色插画」内置配图) */
banners: [
{ id: 1, title: '同城好物节 · 二手直降', image: '', link: '/pages/category/channel?categoryId=3', color: 'linear-gradient(105deg, #00e070 0%, #00c860 42%, #046b3b 100%)' },
{ id: 2, title: '招聘旺季 · 免费发布', image: '', link: '/pages/post/create', color: 'linear-gradient(105deg, #00d96c 0%, #00b85c 40%, #023a21 100%)' },
{ id: 3, title: '本地服务 · 上门更省心', image: '', link: '/pages/category/channel?categoryId=5', color: 'linear-gradient(105deg, #00e878 0%, #049e52 45%, #045c34 100%)' },
{ id: 1, title: '同城好物节 · 二手直降', image: '/static/banners/banner-1.png', link: '/pages/category/channel?categoryId=3', color: 'linear-gradient(105deg, #10b981 0%, #34d399 50%, #a7f3d0 100%)' },
{ id: 2, title: '招聘旺季 · 免费发布', image: '/static/banners/banner-2.png', link: '/pages/post/create', color: 'linear-gradient(105deg, #059669 0%, #10b981 50%, #6ee7b7 100%)' },
{ id: 3, title: '本地服务 · 上门更省心', image: '/static/banners/banner-3.png', link: '/pages/category/channel?categoryId=5', color: 'linear-gradient(105deg, #00d26a 0%, #34d399 50%, #bbf7d0 100%)' },
],
/** 分类导航 */

查看文件

@@ -77,10 +77,9 @@ export default {
syncStatusBarStyle() {
try {
if (typeof uni !== 'undefined' && uni.setNavigationBarColor) {
const isLightBg = this.theme === 'white' || this.theme === 'transparent'
uni.setNavigationBarColor({
frontColor: isLightBg ? '#000000' : '#ffffff',
backgroundColor: isLightBg ? '#ffffff' : '#04874a',
frontColor: '#000000',
backgroundColor: this.theme === 'gradient' ? '#eafbf1' : '#ffffff',
})
}
} catch (e) {}
@@ -152,10 +151,10 @@ export default {
&--gradient {
background: $fc-gradient-hero;
.fc-navbar__title-text {
color: #ffffff;
color: $fc-text;
}
.fc-navbar__back-icon {
color: #ffffff;
color: $fc-text;
}
}
&--white {

查看文件

@@ -216,9 +216,12 @@ export default {
flex-shrink: 0;
}
.fc-post-card__tag--top {
background: $fc-gradient-primary;
color: $fc-primary-ink;
background: linear-gradient(135deg, #00d26a 0%, #00bd5f 100%);
color: #ffffff;
font-weight: 700;
border-radius: 6rpx;
padding: 2rpx 10rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 210, 106, 0.35);
}
.fc-post-card__meta {
display: flex;

查看文件

@@ -5,14 +5,41 @@
v-for="(item, idx) in tabs"
:key="item.path"
class="fc-tabbar__item"
:class="{ 'fc-tabbar__item--active': current === idx, 'fc-tabbar__item--primary': item.primary }"
:class="{
'fc-tabbar__item--active': current === idx,
'fc-tabbar__item--primary': item.primary
}"
hover-class="none"
@click="switchTo(item, idx)"
>
<view class="fc-tabbar__icon" :class="{ 'fc-tabbar__icon--circle': item.primary }">
<image v-if="item.primary" class="fc-tabbar__plus" :src="iconUrl('plus-ink')" mode="aspectFit" />
<image v-else class="fc-tabbar__img" :src="iconUrl(current === idx ? item.active : item.icon)" mode="aspectFit" />
</view>
<text class="fc-tabbar__text">{{ item.text }}</text>
<!-- 中间突出加号悬浮球(发布) -->
<template v-if="item.primary">
<view class="fc-tabbar__circle-wrap">
<view class="fc-tabbar__circle-btn">
<image class="fc-tabbar__plus-icon" :src="iconUrl('plus-white')" mode="aspectFit" />
</view>
</view>
<text class="fc-tabbar__text fc-tabbar__text--primary">{{ item.text }}</text>
</template>
<!-- 普通常驻导航项 -->
<template v-else>
<view class="fc-tabbar__icon">
<image
class="fc-tabbar__img"
:src="iconUrl(current === idx ? item.active : item.icon)"
mode="aspectFit"
/>
<!-- 未读通知红点/数字徽章 -->
<view
v-if="item.badgeKey === 'message' && unreadCount > 0"
class="fc-tabbar__badge"
>
<text class="fc-tabbar__badge-text">{{ badgeText }}</text>
</view>
</view>
<text class="fc-tabbar__text">{{ item.text }}</text>
</template>
</view>
</view>
<view class="fc-safe-bottom"></view>
@@ -21,6 +48,8 @@
<script>
import { iconUrl } from '@/common/store/ui.js'
import messageApi from '@/common/api/message.js'
import { useUserStore } from '@/common/store/index.js'
export default {
name: 'FcTabbar',
@@ -34,18 +63,59 @@ export default {
},
data() {
return {
unreadCount: 0,
tabs: [
{ text: '首页', icon: 'tab-home', active: 'tab-home-on', path: '/pages/index/index' },
{ text: '分类', icon: 'tab-category', active: 'tab-category-on', path: '/pages/category/index' },
{ text: '发布', icon: 'tab-post', active: 'tab-post-on', path: '/pages/post/create', primary: true },
{ text: '通知', icon: 'tab-message', active: 'tab-message-on', path: '/pages/message/index' },
{ text: '通知', icon: 'tab-message', active: 'tab-message-on', path: '/pages/message/index', badgeKey: 'message' },
{ text: '我的', icon: 'tab-mine', active: 'tab-mine-on', path: '/pages/mine/index' },
],
}
},
computed: {
/**
* 格式化未读角标文本(超过99显示99+)
* @returns {string} 角标数字文本
*/
badgeText() {
if (this.unreadCount > 99) return '99+'
return String(this.unreadCount)
},
},
mounted() {
this.fetchUnread()
uni.$on('refreshUnreadCount', this.fetchUnread)
},
beforeDestroy() {
uni.$off('refreshUnreadCount', this.fetchUnread)
},
methods: {
/** 暴露给模板:图标地址由后台配置决定(未配置则用内置图标) */
/**
* 暴露给模板:获取对应图标的远程或本地地址
* @param {string} key 图标标识键
* @returns {string} 完整的图标 URL
*/
iconUrl,
/**
* 静默拉取当前用户未读消息总数
*/
async fetchUnread() {
let logged = false
try {
logged = !!useUserStore().isLogin.value
} catch (e) {}
if (!logged) {
this.unreadCount = 0
return
}
try {
const res = await messageApi.unreadCount()
this.unreadCount = Number((res && res.count) || 0)
} catch (e) {
this.unreadCount = 0
}
},
/**
* 切换底部导航目标页面
* @param {Object} item 目标 Tab 配置对象
@@ -54,13 +124,13 @@ export default {
switchTo(item, idx) {
if (idx === this.current) return
// 🌟 中间突出加号(发布):作为独立模态表单页推入,保留前序页面栈,支持原路返回
// 中间突出加号(发布):作为独立模态表单页推入,保留前序页面栈,支持原路返回
if (item.primary) {
uni.navigateTo({ url: item.path })
return
}
// 其余常驻 Tab 页面平滑切换:H5 环境优先 redirectTo 避免 reLaunch 导致的页面整体闪屏
// 其余常驻 Tab 页面平滑切换:H5 环境优先 redirectTo 避免 reLaunch 闪屏
// #ifdef H5
uni.redirectTo({
url: item.path,
@@ -84,70 +154,165 @@ export default {
right: 0;
bottom: 0;
z-index: 999;
background: #ffffff;
border-top: 2rpx solid $fc-border;
box-shadow: 0 -6rpx 24rpx rgba(4, 48, 30, 0.08);
background: rgba(255, 255, 255, 0.98);
-webkit-backdrop-filter: blur(20px);
backdrop-filter: blur(20px);
border-top: 1rpx solid rgba(0, 210, 106, 0.08);
box-shadow: 0 -4rpx 24rpx rgba(0, 50, 25, 0.04);
box-sizing: border-box;
-webkit-tap-highlight-color: transparent !important;
user-select: none;
}
.fc-tabbar__nav {
display: flex;
align-items: center;
justify-content: space-around;
height: 104rpx;
padding-top: 8rpx;
padding-top: 4rpx;
box-sizing: border-box;
}
.fc-tabbar__item {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: 8rpx;
cursor: pointer;
transition: transform 0.15s ease;
position: relative;
background: transparent !important;
outline: none !important;
-webkit-tap-highlight-color: transparent !important;
// 普通导航项点击时仅对图标进行柔和的弹性下压微动效,防止整格形变引起方框闪烁
&:active {
transform: scale(0.94);
.fc-tabbar__img {
transform: scale(0.88);
}
}
&--active {
.fc-tabbar__text {
color: $fc-primary-text;
color: #00A854;
font-weight: 600;
}
}
// 发布按钮项:点击时仅触发内部圆形球的物理下压弹性动效与光影收敛
&--primary {
.fc-tabbar__text {
color: $fc-primary-text;
&:active {
.fc-tabbar__circle-btn {
transform: scale(0.91) translateY(4rpx);
box-shadow: 0 4rpx 14rpx rgba(0, 210, 106, 0.42);
}
.fc-tabbar__text--primary {
opacity: 0.85;
}
}
}
}
/* 普通导航图标区 */
.fc-tabbar__icon {
height: 52rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
&--circle {
width: 82rpx;
height: 82rpx;
margin-top: -42rpx;
border-radius: 50%;
background: $fc-gradient-primary;
border: 4rpx solid #ffffff;
box-shadow: 0 8rpx 24rpx rgba(0, 224, 112, 0.45);
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
position: relative;
}
.fc-tabbar__img {
width: 44rpx;
height: 44rpx;
transition: transform 0.16s cubic-bezier(0.2, 0, 0.2, 1);
}
.fc-tabbar__plus {
width: 40rpx;
height: 40rpx;
/* 未读消息数字/红点徽章(Badge) */
.fc-tabbar__badge {
position: absolute;
top: -6rpx;
right: -16rpx;
z-index: 10;
min-width: 28rpx;
height: 28rpx;
padding: 0 8rpx;
border-radius: 14rpx;
background: linear-gradient(135deg, #FF5B5B 0%, #FF3333 100%);
border: 2rpx solid #ffffff;
box-shadow: 0 2rpx 8rpx rgba(255, 51, 51, 0.35);
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
animation: badgePop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fc-tabbar__badge-text {
font-size: 18rpx;
color: #ffffff;
font-weight: 700;
line-height: 1;
transform: scale(0.92);
}
@keyframes badgePop {
0% {
transform: scale(0.4);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
/* 导航文字 */
.fc-tabbar__text {
font-size: $fc-font-xs;
color: $fc-text-secondary;
font-size: 20rpx;
color: #64748B;
margin-top: 4rpx;
line-height: 1.2;
transition: color 0.16s ease;
&--primary {
color: #00A854;
font-weight: 600;
}
}
/* 中间突出圆形发布按钮(FAB 浮动发布球) */
.fc-tabbar__circle-wrap {
position: relative;
width: 96rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
}
.fc-tabbar__circle-btn {
position: absolute;
top: -44rpx;
width: 90rpx;
height: 90rpx;
border-radius: 50%;
background: linear-gradient(135deg, #00E070 0%, #00D26A 100%);
border: 6rpx solid #ffffff;
box-shadow: 0 10rpx 26rpx rgba(0, 210, 106, 0.35), 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
box-sizing: border-box;
pointer-events: auto;
}
.fc-tabbar__plus-icon {
width: 44rpx;
height: 44rpx;
filter: drop-shadow(0 2rpx 4rpx rgba(0, 60, 30, 0.18));
}
</style>

查看文件

@@ -225,9 +225,9 @@
}
],
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "同城分类信息",
"navigationBarBackgroundColor": "#04874a",
"navigationBarBackgroundColor": "#eafbf1",
"backgroundColor": "#f2fef7"
},
"condition": {

查看文件

@@ -252,17 +252,18 @@
</view>
</view>
<!-- 未解锁态(普通非会员):极简纯净,无多余口号标签 -->
<!-- 未解锁态:会员特权与普通付费分流,权益真实呈现 -->
<view v-else class="detail__contact-locked">
<view class="detail__locked-row">
<text class="detail__contact-key">联系电话</text>
<text class="detail__locked-mask">{{ post.phone || post.contact || '188****5042' }}</text>
</view>
<view class="detail__locked-action-bar">
<view class="detail__btn-unlock" @click="openPayModal">
<text>解锁完整内容 (¥2)</text>
<view class="detail__btn-unlock" :class="{ 'detail__btn-unlock--vip': isVipUser && freeViewLeft > 0 }" @click="handleUnlockClick">
<text>{{ unlockBtnText }}</text>
</view>
<text class="detail__vip-link" @click="goVip">开通会员免费看 ›</text>
<text v-if="!isVipUser" class="detail__vip-link" @click="goVip">开通会员免费看 ›</text>
<text v-else class="detail__vip-link detail__vip-link--member">今日剩余 {{ freeViewLeft }} 次免费</text>
</view>
</view>
</view>
@@ -328,7 +329,7 @@
<text class="detail__bar-text">海报</text>
</view>
<view class="detail__bar-main" @click="onMainAction">
<text>{{ loading && !loaded ? '加载中…' : (unlocked ? '拨打电话' : '解锁完整内容 (¥2)') }}</text>
<text>{{ bottomBarText }}</text>
</view>
</view>
@@ -343,7 +344,7 @@
<text class="detail__cashier-target-title fc-ellipsis">{{ post.title }}</text>
<view class="detail__cashier-price-row">
<text class="detail__cashier-price-symbol">¥</text>
<text class="detail__cashier-price-val">2.00</text>
<text class="detail__cashier-price-val">{{ Number(payViewPrice).toFixed(2) }}</text>
</view>
</view>
<view class="detail__cashier-methods">
@@ -382,7 +383,7 @@
<text class="detail__cashier-vip-arrow">去开通 ›</text>
</view>
<view class="detail__cashier-btn" :class="{ 'detail__cashier-btn--disabled': submitting }" @click="confirmPay">
<text>{{ submitting ? '处理中…' : '立即支付 ¥2 解锁' }}</text>
<text>{{ submitting ? '处理中…' : `立即支付 ¥${payViewPrice} 解锁` }}</text>
</view>
</view>
</view>
@@ -506,6 +507,9 @@ export default {
id: 0,
post: { publisher: {}, tags: [] },
unlocked: false,
isVipUser: false,
freeViewLeft: 0,
payViewPrice: 2,
payType: config.defaultPayType || 'wxpay',
contact: { name: '', phone: '', wechat: '' },
comments: [],
@@ -585,6 +589,34 @@ export default {
}
return this.hasLocation
},
/**
* 联系方式卡片解锁按钮文案
* @returns {string}
*/
unlockBtnText() {
if (this.isVipUser && this.freeViewLeft > 0) {
return `VIP免费解锁 (剩${this.freeViewLeft}次)`
}
if (this.isVipUser && this.freeViewLeft === 0) {
return `免费额度已用完 (¥${this.payViewPrice}解锁)`
}
return `解锁完整内容 (¥${this.payViewPrice})`
},
/**
* 底部主操作栏文案
* @returns {string}
*/
bottomBarText() {
if (this.loading && !this.loaded) return '加载中…'
if (this.unlocked) return '拨打电话'
if (this.isVipUser && this.freeViewLeft > 0) {
return `VIP免费解锁 (今日剩余${this.freeViewLeft}次)`
}
if (this.isVipUser && this.freeViewLeft === 0) {
return `今日免费已用完 · ¥${this.payViewPrice} 解锁`
}
return `解锁完整内容 (¥${this.payViewPrice})`
},
timeText() {
return fromNow(this.post.createdAt)
},
@@ -771,11 +803,16 @@ export default {
return false
},
/**
* 回显解锁数据与联系方式
* 回显解锁数据与联系方式(支持真实会员特权与商家电话下发)
* @param {Object} res 接口返回数据
*/
applyAccess(res) {
this.unlocked = !!(res && res.unlocked)
if (res) {
if (res.isMember != null) this.isVipUser = !!res.isMember
if (res.freeViewLeft != null) this.freeViewLeft = Number(res.freeViewLeft)
if (res.payViewPrice != null) this.payViewPrice = Number(res.payViewPrice)
}
this.contact = this.unlocked
? {
name: (res && (res.contactName || res.publisher?.name)) || '',
@@ -783,6 +820,38 @@ export default {
wechat: (res && res.wechat) || '',
}
: { name: '', phone: '', wechat: '' }
// 若发帖人有关联商家,解锁态下同步刷新商家实体门店电话
if (this.unlocked && res && res.merchant && res.merchant.contact && this.post.merchant) {
this.post.merchant.contact = res.merchant.contact
}
},
/**
* 点击联系方式解锁按钮(智能区分会员免密免费解锁与非会员收银台)
*/
handleUnlockClick() {
if (!this.ensureLogin()) return
if (this.isVipUser && this.freeViewLeft > 0) {
this.unlockWithVip()
} else {
this.openPayModal()
}
},
/**
* 会员每日免密免费解锁(真实扣减会员当日权益)
*/
async unlockWithVip() {
if (this.submitting) return
this.submitting = true
try {
const res = await postApi.payView(this.id, { payType: 'free' })
this.applyAccess(res)
uni.showToast({ title: '已使用会员免费权益解锁', icon: 'none' })
} catch (e) {
uni.showToast({ title: e.message || '解锁失败', icon: 'none' })
} finally {
this.submitting = false
}
},
/**
* 页面回显静默刷新解锁权限
@@ -818,6 +887,8 @@ export default {
if (this.loading && !this.loaded) return
if (this.unlocked) {
this.callPhone()
} else if (this.isVipUser && this.freeViewLeft > 0) {
this.unlockWithVip()
} else {
this.openPayModal()
}
@@ -2083,6 +2154,9 @@ export default {
color: #f5a623;
font-weight: 600;
}
.detail__vip-link--member {
color: #00a854;
}
/* 档案与编号 */
.detail__archive {

查看文件

@@ -747,14 +747,14 @@ export default {
flex-direction: column;
}
.dist__hero-title {
color: #ffffff;
color: $fc-text;
font-size: 38rpx;
font-weight: 700;
letter-spacing: 0.5rpx;
}
.dist__hero-sub {
margin-top: 10rpx;
color: rgba(255, 255, 255, 0.78);
color: $fc-text-secondary;
font-size: 24rpx;
}

查看文件

@@ -1,7 +1,7 @@
<template>
<view class="fc-page home">
<!-- 顶部:LOGO + 可手动替换定位 + 消息 + 搜索 -->
<view class="home__header">
<!-- 顶部吸顶导航栏:状态栏 + 定位切换 + 消息通知(向上滚动时常驻吸顶,与胶囊完美对齐) -->
<view class="home__nav">
<view class="home__header-status" :style="{ height: statusBarHeight + 'px' }"></view>
<view
class="home__header-bar"
@@ -10,18 +10,21 @@
minHeight: (navBarHeight || 44) + 'px',
}"
>
<image class="fc-logo fc-logo--sm" :src="logoUrl()" mode="aspectFit" />
<!-- 左上角位置:点击弹出位置手动切换面板 -->
<view class="home__location" @click="openLocationModal">
<image class="home__location-icon" :src="iconUrl('home-location')" mode="aspectFit" />
<text class="home__location-text fc-ellipsis">{{ currentCityText }}</text>
<text class="home__location-arrow">▾</text>
<text class="home__location-text fc-ellipsis" style="color: #1E293B !important; font-weight: 700;">{{ currentCityText }}</text>
<text class="home__location-arrow" style="color: #64748B !important;">▾</text>
</view>
<view class="home__msg" @click="go('/pages/message/index')">
<image class="fc-icon fc-icon--sm" :src="iconUrl('home-bell')" mode="aspectFit" />
<view v-if="unread > 0" class="home__msg-dot">{{ unread }}</view>
</view>
</view>
</view>
<!-- 首页 Hero 区域:搜索框 + 渐变底衬衔接 -->
<view class="home__header">
<view class="home__search" @click="goSearch">
<image class="fc-icon fc-icon--sm" :src="iconUrl('home-search')" mode="aspectFit" />
<text class="home__search-ph">搜索招聘、租房、二手…</text>
@@ -37,48 +40,15 @@
class="home__banner"
circular
autoplay
:interval="4000"
:interval="4500"
:duration="500"
indicator-dots
indicator-color="rgba(255,255,255,0.45)"
indicator-color="rgba(255, 255, 255, 0.45)"
indicator-active-color="#ffffff"
>
<swiper-item v-for="(b, i) in banners" :key="b.id">
<view
class="home__banner-item"
:class="{ 'home__banner-item--custom': !!b.image }"
:style="{ background: bannerBg(b, i) }"
@click="goBanner(b)"
>
<!-- 1. 后台已配置自定义海报图:全幅高清展示 -->
<image v-if="b.image" class="home__banner-photo" :src="b.image" mode="aspectFill" />
<!-- 2. 未配置图片:启用内置「春绿渐变底 + 白色徽章插画 + 精选文案」兜底卡片 -->
<template v-else>
<view class="home__banner-deco">
<view class="home__banner-glow"></view>
<view class="home__banner-vein"></view>
<view class="home__banner-hill home__banner-hill--far"></view>
<view class="home__banner-hill home__banner-hill--near"></view>
<view class="home__banner-badge">
<view class="home__banner-ring home__banner-ring--outer"></view>
<view class="home__banner-ring home__banner-ring--inner"></view>
<image class="home__banner-art" :src="bannerArtUrl(i)" mode="aspectFit" />
<view v-if="bannerHasValue(i)" class="home__banner-value">
<view class="home__banner-value-dot"></view>
<view class="home__banner-value-dot home__banner-value-dot--sm"></view>
</view>
</view>
</view>
<view class="home__banner-shade"></view>
<view class="home__banner-text">
<text class="home__banner-tag">同城精选</text>
<text class="home__banner-title">{{ b.title }}</text>
<view class="home__banner-cta">
<text class="home__banner-cta-text">立即查看 ›</text>
</view>
</view>
</template>
<swiper-item v-for="(b, i) in (banners && banners.length ? banners : defaultBanners)" :key="b.id || i">
<view class="home__banner-item" @click="goBanner(b)">
<image class="home__banner-photo home__banner-img" :src="bannerImageUrl(b, i)" mode="aspectFill" />
</view>
</swiper-item>
</swiper>
@@ -134,15 +104,6 @@
>
<text>{{ s.label }}</text>
</view>
<fc-area-picker
class="home__filter-area"
:areas="areaRows"
:value="areaId"
allow-all
variant="chip"
placeholder="全部区域"
@change="onFilterAreaChange"
/>
</view>
<!-- 列表加载体验:拟真卡片骨架屏(Shimmer 呼吸扫光) -->
@@ -293,7 +254,7 @@ import { getNavMetrics } from '@/common/utils/navbar.js'
import { groupAreaTree } from '@/common/utils/area.js'
// 本地离线快照缓存 Key(Stale-While-Revalidate,实现首屏 0ms 秒开)
const STORAGE_KEY_BANNERS = 'fc_cache_home_banners'
const STORAGE_KEY_BANNERS = 'fc_cache_home_banners_v2'
const STORAGE_KEY_CATEGORIES = 'fc_cache_home_categories'
const STORAGE_KEY_AREAS = 'fc_cache_home_areas'
const STORAGE_KEY_SELECTED_AREA = 'fc_user_selected_area'
@@ -340,6 +301,11 @@ export default {
location: savedUserArea ? (savedUserArea.city || '') : '',
unread: 0,
banners: Array.isArray(cachedBanners) ? cachedBanners : [],
defaultBanners: [
{ id: 1, title: '同城好物节', image: '/static/banners/banner-1.png', link: '/pages/category/channel?categoryId=3' },
{ id: 2, title: '同城高薪直招', image: '/static/banners/banner-2.png', link: '/pages/post/create' },
{ id: 3, title: '本地便民到家', image: '/static/banners/banner-3.png', link: '/pages/category/channel?categoryId=5' },
],
categories: Array.isArray(cachedCats) ? cachedCats : [],
list: [],
page: 1,
@@ -471,11 +437,17 @@ export default {
// 启动并行加载流水线
this.bootstrap()
uni.$on('refreshUnreadCount', () => {
this.loadUnread()
})
},
onShow() {
loadUiConfig(true)
this.loadUnread()
},
onUnload() {
uni.$off('refreshUnreadCount')
},
onShareAppMessage() {
return {
title: uiState.shareTitle || uiState.siteName || '同城分类信息',
@@ -506,6 +478,22 @@ export default {
bannerArtUrl,
bannerHasValue,
bannerBg,
/**
* 轮播图图片地址解析(优先取后台配置的 image,缺省回退到本地规范占位图)
* @param {Object} b 轮播数据对象
* @param {number} i 索引
*/
bannerImageUrl(b, i) {
if (b && b.image && typeof b.image === 'string' && b.image.trim()) {
const img = b.image.trim()
if (img.startsWith('http://') || img.startsWith('https://')) return img
if (img.startsWith('/static/')) return img
if (img.startsWith('/uploads/')) return img
return img
}
const idx = (Math.abs(i) % 3) + 1
return `/static/banners/banner-${idx}.png`
},
/**
* 获取分类图标地址
* @param {Object} c 分类对象
@@ -997,10 +985,19 @@ export default {
</script>
<style lang="scss" scoped>
/* 首页生态深绿 Hero 顶栏 */
/* 首页吸顶导航栏(状态栏 + 定位/消息胶囊栏向上滚动时固定) */
.home__nav {
position: sticky;
top: 0;
z-index: 100;
width: 100%;
background: #d6f7e5;
background: linear-gradient(180deg, #d6f7e5 0%, #dcf8e8 100%);
box-shadow: 0 4rpx 16rpx rgba(0, 168, 84, 0.05);
}
.home__header {
background: $fc-gradient-hero;
padding-bottom: 70rpx;
padding: 8rpx 0 70rpx;
}
.home__header-bar {
display: flex;
@@ -1012,10 +1009,11 @@ export default {
.home__location {
display: inline-flex;
align-items: center;
height: 54rpx;
height: 56rpx;
padding: 0 18rpx 0 14rpx;
background: rgba(255, 255, 255, 0.22);
border: 1rpx solid rgba(255, 255, 255, 0.4);
background: #ffffff;
border: 1rpx solid rgba(0, 168, 84, 0.18);
box-shadow: 0 2rpx 8rpx rgba(0, 168, 84, 0.08);
border-radius: 999rpx;
cursor: pointer;
transition: all 0.2s ease;
@@ -1023,7 +1021,7 @@ export default {
&:active {
opacity: 0.82;
transform: scale(0.97);
background: rgba(255, 255, 255, 0.32);
background: #f8fafc;
}
}
.home__location-icon {
@@ -1034,13 +1032,13 @@ export default {
}
.home__location-text {
font-size: 26rpx;
color: #ffffff;
font-weight: 600;
color: #1e293b !important; /* 彻底告别白字,高对比现代炭黑 */
font-weight: 700;
max-width: 210rpx;
}
.home__location-arrow {
font-size: 20rpx;
color: rgba(255, 255, 255, 0.9);
color: #64748b !important; /* 中性现代灰 */
margin-left: 6rpx;
}
.home__search {
@@ -1083,180 +1081,43 @@ export default {
justify-content: center;
}
/* 轮播广告位 */
/* 规范化纯图片轮播卡片(702×280rpx) */
.home__banner {
height: 300rpx;
width: 702rpx;
height: 280rpx;
margin: -50rpx 24rpx 0;
border-radius: $fc-radius-lg;
border-radius: 24rpx;
overflow: hidden;
box-shadow: $fc-shadow-lg;
box-shadow: 0 8rpx 24rpx rgba(0, 168, 84, 0.08);
background: #eafbf1;
}
.home__banner--skeleton {
width: 702rpx;
height: 280rpx;
margin: -50rpx 24rpx 0;
background: #ffffff;
padding: 16rpx;
border-radius: 24rpx;
padding: 12rpx;
}
.home__banner-sk-content {
width: 100%;
height: 100%;
border-radius: 20rpx;
border-radius: 18rpx;
}
.home__banner-item {
position: relative;
width: 100%;
height: 100%;
border-radius: 24rpx;
overflow: hidden;
padding: 26rpx 0 26rpx 32rpx;
display: flex;
flex-direction: column;
justify-content: center;
cursor: pointer;
}
.home__banner-item--custom {
padding: 0;
}
.home__banner-photo {
position: absolute;
left: 0;
top: 0;
.home__banner-photo,
.home__banner-img {
width: 100%;
height: 100%;
}
.home__banner-deco {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.home__banner-glow {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: radial-gradient(circle at 80% 44%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 46%, rgba(255, 255, 255, 0) 72%);
}
.home__banner-vein {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1rpx, rgba(255, 255, 255, 0) 1rpx, rgba(255, 255, 255, 0) 54rpx);
}
.home__banner-hill {
position: absolute;
border-radius: 50%;
}
.home__banner-hill--far {
left: -26%;
width: 152%;
top: 194rpx;
height: 260rpx;
background: rgba(4, 48, 42, 0.22);
}
.home__banner-hill--near {
left: -14%;
width: 128%;
top: 236rpx;
height: 240rpx;
background: rgba(4, 48, 42, 0.26);
}
.home__banner-badge {
position: absolute;
right: 14rpx;
top: 50%;
width: 220rpx;
height: 220rpx;
margin-top: -110rpx;
display: flex;
align-items: center;
justify-content: center;
}
.home__banner-ring {
position: absolute;
left: 50%;
top: 50%;
border-radius: 50%;
}
.home__banner-ring--outer {
width: 218rpx;
height: 218rpx;
margin: -109rpx 0 0 -109rpx;
border: 2rpx solid rgba(255, 255, 255, 0.14);
}
.home__banner-ring--inner {
width: 164rpx;
height: 164rpx;
margin: -82rpx 0 0 -82rpx;
border: 2rpx dotted rgba(255, 255, 255, 0.26);
}
.home__banner-art {
width: 116rpx;
height: 116rpx;
}
.home__banner-value {
position: absolute;
right: 10rpx;
top: 30rpx;
display: flex;
align-items: center;
}
.home__banner-value-dot {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background: $fc-accent-light;
box-shadow: 0 0 16rpx rgba(245, 166, 35, 0.7);
}
.home__banner-value-dot--sm {
width: 10rpx;
height: 10rpx;
margin-left: 12rpx;
background: $fc-accent;
box-shadow: none;
}
.home__banner-shade {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.1) 44%, rgba(255, 255, 255, 0) 70%);
}
.home__banner-text {
position: relative;
width: 62%;
display: flex;
flex-direction: column;
align-items: flex-start;
}
.home__banner-tag {
padding: 4rpx 16rpx;
border-radius: $fc-radius-pill;
background: rgba(255, 255, 255, 0.72);
border: 2rpx solid rgba(255, 255, 255, 0.45);
color: $fc-primary-ink;
font-size: 22rpx;
letter-spacing: 1rpx;
}
.home__banner-title {
margin-top: 14rpx;
color: $fc-primary-ink;
font-size: 34rpx;
font-weight: 700;
line-height: $fc-leading-tight;
text-shadow: 0 2rpx 10rpx rgba(255, 255, 255, 0.35);
}
.home__banner-cta {
margin-top: 16rpx;
padding: 8rpx 24rpx;
border-radius: $fc-radius-pill;
background: rgba(255, 255, 255, 0.94);
box-shadow: 0 6rpx 18rpx rgba(4, 48, 42, 0.18);
}
.home__banner-cta-text {
color: $fc-primary-text;
font-size: 24rpx;
font-weight: 600;
display: block;
border-radius: 24rpx;
}
/* 分类金刚区 */

查看文件

@@ -512,13 +512,13 @@ export default {
.coupon-page__tab-text {
font-size: 32rpx;
font-weight: 500;
color: rgba(255, 255, 255, 0.75);
color: $fc-text-secondary;
transition: all 0.2s ease;
}
.coupon-page__tab-item--active .coupon-page__tab-text {
font-size: 34rpx;
font-weight: 700;
color: #ffffff;
color: $fc-primary-text;
}
.coupon-page__tab-badge {
margin-left: 8rpx;

查看文件

@@ -79,14 +79,16 @@
</view>
<view class="vip__privileges-grid">
<!-- 特权 1:每日免费看 -->
<!-- 特权 1:每日免费看(真实呈现已用与剩余) -->
<view class="vip__priv-item">
<view class="vip__priv-icon-wrap vip__priv-icon-wrap--green">
<image class="vip__priv-icon" :src="iconUrl('eye')" mode="aspectFit" />
</view>
<view class="vip__priv-content">
<text class="vip__priv-name">每日免费看</text>
<text class="vip__priv-desc">每日享 {{ benefits.freeView || 20 }} 条免费看</text>
<text class="vip__priv-desc">
{{ isMember ? `今日已看 ${benefits.freeViewUsed || 0} / 剩 ${benefits.freeViewLeft != null ? benefits.freeViewLeft : benefits.freeView} 次` : `每日享 ${benefits.freeView || 20} 条免费看` }}
</text>
</view>
</view>
@@ -101,14 +103,16 @@
</view>
</view>
<!-- 特权 3:赠送发布额度 -->
<!-- 特权 3:赠送发布额度(真实呈现剩余额度) -->
<view class="vip__priv-item">
<view class="vip__priv-icon-wrap vip__priv-icon-wrap--green">
<image class="vip__priv-icon" :src="iconUrl('edit')" mode="aspectFit" />
</view>
<view class="vip__priv-content">
<text class="vip__priv-name">赠送发布额度</text>
<text class="vip__priv-desc">当前套餐送 {{ selectedPlanQuota }} 条发布</text>
<text class="vip__priv-desc">
{{ isMember ? `当前剩余 ${benefits.postQuotaLeft != null ? benefits.postQuotaLeft : 0} 条额度` : `开通套餐送 ${selectedPlanQuota} 条发布` }}
</text>
</view>
</view>
@@ -740,12 +744,12 @@ export default {
}
.vip__backdrop {
background: $fc-gradient-hero;
position: absolute;
top: 0;
left: 0;
right: 0;
height: 380rpx;
background: $fc-gradient-hero;
overflow: hidden;
z-index: 0;
}

查看文件

@@ -138,18 +138,20 @@ export default {
align-items: center;
}
.recharge__hero-label {
color: rgba(255, 255, 255, 0.9);
color: $fc-text-secondary;
font-weight: 500;
font-size: $fc-font-sm;
}
.recharge__hero-num {
margin-top: 16rpx;
color: #ffffff;
color: $fc-text;
letter-spacing: -1rpx;
font-size: 72rpx;
font-weight: 700;
}
.recharge__hero-tip {
margin-top: 16rpx;
color: rgba(255, 255, 255, 0.82);
color: $fc-text-placeholder;
font-size: $fc-font-xs;
}
.recharge__title {

查看文件

@@ -1,9 +1,9 @@
<template>
<view class="msg fc-page">
<view class="msg fc-page" @touchstart="onGlobalTouch">
<!-- 规范化顶部导航:与首页、分类、我的统一沉浸式渐变顶栏 -->
<fc-navbar title="通知中心" theme="gradient" />
<!-- 分类 tab -->
<!-- 分类 Tab -->
<view class="msg__tabs">
<view
v-for="t in tabs"
@@ -17,27 +17,74 @@
</view>
</view>
<!-- 操作工具条:未读统计 + 一键已读 + 一键清理 -->
<view class="msg__toolbar">
<view class="msg__stats">
<text class="msg__stats-text">共 {{ list.length }} 条</text>
<text v-if="unreadCount > 0" class="msg__stats-sep">·</text>
<text v-if="unreadCount > 0" class="msg__stats-unread">{{ unreadCount }} 条未读</text>
</view>
<view class="msg__actions">
<view
class="msg__btn"
:class="{ 'msg__btn--disabled': unreadCount === 0 }"
@click="handleReadAll"
>
<text class="msg__btn-text">一键已读</text>
</view>
<view
class="msg__btn msg__btn--clear"
:class="{ 'msg__btn--disabled': !list.length }"
@click="handleClearAll"
>
<text class="msg__btn-text">一键清理</text>
</view>
</view>
</view>
<!-- 空数据提示 -->
<fc-empty v-if="!loading && !list.length" icon="inbox" text="暂无通知" />
<!-- 通知卡片列表(支持左滑显示删除按钮) -->
<view v-else class="msg__list">
<view
v-for="m in list"
v-for="(m, index) in list"
:key="m.id"
class="msg__item"
:class="{ 'msg__item--unread': !m.read }"
@click="openMsg(m)"
class="msg__swipe-box"
>
<view class="msg__icon">
<image class="fc-icon--badge-sm" :src="iconUrl(meta(m.type).iconKey)" mode="aspectFit" />
</view>
<view class="msg__body">
<view class="msg__head">
<text class="msg__title fc-ellipsis">{{ m.title }}</text>
<text class="msg__time">{{ timeText(m.createdAt) }}</text>
<!-- 底层动作区:删除按钮 -->
<view class="msg__swipe-actions">
<view class="msg__delete-btn" @click.stop="handleDelete(m, index)">
<text class="msg__delete-text">删除</text>
</view>
<text class="msg__content fc-ellipsis-2">{{ m.content }}</text>
</view>
<view v-if="!m.read" class="msg__dot"></view>
<!-- 表层滑动内容卡片 -->
<view
class="msg__swipe-content"
:class="{
'msg__swipe-content--unread': !m.read,
'msg__swipe-content--no-transition': m.isSwiping
}"
:style="{ transform: 'translateX(' + (m.offset || 0) + 'px)' }"
@touchstart="onTouchStart($event, m)"
@touchmove="onTouchMove($event, m)"
@touchend="onTouchEnd($event, m)"
@touchcancel="onTouchEnd($event, m)"
@click="handleCardClick(m)"
>
<view class="msg__icon">
<image class="fc-icon--badge-sm" :src="iconUrl(meta(m.type).iconKey)" mode="aspectFit" />
</view>
<view class="msg__body">
<view class="msg__head">
<text class="msg__title fc-ellipsis">{{ m.title }}</text>
<text class="msg__time">{{ timeText(m.createdAt) }}</text>
</view>
<text class="msg__content fc-ellipsis-2">{{ m.content }}</text>
</view>
<view v-if="!m.read" class="msg__dot"></view>
</view>
</view>
</view>
@@ -67,11 +114,42 @@ export default {
{ label: '系统通知', value: 'system' },
{ label: '互动提醒', value: 'interact' },
],
// 手势滑动追踪状态
touchState: {
startX: 0,
startY: 0,
startTime: 0,
direction: '',
initOffset: 0,
activeId: null,
},
}
},
computed: {
/**
* 计算当前列表中的未读通知总数
* @returns {number} 未读数量
*/
unreadCount() {
return this.list.filter(m => !m.read).length
},
/**
* 当前选中的分类名称
* @returns {string} 分类标签名
*/
currentTabLabel() {
const found = this.tabs.find(t => t.value === this.type)
return found ? found.label : '通知'
},
},
onLoad() {
this.fetch()
},
onPullDownRefresh() {
this.fetch().finally(() => {
uni.stopPullDownRefresh()
})
},
methods: {
/** 暴露给模板:获取图标完整地址 */
iconUrl,
@@ -91,14 +169,36 @@ export default {
timeText(t) {
return fromNow(t)
},
/**
* 获取左滑操作区最大展开宽度(px)
* @returns {number} 展开距离,设计稿 140rpx 转真实 px
*/
getMaxSwipePx() {
try {
return uni.upx2px(140)
} catch (e) {
return 70
}
},
/**
* 全局触摸事件:当点击其它位置时关闭所有已滑开的卡片
*/
onGlobalTouch() {
// 若有滑开的卡片且当前非手势拖拽中,不做强制重置,由具体区域判定收起
},
/**
* 拉取当前类型的通知列表
*/
async fetch() {
this.loading = true
try {
const res = await messageApi.list({ type: this.type, page: 1, size: 20 })
this.list = res.list || []
const res = await messageApi.list({ type: this.type, page: 1, size: 50 })
const rows = res.list || []
this.list = rows.map(item => ({
...item,
offset: 0,
isSwiping: false,
}))
} catch (e) {
uni.showToast({ title: '通知加载失败', icon: 'none' })
} finally {
@@ -111,9 +211,231 @@ export default {
*/
changeType(v) {
if (this.type === v) return
this.closeAllSwipe()
this.type = v
this.fetch()
},
/**
* 收起所有已滑开的卡片
* @param {number|null} excludeId 排除收起的消息ID(可选)
*/
closeAllSwipe(excludeId = null) {
this.list.forEach(item => {
if (item.id !== excludeId && item.offset !== 0) {
this.$set(item, 'offset', 0)
this.$set(item, 'isSwiping', false)
}
})
},
/**
* 一键标记全部已读
*/
async handleReadAll() {
if (this.unreadCount === 0) {
uni.showToast({ title: '暂无未读通知', icon: 'none' })
return
}
this.closeAllSwipe()
uni.showLoading({ title: '处理中...', mask: true })
try {
await messageApi.readAll({ type: this.type })
this.list.forEach(m => {
m.read = true
})
uni.$emit('refreshUnreadCount')
uni.showToast({ title: '已全部标为已读', icon: 'success' })
} catch (e) {
uni.showToast({ title: '操作失败', icon: 'none' })
} finally {
uni.hideLoading()
}
},
/**
* 一键清理当前分类通知
*/
handleClearAll() {
if (!this.list.length) {
uni.showToast({ title: '暂无可清理通知', icon: 'none' })
return
}
this.closeAllSwipe()
uni.showModal({
title: '一键清理',
content: `确定清空当前${this.currentTabLabel}的全部通知记录吗?`,
confirmText: '清空',
confirmColor: '#FF4D4F',
cancelText: '取消',
success: async (res) => {
if (!res.confirm) return
uni.showLoading({ title: '清理中...', mask: true })
try {
await messageApi.clear({ type: this.type })
this.list = []
uni.$emit('refreshUnreadCount')
uni.showToast({ title: '已清空通知', icon: 'success' })
} catch (e) {
uni.showToast({ title: '清理失败', icon: 'none' })
} finally {
uni.hideLoading()
}
},
})
},
/**
* 卡片触摸开始手势
* @param {TouchEvent} e 触摸事件对象
* @param {Object} m 当前触摸的通知对象
*/
onTouchStart(e, m) {
if (!e.touches || !e.touches[0]) return
const touch = e.touches[0]
this.touchState = {
startX: touch.clientX,
startY: touch.clientY,
startTime: Date.now(),
direction: '',
initOffset: m.offset || 0,
activeId: m.id,
}
},
/**
* 卡片触摸滑动中手势
* @param {TouchEvent} e 触摸事件对象
* @param {Object} m 当前触摸的通知对象
*/
onTouchMove(e, m) {
if (!this.touchState.activeId || this.touchState.activeId !== m.id) return
if (!e.touches || !e.touches[0]) return
const touch = e.touches[0]
const deltaX = touch.clientX - this.touchState.startX
const deltaY = touch.clientY - this.touchState.startY
// 滑动方向判定锁:避免干扰页面垂直滚动
if (!this.touchState.direction) {
if (Math.abs(deltaX) > 6 || Math.abs(deltaY) > 6) {
if (Math.abs(deltaX) >= Math.abs(deltaY)) {
this.touchState.direction = 'horizontal'
// 确定为横向滑动时,收起其他已滑开的卡片
this.closeAllSwipe(m.id)
} else {
this.touchState.direction = 'vertical'
}
}
}
// 纵向滚动不阻拦、不处理位移
if (this.touchState.direction !== 'horizontal') return
// 标记当前处于手势拖拽中,关闭 CSS 动效以达到 60fps 灵敏跟手
if (!m.isSwiping) {
this.$set(m, 'isSwiping', true)
}
const maxSwipePx = this.getMaxSwipePx()
let targetOffset = this.touchState.initOffset + deltaX
// 边界限制:不能向右拉出卡片(最大为 0)
if (targetOffset > 0) {
targetOffset = 0
}
// 向左滑动超出最大展开宽度时加阻尼效果
if (targetOffset < -maxSwipePx) {
const overstep = -maxSwipePx - targetOffset
targetOffset = -maxSwipePx - overstep * 0.2
}
this.$set(m, 'offset', targetOffset)
},
/**
* 卡片触摸结束手势
* @param {TouchEvent} e 触摸事件对象
* @param {Object} m 当前触摸的通知对象
*/
onTouchEnd(e, m) {
if (!this.touchState.activeId || this.touchState.activeId !== m.id) return
this.$set(m, 'isSwiping', false)
const currentOffset = m.offset || 0
const maxSwipePx = this.getMaxSwipePx()
const moveTime = Date.now() - this.touchState.startTime
const movedX = currentOffset - this.touchState.initOffset
// 判定是否展开:
// 1. 快速轻扫手势(时间短且位移达到一定幅度)
// 2. 释放位置超过一半阈值
let shouldOpen = false
if (moveTime < 280 && movedX < -25) {
shouldOpen = true
} else if (moveTime < 280 && movedX > 25) {
shouldOpen = false
} else if (currentOffset <= -maxSwipePx / 2) {
shouldOpen = true
}
if (shouldOpen) {
this.$set(m, 'offset', -maxSwipePx)
} else {
this.$set(m, 'offset', 0)
}
this.touchState.activeId = null
this.touchState.direction = ''
},
/**
* 卡片点击事件:包含已滑开卡片的安全收起判断与详情查看
* @param {Object} m 当前点击的通知对象
*/
handleCardClick(m) {
// 若当前卡片处于滑开状态,则先收起卡片,不触发打开详情
if (m.offset && m.offset < 0) {
this.$set(m, 'offset', 0)
return
}
// 若存在其他卡片处于滑开状态,收起其他卡片并拦截点击
let hasOtherOpen = false
this.list.forEach(item => {
if (item.offset && item.offset < 0) {
this.$set(item, 'offset', 0)
hasOtherOpen = true
}
})
if (hasOtherOpen) return
// 正常打开通知详情
this.openMsg(m)
},
/**
* 删除单条通知
* @param {Object} m 待删除的通知对象
* @param {number} index 当前项在列表中的索引
*/
handleDelete(m, index) {
uni.showModal({
title: '删除通知',
content: '确定要删除此条通知吗?',
confirmText: '删除',
confirmColor: '#FF4D4F',
cancelText: '取消',
success: async (res) => {
if (!res.confirm) {
// 取消则收起滑开的卡片
this.$set(m, 'offset', 0)
return
}
uni.showLoading({ title: '删除中...', mask: true })
try {
await messageApi.delete(m.id)
this.list.splice(index, 1)
uni.$emit('refreshUnreadCount')
uni.showToast({ title: '已删除', icon: 'success' })
} catch (e) {
uni.showToast({ title: '删除失败', icon: 'none' })
} finally {
uni.hideLoading()
}
},
})
},
/**
* 点击查看通知详情并标记已读
* @param {Object} m 通知项对象
@@ -123,6 +445,7 @@ export default {
m.read = true
try {
await messageApi.read(m.id)
uni.$emit('refreshUnreadCount')
} catch (e) {}
}
uni.showModal({
@@ -130,7 +453,7 @@ export default {
content: m.content || '',
showCancel: false,
confirmText: '我知道了',
confirmColor: '#04874a',
confirmColor: '#00A854',
})
},
},
@@ -138,12 +461,18 @@ export default {
</script>
<style lang="scss" scoped>
.msg {
min-height: 100vh;
background: #F2FEF7;
}
/* 分类 Tab */
.msg__tabs {
display: flex;
background: #ffffff;
padding: 0 32rpx;
border-bottom: 2rpx solid $fc-border;
box-shadow: $fc-shadow-sm;
border-bottom: 1rpx solid rgba(0, 210, 106, 0.08);
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.02);
position: sticky;
top: 0;
z-index: 10;
@@ -155,8 +484,8 @@ export default {
flex-direction: column;
align-items: center;
justify-content: center;
font-size: $fc-font;
color: $fc-text-secondary;
font-size: 30rpx;
color: #64748B;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
@@ -173,28 +502,139 @@ export default {
border-radius: 4rpx;
background: $fc-gradient-primary;
}
.msg__list {
padding: 20rpx 0;
/* 顶部操作工具条 */
.msg__toolbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 28rpx 12rpx;
}
.msg__item {
.msg__stats {
display: flex;
align-items: center;
font-size: 24rpx;
color: #64748B;
}
.msg__stats-sep {
margin: 0 8rpx;
opacity: 0.6;
}
.msg__stats-unread {
color: $fc-primary-text;
font-weight: 600;
}
.msg__actions {
display: flex;
align-items: center;
}
.msg__btn {
padding: 8rpx 22rpx;
margin-left: 14rpx;
border-radius: 26rpx;
background: #ffffff;
border: 1rpx solid rgba(0, 210, 106, 0.3);
box-shadow: 0 2rpx 8rpx rgba(0, 210, 106, 0.06);
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
&:active {
transform: scale(0.96);
background: #E6F9F0;
}
&--disabled {
opacity: 0.45;
pointer-events: none;
}
&--clear {
border-color: rgba(100, 116, 139, 0.2);
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.02);
.msg__btn-text {
color: #64748B;
}
&:active {
background: #F1F5F9;
}
}
}
.msg__btn-text {
font-size: 24rpx;
font-weight: 500;
color: $fc-primary-text;
}
/* 消息列表 */
.msg__list {
padding: 10rpx 0 20rpx;
}
/* 左滑卡片外层容器 */
.msg__swipe-box {
position: relative;
margin: 0 24rpx 20rpx;
padding: 24rpx;
background: #ffffff;
border-radius: $fc-radius-lg;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 4rpx 16rpx rgba(0, 80, 40, 0.04);
}
/* 底层操作区:删除按钮 */
.msg__swipe-actions {
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 140rpx;
background: linear-gradient(135deg, #FF6262, #FF3D3D);
z-index: 1;
display: flex;
box-shadow: $fc-shadow-sm;
border: 1rpx solid rgba(4, 48, 30, 0.05);
align-items: center;
justify-content: center;
}
.msg__delete-btn {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
&:active {
transform: scale(0.985);
}
&--unread {
background: #f7fffb;
border-left: 6rpx solid $fc-primary;
opacity: 0.88;
}
}
.msg__delete-text {
font-size: 28rpx;
font-weight: 600;
color: #ffffff;
letter-spacing: 2rpx;
}
/* 表层卡片内容 */
.msg__swipe-content {
position: relative;
z-index: 2;
width: 100%;
padding: 24rpx;
box-sizing: border-box;
background: #ffffff;
border-radius: 20rpx;
border: 1rpx solid rgba(4, 48, 30, 0.05);
display: flex;
align-items: flex-start;
cursor: pointer;
transition: transform 0.22s cubic-bezier(0.25, 1, 0.5, 1);
&--no-transition {
transition: none !important;
}
&--unread {
background: #F8FFF9;
border-left: 8rpx solid $fc-primary;
}
&:active {
background-color: #FAFCFA;
}
}
.msg__icon {
width: 80rpx;
height: 80rpx;
@@ -216,19 +656,19 @@ export default {
.msg__title {
font-size: 30rpx;
font-weight: 600;
color: $fc-text;
color: #1E293B;
margin-right: 16rpx;
}
.msg__time {
font-size: 22rpx;
color: $fc-text-placeholder;
color: #94A3B8;
white-space: nowrap;
}
.msg__content {
display: block;
margin-top: 10rpx;
font-size: 26rpx;
color: $fc-text-regular;
color: #334155;
line-height: 1.5;
}
.msg__dot {
@@ -241,6 +681,7 @@ export default {
background: $fc-primary;
box-shadow: 0 0 8rpx rgba(0, 224, 112, 0.6);
}
.msg__tabbar-space {
height: 140rpx;
}

查看文件

@@ -329,6 +329,11 @@ export default {
* 页面展示生命周期
*/
onShow() {
try {
if (typeof uni !== 'undefined' && uni.setNavigationBarColor) {
uni.setNavigationBarColor({ frontColor: '#000000', backgroundColor: '#d6f7e5' })
}
} catch (e) {}
this.fetchData()
},
@@ -587,7 +592,7 @@ export default {
align-items: center;
justify-content: center;
text-align: center;
color: #ffffff;
color: $fc-text;
font-size: 34rpx;
font-weight: 700;
letter-spacing: 0.5rpx;
@@ -639,7 +644,7 @@ export default {
}
.mine__user-name {
color: #ffffff;
color: $fc-text;
font-size: 38rpx;
font-weight: 700;
max-width: 300rpx;
@@ -704,7 +709,7 @@ export default {
}
.mine__user-phone {
color: rgba(255, 255, 255, 0.88);
color: $fc-text-secondary;
font-size: 24rpx;
}
@@ -728,15 +733,16 @@ export default {
}
.mine__asset-num {
color: #ffffff;
font-size: 38rpx;
color: $fc-text;
font-size: 40rpx;
font-weight: 700;
}
.mine__asset-label {
margin-top: 8rpx;
color: rgba(255, 255, 255, 0.85);
font-size: 22rpx;
color: $fc-text-secondary;
font-size: 24rpx;
font-weight: 500;
}
/* ==================== 会员卡片 ==================== */
@@ -774,24 +780,26 @@ export default {
}
.mine__vip-title {
color: #ffffff;
color: #4a2600; /* 深褐黑金字 */
font-size: 30rpx;
font-weight: 700;
font-weight: 800;
}
.mine__vip-sub {
margin-top: 4rpx;
color: rgba(255, 255, 255, 0.92);
color: #7a4600; /* 高清晰深暖金副标题 */
font-size: 22rpx;
font-weight: 600;
}
.mine__vip-btn {
padding: 10rpx 26rpx;
border-radius: $fc-radius-pill;
background: #ffffff;
color: #8f5800;
color: #4a2600;
font-size: 24rpx;
font-weight: 700;
font-weight: 800;
box-shadow: 0 4rpx 12rpx rgba(74, 38, 0, 0.12);
}
/* ==================== 卡片容器 ==================== */
@@ -893,8 +901,8 @@ export default {
margin-right: 6rpx;
&--white {
border-top-color: rgba(255, 255, 255, 0.7);
border-right-color: rgba(255, 255, 255, 0.7);
border-top-color: $fc-text-secondary;
border-right-color: $fc-text-secondary;
}
}

查看文件

@@ -1384,7 +1384,8 @@ export default {
&--approved {
background: #f5a623;
color: #ffffff;
color: #4a2600;
font-weight: 700;
}
&--unauth {

查看文件

@@ -169,7 +169,7 @@ export default {
this.statusBarHeight = m.statusBarHeight
try {
if (typeof uni !== 'undefined' && uni.setNavigationBarColor) {
uni.setNavigationBarColor({ frontColor: '#ffffff', backgroundColor: '#04874a' })
uni.setNavigationBarColor({ frontColor: '#000000', backgroundColor: '#eafbf1' })
}
} catch (e) {}
this.capsulePadding = m.capsulePadding

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 168 KiB

之后

宽度:  |  高度:  |  大小: 40 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 170 KiB

之后

宽度:  |  高度:  |  大小: 37 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 171 KiB

之后

宽度:  |  高度:  |  大小: 35 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 2.5 KiB

之后

宽度:  |  高度:  |  大小: 5.7 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 1.6 KiB

之后

宽度:  |  高度:  |  大小: 4.3 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 2.0 KiB

之后

宽度:  |  高度:  |  大小: 4.1 KiB

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 477 KiB

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 456 KiB

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 468 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 11 KiB

之后

宽度:  |  高度:  |  大小: 9.9 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 11 KiB

之后

宽度:  |  高度:  |  大小: 10 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 9.7 KiB

之后

宽度:  |  高度:  |  大小: 9.0 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 10 KiB

之后

宽度:  |  高度:  |  大小: 9.6 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 10 KiB

之后

宽度:  |  高度:  |  大小: 9.6 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 9.8 KiB

之后

宽度:  |  高度:  |  大小: 9.2 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 9.6 KiB

之后

宽度:  |  高度:  |  大小: 9.2 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 10 KiB

之后

宽度:  |  高度:  |  大小: 9.6 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 1.3 KiB

之后

宽度:  |  高度:  |  大小: 1.2 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 1.9 KiB

之后

宽度:  |  高度:  |  大小: 1.8 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 822 B

之后

宽度:  |  高度:  |  大小: 3.0 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 2.8 KiB

之后

宽度:  |  高度:  |  大小: 2.5 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 9.1 KiB

之后

宽度:  |  高度:  |  大小: 8.6 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 837 B

之后

宽度:  |  高度:  |  大小: 3.0 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 9.2 KiB

之后

宽度:  |  高度:  |  大小: 8.7 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 11 KiB

之后

宽度:  |  高度:  |  大小: 9.7 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 8.6 KiB

之后

宽度:  |  高度:  |  大小: 8.2 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 9.8 KiB

之后

宽度:  |  高度:  |  大小: 8.7 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 10 KiB

之后

宽度:  |  高度:  |  大小: 9.6 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 10 KiB

之后

宽度:  |  高度:  |  大小: 9.5 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 9.5 KiB

之后

宽度:  |  高度:  |  大小: 9.2 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 9.7 KiB

之后

宽度:  |  高度:  |  大小: 9.1 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 3.3 KiB

之后

宽度:  |  高度:  |  大小: 2.8 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 1.1 KiB

之后

宽度:  |  高度:  |  大小: 1018 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 3.1 KiB

之后

宽度:  |  高度:  |  大小: 2.6 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 1.3 KiB

之后

宽度:  |  高度:  |  大小: 1.3 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 2.2 KiB

之后

宽度:  |  高度:  |  大小: 1.9 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 1.4 KiB

之后

宽度:  |  高度:  |  大小: 1.3 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 2.2 KiB

之后

宽度:  |  高度:  |  大小: 2.0 KiB

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 2.7 KiB

之后

宽度:  |  高度:  |  大小: 2.4 KiB

查看文件

@@ -113,8 +113,8 @@ describe('轮播配图 · 取图与主题规则', () => {
it('内置底色的 3 条渐变必须是春绿系(105deg 亮绿起点 → 深绿收尾,不含暖色)', () => {
expect(BANNER_BG.length).toBe(3)
// 起点落在品牌亮绿族(#00e070 / #00c860 / #049e52 / #04874a),收尾必须落到深绿(白字区)
const START_OK = /linear-gradient\(105deg, #(00e070|00d96c|00e878|00c860|049e52|04874a) /
const END_OK = /#(046b3b|045c34|023a21|03512e) 100%\)$/
const START_OK = /linear-gradient\(105deg, #(00e070|00d96c|00e878|00c860|049e52|04874a|00d26a|10b981|059669) /
const END_OK = /#(046b3b|045c34|023a21|03512e|34d399|6ee7b7|10b981) 100%\)$/
for (const bg of BANNER_BG) {
expect(START_OK.test(bg)).toBeTruthy()
expect(END_OK.test(bg)).toBeTruthy()
@@ -181,8 +181,8 @@ describe('春绿主题规则 · 亮绿面与白字/墨绿字', () => {
const heroFiles = [
['pages/index/index.vue', '.home__header'],
['pages/mine/index.vue', '.mine__header'],
['pages/member/index.vue', '.vip__header'],
['pages/distribution/index.vue', '.dist__header'],
['pages/member/index.vue', '.vip__backdrop'],
['pages/distribution/index.vue', '.dist__hero'],
]
for (const [file, sel] of heroFiles) {
const src = read(file)
@@ -192,14 +192,10 @@ describe('春绿主题规则 · 亮绿面与白字/墨绿字', () => {
}
})
it('轮播卡文字用墨绿字($fc-primary-ink)+ 提亮罩,白插画留右侧深绿区', () => {
it('轮播卡为规范化纯图片卡片容器(702×280rpx、aspectFill)', () => {
const src = read('pages/index/index.vue')
const title = src.slice(src.indexOf('.home__banner-title'), src.indexOf('.home__banner-title') + 220)
expect(title.indexOf('color: $fc-primary-ink;') > -1).toBeTruthy()
const shade = src.slice(src.indexOf('.home__banner-shade'), src.indexOf('.home__banner-shade') + 300)
expect(shade.indexOf('rgba(255, 255, 255, 0.22)') > -1).toBeTruthy()
expect(shade.indexOf('rgba(4, 48, 42, 0.5)') === -1).toBeTruthy()
// 三底色均为「亮绿(左)→ 深绿(右)」的 105deg,白插画落在右侧深绿端
expect(src.indexOf('.home__banner-img') > -1).toBeTruthy()
expect(src.indexOf('height: 280rpx;') > -1).toBeTruthy()
for (const bg of BANNER_BG) expect(bg.indexOf('105deg') > -1).toBeTruthy()
})
})

查看文件

@@ -75,71 +75,70 @@ $uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;
/* 主题变量 · 春绿设计系统(Spring Green Design System v4)
* ------------------------------------------------------------
* 设计立意:以设计稿亮绿「春绿 #00E070」为品牌亮色(森林绿打底、收获金点缀)。
* · 亮绿 #00E070 = 品牌色,只用于「面」:按钮底 / 徽章 / 胶囊 / 选中态 / 轮播底
* —— 面上的字一律用墨绿 #04301E(8.2:1),**不用白字**(白字压亮绿只有 1.8:1)
* · 白字只出现在 #04874A 及更深的绿面上(4.6:1 ~ 12.9:1)
* · 辅助色 = 阳光金(只留给「值得关注」的信息:会员 / 热度 / 价格)
* · 底色 = 薄荷白 #F2FEF7(干净透气,衬托绿与金,避免灰脏)
* 以下变量由 uni-app 自动注入所有 `<style lang="scss">`,无需手动 import。
* ========================================================== */
/* 品牌主色 · 春绿(Spring Green = 设计稿 #00E070) */
$fc-primary: #00e070; // 品牌亮绿(面:按钮底 / 选中态 / 徽章 / 装饰)
$fc-primary-ink: #04301e; // 亮绿面上的字(8.2:1,替代白字)
$fc-on-primary: $fc-primary-ink; // 兼容别名:亮绿面上的字(#04301E)
$fc-primary-text: #04874a; // 白底上的绿字 / 强调文字(4.6:1)
$fc-primary-light: #5cf3a6; // 主色浅(描边 / 次级强调 / 图标高光)
$fc-primary-lighter: #e4fdf0; // 主色极浅(浅底块 / 选中底)
$fc-primary-dark: #00b85c; // 主色中段(按压态 / 渐变过渡)
$fc-primary-deep: #046b3b; // 深绿面(白字 6.6:1)
$fc-primary-deeper: #023a21; // 极深绿(Hero 收尾 / 会员资产卡)
$fc-primary-soft: #a9f2ce; // 浅绿点缀(进度 / 分割 / 图示)
/* 辅助色 · 阳光金(会员 / 热度 / 价格) */
$fc-accent: #f5a623;
$fc-accent-light: #ffc25c;
$fc-accent-lighter: #fff4e0;
$fc-accent-dark: #d98a0b;
/* 渐变 */
$fc-gradient-primary: linear-gradient(135deg, #00e070 0%, #00c860 55%, #00b85c 100%);
$fc-gradient-hero: linear-gradient(150deg, #04874a 0%, #046b3b 55%, #023a21 100%);
$fc-gradient-deep: linear-gradient(150deg, #046b3b 0%, #023a21 100%);
$fc-gradient-gold: linear-gradient(135deg, #ffc25c 0%, #f5a623 55%, #d98a0b 100%);
$fc-gradient-warm: $fc-gradient-gold; // 兼容旧名:会员 / 徽章 / 价格条
$fc-gradient-soft: linear-gradient(180deg, #eafef4 0%, #f7fffb 100%);
/* 文字色(墨绿系,替代纯黑,冷感更低、更显净透) */
$fc-text: #04291c;
$fc-text-regular: #2f5a46;
$fc-text-secondary: #3f6b57;
$fc-text-sub: $fc-text-secondary;
$fc-text-placeholder: #8fb3a3;
/* 主题变量 · 轻氧薄荷浅绿设计系统(Light Mint Green System v5)
* ------------------------------------------------------------
* 设计立意:响应客户「绿色太深」反馈,全面升级为轻氧浅绿风格:
* · 顶部渐变:从原本沉重压抑的墨绿(#023A21),升级为透亮清新的浅薄荷绿渐变(#D6F7E5 ~ #F2FEF7)
* · 品牌主色:清透生机的鲜活浅翠绿 #00D26A / #00E070
* · 强调绿字:清爽翡翠绿 #00A854,告别发暗发沉
* · 文本体系:中性现代高级灰(#1E293B / #334155 / #64748B),彻底消除全屏文字泛绿暗黑感
* · 页面底色:极净薄荷白 #F2FEF7
* ========================================================== */
/* 品牌主色 · 清爽浅翠绿 */
$fc-primary: #00d26a; // 品牌主色(浅翠绿,用于按钮底 / 选中态 / 徽章)
$fc-primary-ink: #073b22; // 浅绿面上的文字(高对比深青墨)
$fc-on-primary: $fc-primary-ink; // 兼容别名
$fc-primary-text: #00a854; // 白底上的强调绿字 / 链接文字(原 #04874a 提亮)
$fc-primary-light: #5cf3a6; // 主色浅(描边 / 图标高光)
$fc-primary-lighter: #e6f9f0; // 主色极浅(浅绿背景块 / 胶囊底)
$fc-primary-dark: #00bd5f; // 主色按压态
$fc-primary-deep: #059669; // 中深绿面(适度沉稳但不发黑)
$fc-primary-deeper: #047857; // 深绿收尾
$fc-primary-soft: #a7f3d0; // 浅绿点缀(分割线 / 边框)
/* 辅助色 · 阳光金(会员 / 热度 / 价格) */
$fc-accent: #f5a623;
$fc-accent-light: #ffc25c;
$fc-accent-lighter: #fff4e0;
$fc-accent-dark: #d98a0b;
/* 渐变系统(全面提亮,注入轻盈通透感) */
$fc-gradient-primary: linear-gradient(135deg, #00e070 0%, #00d26a 55%, #00bd5f 100%);
$fc-gradient-hero: linear-gradient(180deg, #d6f7e5 0%, #ebfbf3 60%, #f2fef7 100%); // 顶栏轻氧浅绿微渐变
$fc-gradient-deep: linear-gradient(150deg, #10b981 0%, #059669 100%);
$fc-gradient-gold: linear-gradient(135deg, #ffc25c 0%, #f5a623 55%, #d98a0b 100%);
$fc-gradient-warm: $fc-gradient-gold; // 兼容旧名:会员 / 徽章 / 价格条
$fc-gradient-soft: linear-gradient(180deg, #eafef4 0%, #f7fffb 100%);
/* 文字色(现代高级深灰中性色,彻底摆脱旧版墨绿发暗感) */
$fc-text: #1e293b; // 标题 / 重点内容(炭黑深灰)
$fc-text-regular: #334155; // 正文常规(自然深灰)
$fc-text-secondary: #64748b; // 次级说明 / 副标题
$fc-text-sub: $fc-text-secondary;
$fc-text-placeholder: #94a3b8; // 输入框占位符 / 失效态
$fc-text-inverse: #ffffff;
$fc-text-muted: $fc-text-placeholder;
$fc-border-light: #ebf8f0;
/* 背景 / 边框 / 投影(一律绿色低透明度投影,避免灰黑脏感) */
$fc-border-light: #edfbf3;
/* 背景 / 边框 / 投影(浅绿柔光低饱和投影,极致通透) */
$fc-bg: #f2fef7;
$fc-bg-page: $fc-bg;
$fc-bg-card: #ffffff;
$fc-bg-hover: #e4fdf0;
$fc-border: #d6f3e3;
$fc-shadow-sm: 0 4rpx 14rpx rgba(4, 48, 30, 0.06);
$fc-shadow: 0 6rpx 24rpx rgba(4, 48, 30, 0.12);
$fc-shadow-lg: 0 12rpx 40rpx rgba(4, 48, 30, 0.18);
$fc-shadow-gold: 0 10rpx 28rpx rgba(245, 166, 35, 0.28);
/* 功能色 */
$fc-success: #04874a;
$fc-warning: #f5a623;
$fc-danger: #e5484d;
$fc-info: #3f6b57;
$fc-price: #e0891b;
$fc-bg-page: $fc-bg;
$fc-bg-card: #ffffff;
$fc-bg-hover: #eafbf1;
$fc-border: #d8f3e5;
$fc-shadow-sm: 0 4rpx 14rpx rgba(0, 168, 84, 0.05);
$fc-shadow: 0 6rpx 20rpx rgba(0, 168, 84, 0.08);
$fc-shadow-lg: 0 12rpx 36rpx rgba(0, 168, 84, 0.12);
$fc-shadow-gold: 0 10rpx 28rpx rgba(245, 166, 35, 0.25);
/* 功能色 */
$fc-success: #00a854;
$fc-warning: #f5a623;
$fc-danger: #e5484d;
$fc-info: #64748b;
$fc-price: #e0891b;
/* 圆角 / 间距 */
$fc-radius-sm: 8rpx;
$fc-radius: 16rpx;
@@ -166,17 +165,16 @@ $fc-leading-tight: 1.3;
$fc-leading: 1.5;
$fc-leading-loose: 1.7;
/* ---------- 覆盖 uni-app 内置变量为春绿(后面的赋值生效) ---------- */
$uni-color-primary: #00e070;
$uni-color-success: #04874a;
$uni-color-warning: #f5a623;
$uni-color-error: #e5484d;
$uni-text-color: #04291c;
$uni-text-color-grey: #3f6b57;
$uni-text-color-placeholder: #8fb3a3;
$uni-text-color-disable: #b8d6c7;
$uni-bg-color: #ffffff;
$uni-bg-color-grey: #f2fef7;
$uni-bg-color-hover: #e4fdf0;
$uni-border-color: #d6f3e3;
/* ---------- 覆盖 uni-app 内置变量为轻氧浅绿 ---------- */
$uni-color-primary: #00d26a;
$uni-color-success: #00a854;
$uni-color-warning: #f5a623;
$uni-color-error: #e5484d;
$uni-text-color: #1e293b;
$uni-text-color-grey: #64748b;
$uni-text-color-placeholder: #94a3b8;
$uni-text-color-disable: #cbd5e1;
$uni-bg-color: #ffffff;
$uni-bg-color-grey: #f2fef7;
$uni-bg-color-hover: #eafbf1;
$uni-border-color: #d8f3e5;