按 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
174 行
3.4 KiB
Vue
174 行
3.4 KiB
Vue
<template>
|
|
<view class="hq-page">
|
|
<view class="head">
|
|
<hq-icon :name="headIcon" :size="78" :stroke="1.7" color="#E8604C" style="margin-bottom: 22rpx" />
|
|
<text class="head-title">{{ detail.title || '' }}</text>
|
|
<text class="head-summary" v-if="detail.summary">{{ detail.summary }}</text>
|
|
<view class="head-tags">
|
|
<text class="head-tag" v-if="detail.media_type === 'audio'">音频 · {{ Math.round((detail.duration || 0) / 60) }} 分钟</text>
|
|
<text class="head-tag" v-if="detail.access === 'member'">会员内容</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="body hq-card" v-if="!detail.locked">
|
|
<text class="body-text">{{ detail.body }}</text>
|
|
</view>
|
|
|
|
<view class="locked hq-card" v-if="detail.locked">
|
|
<text class="locked-title">此内容为会员专享</text>
|
|
<text class="locked-text">{{ detail.body }}</text>
|
|
<view class="hq-btn locked-btn" @tap="goMember">
|
|
<text class="locked-btn-text">开通会员查看全文</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="disclaimer" v-if="detail.disclaimer">
|
|
<text class="disclaimer-text">{{ detail.disclaimer }}</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 { resolveIcon, iconForContentType } from '@/utils/icons.js'
|
|
import hqIcon from '@/components/hq-icon/hq-icon.vue'
|
|
|
|
export default {
|
|
components: { hqIcon },
|
|
data() {
|
|
return {
|
|
detail: {}
|
|
}
|
|
},
|
|
computed: {
|
|
headIcon() {
|
|
if (this.detail && (this.detail.icon || this.detail.emoji)) return resolveIcon(this.detail.icon || this.detail.emoji)
|
|
return iconForContentType((this.detail && this.detail.type) || 'jijing')
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
if (!store.token) {
|
|
uni.reLaunch({ url: '/pages/login/index' })
|
|
return
|
|
}
|
|
if (options && options.id) {
|
|
this.load(options.id)
|
|
}
|
|
},
|
|
methods: {
|
|
async load(id) {
|
|
try {
|
|
this.detail = await api.contentDetail(id)
|
|
uni.setNavigationBarTitle({ title: this.detail.title || '详情' })
|
|
} catch (e) {}
|
|
},
|
|
goMember() {
|
|
uni.navigateTo({ url: '/pages/member/index' })
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.head {
|
|
padding: 40rpx 8rpx 32rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.head-title {
|
|
margin-top: 16rpx;
|
|
font-size: 44rpx;
|
|
font-weight: 600;
|
|
color: #3E2C27;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.head-summary {
|
|
margin-top: 12rpx;
|
|
font-size: 26rpx;
|
|
color: #8C7367;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
.head-tags {
|
|
display: flex;
|
|
margin-top: 20rpx;
|
|
}
|
|
|
|
.head-tag {
|
|
font-size: 20rpx;
|
|
color: #B5715B;
|
|
background-color: #FFF1E9;
|
|
padding: 6rpx 16rpx;
|
|
border-radius: 999rpx;
|
|
margin-right: 12rpx;
|
|
}
|
|
|
|
.body {
|
|
padding: 36rpx 32rpx;
|
|
}
|
|
|
|
.body-text {
|
|
font-size: 30rpx;
|
|
line-height: 2;
|
|
color: #4A3830;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.locked {
|
|
padding: 36rpx 32rpx;
|
|
}
|
|
|
|
.locked-title {
|
|
font-size: 30rpx;
|
|
font-weight: 600;
|
|
color: #A8452F;
|
|
}
|
|
|
|
.locked-text {
|
|
display: block;
|
|
margin-top: 16rpx;
|
|
font-size: 28rpx;
|
|
color: #8C7367;
|
|
line-height: 1.9;
|
|
}
|
|
|
|
.locked-btn {
|
|
margin-top: 28rpx;
|
|
}
|
|
|
|
.locked-btn-text {
|
|
font-size: 28rpx;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.disclaimer {
|
|
margin: 8rpx 8rpx 0;
|
|
padding: 20rpx 24rpx;
|
|
border-radius: 20rpx;
|
|
background-color: #FFF4EE;
|
|
}
|
|
|
|
.disclaimer-text {
|
|
font-size: 20rpx;
|
|
color: #B5715B;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
.footer {
|
|
padding: 32rpx 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.footer-text {
|
|
font-size: 20rpx;
|
|
color: #C9B4AA;
|
|
}
|
|
</style>
|