文件
huaqiapp/pages/member/index.vue
linda ea2be7af8c style(ui): 图标整体放大并与页面比例协调
按 6 级尺寸阶梯统一放大图标,避免小而散、提升大气感:
- 底部导航 40 -> 48,容器 104 -> 116,标签 22 -> 23
- 首页快捷入口 40 -> 52,容器 96 -> 112、圆角 32 -> 36,标签 22 -> 24
- 首页品牌花标 40 -> 46,牌标容器 72 -> 84
- 今日心语 52 -> 62,提醒 38 -> 46
- 情绪选择 40 -> 50(容器 76),记录 30 -> 36,疗愈内容 34 -> 42
- 健康 Tab 26 -> 32(Tab 76 -> 84),建议项 34 -> 42(容器 84)
- 我的设置项 32 -> 40,头像 108 -> 116
- 备孕/关系/亲子勾选 20 -> 24(容器 40 -> 46),会员勾选 18 -> 22
- 咨询师头像 40 -> 50(容器 100),热线 34/36 -> 42,急救工具 44 -> 54
- 空状态与会员锁 72 -> 96,内容详情头图 64 -> 78,登录花瓣与输入框图标同步放大
- 大尺寸图标描边降至 1.6-1.8,小尺寸保持 1.8-2.4,线宽视觉统一
- 文档补充「图标尺寸阶梯」规范

验证:no_emoji 0 问题 / 契约 84 接口 0 偏差 / Vue 20-20 / SCSS 19-19
2026-11-06 10:25:41 +08:00

347 行
7.1 KiB
Vue

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<template>
<view class="hq-page">
<!-- 当前状态 -->
<view class="status-card hq-fade-up">
<view class="status-main">
<text class="status-title">{{ isMember ? '花期会员' : '尚未开通会员' }}</text>
<text class="status-desc" v-if="isMember">
{{ member.forever ? '终身有效 · 感谢信任' : '有效期至 ' + member.expire_date + ' · 剩余 ' + member.days_left + ' 天' }}
</text>
<text class="status-desc" v-else>免费版本已包含周期记录与基础预测</text>
</view>
<view class="status-badge" v-if="isMember">
<text class="status-badge-text">VIP</text>
</view>
</view>
<!-- 套餐 -->
<view class="hq-section-head">
<text class="hq-section-title">选择套餐</text>
<text class="hq-section-more">随时可退,自动续费可关闭</text>
</view>
<view
v-for="plan in plans"
:key="plan.code"
class="plan-card"
:class="{ 'plan-card-active': selected === plan.id }"
@tap="selected = plan.id"
>
<view class="plan-badge" v-if="plan.badge">
<text class="plan-badge-text">{{ plan.badge }}</text>
</view>
<view class="plan-head">
<view class="plan-title-wrap">
<text class="plan-name">{{ plan.name }}</text>
<text class="plan-sub">{{ plan.subtitle }}</text>
</view>
<view class="plan-price-wrap">
<text class="plan-price">¥{{ plan.price }}</text>
<text class="plan-origin">¥{{ plan.origin_price }}</text>
</view>
</view>
<view class="plan-benefits">
<view class="plan-benefit" v-for="(b, i) in plan.benefit_texts" :key="i">
<text class="plan-benefit-dot">·</text>
<text class="plan-benefit-text">{{ b }}</text>
</view>
</view>
<view class="plan-check">
<view class="plan-check-circle" :class="{ 'plan-check-circle-active': selected === plan.id }">
<hq-icon v-if="selected === plan.id" name="check" :size="22" :stroke="2.4" color="#FFFFFF" />
</view>
<text class="plan-check-label">{{ selected === plan.id ? '已选择' : '点击选择' }}</text>
</view>
</view>
<view class="hq-btn pay-btn" @tap="createOrder">
<text class="pay-btn-text">{{ paying ? '提交中…' : '确认开通' }}</text>
</view>
<view class="hq-card tip">
<text class="tip-title">会员说明</text>
<text class="tip-text">· 会员权益与账号绑定,可在多端登录使用</text>
<text class="tip-text">· 深度报告、精准备孕、专属心语主题为会员专享</text>
<text class="tip-text">· 支付通道接入中,如需立即开通请联系客服</text>
</view>
<view class="footer">
<text class="footer-text">内容仅供参考,不能替代医疗诊断</text>
</view>
</view>
</template>
<script>
import api from '@/utils/api.js'
import store from '@/utils/store.js'
import hqIcon from '@/components/hq-icon/hq-icon.vue'
export default {
components: { hqIcon },
data() {
return {
plans: [],
member: {},
selected: 0,
paying: false
}
},
computed: {
isMember() {
return !!this.member.is_member
}
},
onLoad() {
this.load()
},
methods: {
async load() {
try {
const [plans, status] = await Promise.all([api.memberPlans(), api.memberStatus()])
this.plans = (plans && plans.list) || []
this.member = (status && status.member) || {}
// 默认选中年度会员(推荐位)
const recommended = this.plans.find((p) => p.badge) || this.plans[0]
this.selected = recommended ? recommended.id : 0
} catch (e) {}
},
async createOrder() {
if (!this.selected) {
uni.showToast({ title: '请选择套餐', icon: 'none' })
return
}
if (!store.token) {
uni.navigateTo({ url: '/pages/login/index' })
return
}
if (this.paying) return
this.paying = true
try {
const order = await api.memberOrder(this.selected, 'wechat')
uni.showModal({
title: '订单已创建',
content: '订单号:' + order.order_no + '\n金额:¥' + order.amount + '\n\n' + (order.pay_hint || ''),
showCancel: false,
confirmColor: '#E8604C'
})
} catch (e) {
} finally {
this.paying = false
}
}
}
}
</script>
<style lang="scss" scoped>
.status-card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 36rpx 32rpx;
border-radius: 36rpx;
background: linear-gradient(135deg, #FFEBD9 0%, #FFD9C4 100%);
border: 2rpx solid #F7DCC8;
margin: 24rpx 0 28rpx;
}
.status-main {
flex: 1;
display: flex;
flex-direction: column;
}
.status-title {
font-size: 34rpx;
font-weight: 600;
color: #A8452F;
}
.status-desc {
margin-top: 8rpx;
font-size: 22rpx;
color: #B5715B;
}
.status-badge {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
background-color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 10rpx 24rpx rgba(200, 120, 80, 0.18);
}
.status-badge-text {
font-size: 26rpx;
font-weight: 600;
color: #C9482F;
letter-spacing: 1rpx;
}
.plan-card {
position: relative;
background-color: #FFFFFF;
border-radius: 32rpx;
padding: 32rpx;
margin-bottom: 24rpx;
border: 2rpx solid #F5E7DF;
box-shadow: 0 12rpx 36rpx rgba(232, 96, 76, 0.06);
}
.plan-card-active {
border-color: #E8604C;
box-shadow: 0 16rpx 44rpx rgba(232, 96, 76, 0.16);
}
.plan-badge {
position: absolute;
top: 0;
right: 32rpx;
padding: 8rpx 20rpx;
border-radius: 0 0 16rpx 16rpx;
background: linear-gradient(135deg, #F5A65B 0%, #E8604C 100%);
}
.plan-badge-text {
font-size: 20rpx;
color: #FFFFFF;
letter-spacing: 1rpx;
}
.plan-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
}
.plan-title-wrap {
display: flex;
flex-direction: column;
}
.plan-name {
font-size: 32rpx;
font-weight: 600;
color: #3E2C27;
}
.plan-sub {
margin-top: 6rpx;
font-size: 22rpx;
color: #8C7367;
}
.plan-price-wrap {
display: flex;
align-items: baseline;
}
.plan-price {
font-size: 44rpx;
font-weight: 600;
color: #E8604C;
}
.plan-origin {
margin-left: 10rpx;
font-size: 22rpx;
color: #C9B4AA;
text-decoration: line-through;
}
.plan-benefits {
display: flex;
flex-wrap: wrap;
margin-top: 20rpx;
padding-top: 20rpx;
border-top: 2rpx solid #F5E7DF;
}
.plan-benefit {
width: 50%;
display: flex;
align-items: center;
margin-bottom: 8rpx;
}
.plan-benefit-dot {
font-size: 26rpx;
color: #F5A65B;
margin-right: 8rpx;
}
.plan-benefit-text {
font-size: 22rpx;
color: #8C7367;
}
.plan-check {
display: flex;
align-items: center;
margin-top: 16rpx;
}
.plan-check-circle {
width: 38rpx;
height: 38rpx;
border-radius: 50%;
border: 2rpx solid #E4D3C9;
display: flex;
align-items: center;
justify-content: center;
}
.plan-check-circle-active {
background-color: #E8604C;
border-color: #E8604C;
}
.plan-check-label {
margin-left: 12rpx;
font-size: 22rpx;
color: #B9A79E;
}
.pay-btn {
margin-top: 16rpx;
}
.pay-btn-text {
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 4rpx;
}
.tip {
margin-top: 28rpx;
}
.tip-title {
font-size: 26rpx;
font-weight: 600;
color: #3E2C27;
display: block;
margin-bottom: 12rpx;
}
.tip-text {
display: block;
font-size: 22rpx;
color: #8C7367;
line-height: 2;
}
.footer {
padding: 16rpx 0 24rpx;
text-align: center;
}
.footer-text {
font-size: 20rpx;
color: #C9B4AA;
}
</style>