feat:首页按设计稿改版 + 新增「查询我的中奖结果」半屏弹层

- 首页重构:KV 头图/金刚区/可领权益包/折扣商户分类宫格,暖米底色与切图规范统一
- 查询弹层 hhrs-winner-sheet:登录→资格→证件两段式查询,六态文案与 CTA;未中奖引导看权益包明细(参加指南内容待运营)
- 底部导航改自定义组件单条呈现,移除 pages.json 原生 tabBar(H5 下双导航叠加问题);我的页换肤对齐首页主色
- 修复内容不足一屏时露 html 白底(html 兜底色 + 我的页撑满屏高);App.vue 修复微信 WebView 导航栏高度误报
- 删除原生 tabBar 遗留的 4 张旧图标,新增 12 张 hhrs2_ 切图

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-10-23 11:04:52 +08:00
co-authored by Claude Fable 5
parent b94d0a4486
commit 6747501963
23 changed files with 610 additions and 128 deletions
+6
View File
@@ -24,6 +24,12 @@
-webkit-font-smoothing: antialiased;
}
/* xuchao: html 层兜底暖米底色 —— 内容不足一屏的页面(如 我的)在固定导航上方
不会露出默认白底形成白带;有自己底色的页面不受影响 */
html {
background-color: #FDECE2;
}
/* xuchao: 修复默认导航栏在微信 WebView 内顶部超宽空白(参加/使用指南、协议等页)——
uni-app 内置 H5 导航栏高度为 calc(44px + env(safe-area-inset-top)),页面模板带
viewport-fit=cover 时,部分 Android 微信 WebView 会误报状态栏高度(而 H5 视口本
+56
View File
@@ -0,0 +1,56 @@
<template>
<!-- xuchao: 首页改版自定义底部导航 —— tab 切图含图标+文字(原生 tabBar 会再叠一层文字),
仅在 活动首页/我的 两页复用,reLaunch 模拟 tab 切换语义 -->
<view class="tabbar">
<view class="tab" @click="go('home')">
<image class="tab-ico" :src="current === 'home' ? '/static/hhrs2_tab_home_on.png' : '/static/hhrs2_tab_home_off.png'" mode="aspectFit"></image>
</view>
<view class="tab" @click="go('mine')">
<image class="tab-ico" :src="current === 'mine' ? '/static/hhrs2_tab_mine_on.png' : '/static/hhrs2_tab_mine_off.png'" mode="aspectFit"></image>
</view>
</view>
</template>
<script>
export default {
name: 'HhrsTabbar',
props: {
// xuchao: 当前高亮 tab,home | mine
current: { type: String, default: 'home' }
},
methods: {
go(tab) {
if (tab === this.current) return
const url = tab === 'home' ? '/pages/index/index' : '/pages/mine/mine'
uni.reLaunch({ url })
}
}
}
</script>
<style>
/* xuchao: 条高 128、图标 80 —— 上下各留 24rpx 等距边(tab 切图内容本身贴画布边缘,
必须靠容器留白撑出呼吸空间);iPhone 底部安全区由 padding-bottom 追加,不影响内容区等距 */
.tabbar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 99;
height: 128rpx;
background: #FFFFFF;
border-top: 1px solid #F3E5D8;
display: flex;
padding-bottom: env(safe-area-inset-bottom);
}
.tab {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.tab-ico {
width: 80rpx;
height: 80rpx;
}
</style>
@@ -0,0 +1,305 @@
<template>
<!-- xuchao: 「查询我的中奖结果」半屏弹层。链路:
打开 → getEligibility(phone):已认证直接出结果;未认证 → 输入证件号 →
getWinnerDates 判期次(空=暂无已开奖记录)→ checkWinner(identityNo) 出中奖/未中奖。
证件号仅内存使用不落缓存;CTA 跳转后自关。 -->
<view class="qsm-mask" v-if="visible" @click="close">
<view class="qsm-sheet" @click.stop>
<view class="qsm-head">
<text class="qsm-title">查询我的中奖结果</text>
<view class="qsm-close" @click="close">
<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2 2l10 10M12 2L2 12" stroke="#9A8574" stroke-width="2" stroke-linecap="round"/></svg>
</view>
</view>
<!-- 加载中 -->
<view class="qsm-state" v-if="phase === 'loading'">
<view class="qsm-spin"></view>
<text class="qsm-state-t">正在查询…</text>
</view>
<!-- 未认证:输入证件号 -->
<view v-else-if="phase === 'input'">
<text class="qsm-desc">为保障权益发放安全,请填写办卡登记的身份证号码进行核验</text>
<input class="qsm-input" v-model="idNo" type="idcard" maxlength="18" placeholder="请输入 18 位身份证号码" placeholder-class="qsm-ph" />
<text class="qsm-privacy">证件号码仅用于核对中奖名单,不会保存</text>
<view class="qsm-btn" :class="{ dis: querying }" @click="query">
{{ querying ? '查询中…' : '立即查询' }}
</view>
</view>
<!-- 结果:已开奖期数内查无此证件(未认证查询 / 已认证未中奖共用) -->
<view class="qsm-state" v-else-if="phase === 'lost'">
<view class="qsm-ico gray"><svg width="20" height="20" viewBox="0 0 20 20"><path d="M6 6l8 8M14 6l-8 8" stroke="#fff" stroke-width="2.2" stroke-linecap="round"/></svg></view>
<text class="qsm-state-t">很遗憾,本期未中奖</text>
<text class="qsm-state-s">持社保卡在合作商户消费,下期自动获得抽奖资格</text>
<!-- xuchao: 主 CTA 跳权益包明细长图(有内容);参加指南页内容运营整理中,暂不引导(2026-10-23 定) -->
<view class="qsm-btn" @click="nav('/pages/rights/rights?status=noWin')">看看权益包</view>
<view class="qsm-btn-line">
<text class="qsm-link" @click="nav('/pages/winners/winners')">中奖名单公示</text>
</view>
<text class="qsm-tip" v-if="fromIdQuery">如您在其他手机号下持卡,请切换登录后再查询</text>
</view>
<!-- 结果:中奖未认证 -->
<view class="qsm-state" v-else-if="phase === 'won-auth'">
<view class="qsm-ico gold"><svg width="22" height="22" viewBox="0 0 22 22"><path d="M4.5 11.5l4.5 4.5 8.5-9" stroke="#8A4A06" stroke-width="2.6" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg></view>
<text class="qsm-state-t dark">恭喜您!获得千元权益包</text>
<text class="qsm-state-s">完成实名认证后即可领取使用</text>
<view class="qsm-btn" @click="nav('/pages/rights/rights?status=auth')">立即认证领取</view>
</view>
<!-- 结果:已认证已中奖 -->
<view class="qsm-state" v-else-if="phase === 'won-has'">
<view class="qsm-ico gold"><svg width="22" height="22" viewBox="0 0 22 22"><path d="M4.5 11.5l4.5 4.5 8.5-9" stroke="#8A4A06" stroke-width="2.6" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg></view>
<text class="qsm-state-t dark">您已获得千元权益包</text>
<text class="qsm-state-s" v-if="expires">权益 {{ expires }} 到期,请及时使用</text>
<text class="qsm-state-s" v-else>10 项权益待您使用</text>
<view class="qsm-btn" @click="nav('/pages/rights/rights?status=info')">查看我的权益包</view>
</view>
<!-- 本期暂未开奖(无任何已开奖记录) -->
<view class="qsm-state" v-else-if="phase === 'not-drawn'">
<view class="qsm-ico amber"><svg width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7.5" stroke="#fff" stroke-width="1.8" fill="none"/><path d="M10 6v4.5l3 1.8" stroke="#fff" stroke-width="1.8" stroke-linecap="round" fill="none"/></svg></view>
<text class="qsm-state-t">本期暂未开奖</text>
<text class="qsm-state-s">中奖名单预计于 2026 年 11 月上旬公布,敬请期待</text>
<view class="qsm-btn line" @click="close">知道了,继续逛</view>
</view>
<!-- 查询失败 -->
<view class="qsm-state" v-else-if="phase === 'error'">
<view class="qsm-ico gray"><svg width="20" height="20" viewBox="0 0 20 20"><path d="M10 5v7M10 15.2v.2" stroke="#fff" stroke-width="2.2" stroke-linecap="round"/></svg></view>
<text class="qsm-state-t">{{ errText }}</text>
<view class="qsm-btn" @click="start">重试</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'HhrsWinnerSheet',
props: {
visible: { type: Boolean, default: false }
},
data() {
return {
phase: 'loading',
idNo: '',
querying: false,
fromIdQuery: false,
expires: '',
errText: '查询失败,请稍后重试'
}
},
watch: {
visible(v) { if (v) this.start() }
},
methods: {
close() { this.$emit('close') },
nav(url) { this.$emit('close'); uni.navigateTo({ url }) },
// xuchao: 打开即查资格。getEligibility 对未认证用户 hasWin 不可信(spec 见需求定稿),
// 故 isAuth=false 一律走证件输入两段式;成功/失败都释放 querying
start() {
this.phase = 'loading'
this.querying = false
this.fromIdQuery = false
this.idNo = ''
const phone = uni.getStorageSync('phone')
if (!phone) { this.phase = 'error'; this.errText = '请先登录'; return }
this.$u.api.getEligibility({ phone }).then(res => {
if (res.errcode !== 0 || !res.data) { this.errText = res.errmsg || '查询失败,请稍后重试'; this.phase = 'error'; return }
this.applyEligibility(res.data)
}).catch(() => { this.errText = '查询失败,请稍后重试'; this.phase = 'error' })
},
applyEligibility(d) {
if (!d.isAuth) { this.phase = 'input'; return }
if (d.hasWin) {
this.expires = d.expiresTime ? String(d.expiresTime).slice(0, 10) : ''
this.phase = 'won-has'
} else {
this.phase = 'lost'
}
},
query() {
if (this.querying) return
if (!/^\d{17}[0-9Xx]$/.test(this.idNo.trim())) {
uni.showToast({ title: '请输入正确的 18 位身份证号码', icon: 'none' })
return
}
const idNo = this.idNo.trim()
this.querying = true
this.$u.api.getWinnerDates().then(dRes => {
// xuchao: 无任何已开奖记录 = 暂未开奖(新轮次排期暂无接口,见交付说明的边界限制)
if (dRes.errcode === 0 && Array.isArray(dRes.data) && dRes.data.length === 0) {
return { skip: 'not-drawn' }
}
return this.$u.api.checkWinner({ identityNo: idNo }).then(r => ({ skip: null, r }))
}).then(out => {
this.querying = false
if (out.skip === 'not-drawn') { this.phase = 'not-drawn'; return }
const res = out.r
if (res.errcode !== 0 || !res.data) {
this.errText = res.errmsg || '查询失败,请稍后重试'
this.phase = 'error'
return
}
this.fromIdQuery = true
this.phase = res.data.isWinner ? 'won-auth' : 'lost'
}).catch(() => {
this.querying = false
this.errText = '查询失败,请稍后重试'
this.phase = 'error'
})
}
}
}
</script>
<style>
.qsm-mask {
position: fixed;
left: 0; right: 0; top: 0; bottom: 0;
background: rgba(40, 20, 10, 0.55);
z-index: 999;
}
.qsm-sheet {
position: absolute;
left: 0; right: 0; bottom: 0;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0 0;
padding: 36rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
}
.qsm-head {
display: flex;
align-items: center;
justify-content: center;
position: relative;
margin-bottom: 24rpx;
}
.qsm-title {
font-size: 34rpx;
font-weight: 800;
color: #33200F;
}
.qsm-close {
position: absolute;
right: 0;
top: 4rpx;
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
}
.qsm-desc {
display: block;
font-size: 26rpx;
color: #6B5140;
line-height: 1.6;
margin-bottom: 24rpx;
}
.qsm-input {
height: 96rpx;
background: #F8F1E7;
border-radius: 16rpx;
padding: 0 26rpx;
font-size: 30rpx;
color: #33200F;
letter-spacing: 2rpx;
}
.qsm-ph { color: #B8A28E; font-size: 28rpx; letter-spacing: 0; }
.qsm-privacy {
display: block;
font-size: 22rpx;
color: #B8A28E;
margin-top: 14rpx;
text-align: center;
}
/* xuchao: .qsm-state 是 align-items:center 的 flex 列,子项宽度=内容宽会塌陷,
主按钮必须显式撑满(input 态在普通块级流里 100% 同样成立,两态统一) */
.qsm-btn {
width: 100%;
box-sizing: border-box;
margin-top: 32rpx;
height: 92rpx;
border-radius: 46rpx;
background: linear-gradient(90deg, #D8431F, #E8542F 55%, #F0703C);
color: #FFF;
font-size: 32rpx;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 2rpx;
box-shadow: 0 8rpx 18rpx rgba(216, 67, 31, 0.25);
}
.qsm-btn.dis { opacity: .6; }
.qsm-btn.line {
background: #FFF;
color: #D8431F;
border: 2rpx solid #F0C6B4;
box-shadow: none;
}
.qsm-btn-line {
display: flex;
align-items: center;
justify-content: center;
gap: 20rpx;
margin-top: 26rpx;
}
.qsm-link { font-size: 26rpx; color: #D8431F; font-weight: 600; }
.qsm-sep { font-size: 22rpx; color: #E6D4C2; }
.qsm-tip {
display: block;
text-align: center;
font-size: 22rpx;
color: #B8A28E;
margin-top: 24rpx;
}
.qsm-state {
display: flex;
flex-direction: column;
align-items: center;
padding: 14rpx 0 4rpx;
}
.qsm-state-t {
font-size: 34rpx;
font-weight: 800;
color: #33200F;
margin-top: 22rpx;
}
.qsm-state-t.dark { color: #33200F; }
.qsm-state-s {
font-size: 26rpx;
color: #8A6E56;
margin-top: 12rpx;
text-align: center;
line-height: 1.6;
padding: 0 20rpx;
}
.qsm-ico {
width: 96rpx;
height: 96rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.qsm-ico.gold {
background: radial-gradient(circle at 32% 28%, #FFEEC0, #F0C267 65%, #D99A31);
box-shadow: 0 8rpx 16rpx rgba(217, 154, 49, 0.35);
}
.qsm-ico.gray { background: linear-gradient(160deg, #B9AEC5, #8E839B); }
.qsm-ico.amber { background: linear-gradient(160deg, #F0B25C, #E79A30); }
.qsm-spin {
width: 56rpx;
height: 56rpx;
border-radius: 50%;
border: 5rpx solid #F2E3CE;
border-top-color: #E8542F;
margin: 20rpx auto;
animation: qsm-rot 0.9s linear infinite;
}
@keyframes qsm-rot { to { transform: rotate(360deg); } }
</style>
-20
View File
@@ -100,25 +100,5 @@
"navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"custom": true,
"color": "#999999",
"selectedColor": "#007aff",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "static/shouye.png",
"selectedIconPath": "static/shouye_select.png",
"text": "首页"
},
{
"pagePath": "pages/mine/mine",
"iconPath": "static/wode.png",
"selectedIconPath": "static/wode_select.png",
"text": "我的"
}
]
},
"uniIdRouter": {}
}
+221 -102
View File
@@ -1,57 +1,85 @@
<template>
<!-- xuchao: 2026-10 首页按 UI 设计稿改版 —— 底部双 Tab 为自定义组件(切图含文字),页面留 tabbar 高度的底衬 -->
<view class="page">
<!-- 顶部 Banner -->
<view class="banner">
<image class="banner-img" src="https://aliyunoss.hn12301.net/hhrs/hhrs_header.png" mode="widthFix"></image>
<!-- 顶部头图(整张烘焙切图) -->
<image class="hero" src="/static/hhrs2_hero.png" mode="widthFix"></image>
<!-- 金刚区:图标文字已烘焙进切图,不再代码渲染文字 -->
<view class="kong">
<image class="kong-item" src="/static/hhrs2_kong_venue.png" mode="aspectFit" @click="goPage('/pages/venue/venue')"></image>
<image class="kong-item" src="/static/hhrs2_kong_shop.png" mode="aspectFit" @click="goPage('/pages/discount/discount')"></image>
<image class="kong-item" src="/static/hhrs2_kong_rights.png" mode="aspectFit" @click="goRights()"></image>
<image class="kong-item" src="/static/hhrs2_kong_winner.png" mode="aspectFit" @click="goPage('/pages/winners/winners')"></image>
</view>
<!-- 金刚区 -->
<view class="king-area">
<view class="king-item" v-for="(item, index) in kingList" :key="index" @click="item.isRights ? goRights() : goPage(item.url)">
<image class="king-icon" :src="item.icon" mode="widthFix"></image>
<text class="king-text">{{ item.text }}</text>
<!-- 可领权益包 -->
<view class="card">
<view class="card-head">
<view class="head-left">
<view class="bar"></view>
<text class="head-title">可领权益包</text>
</view>
<text class="head-right">数量有限 先到先得</text>
</view>
<text class="pack-sub">本期已产生10,000份千元权益包·实时公证开奖</text>
<!-- 查询按钮整图切图(含渐变底/礼盒图标/文案),点击打开中奖查询半屏弹层 -->
<image class="btn-query" src="/static/hhrs2_btn_query.png" mode="widthFix" @click="openQuery()"></image>
<!-- 指南轮播:两张图 3 秒自动轮播,图片下方指示点标当前张 -->
<swiper class="guides" :autoplay="true" :interval="3000" :duration="400" circular
indicator-dots indicator-color="rgba(232,84,47,0.25)" indicator-active-color="#E8542F">
<swiper-item @click="goPage('/pages/guide/join')">
<image class="guide-img" src="/static/hhrs2_guide_join.png" mode="aspectFill"></image>
</swiper-item>
<swiper-item @click="goPage('/pages/guide/use')">
<image class="guide-img" src="/static/hhrs2_guide_use.png" mode="aspectFill"></image>
</swiper-item>
</swiper>
</view>
<!-- 活动指南 -->
<view class="guide-section">
<view class="section-title">
<view class="title-line"></view>
<text class="title-text">活动指南</text>
<!-- 怀化社保卡折扣商户:按后台分类取前 4 类,每类前 8 家(2 行 4 列),logo 用商铺 image 字段 -->
<view class="card">
<view class="card-head">
<view class="head-left">
<view class="bar"></view>
<text class="head-title">怀化社保卡折扣商户</text>
</view>
<view class="head-link" @click="goPage('/pages/discount/discount')">
<text>查看全部商户</text>
<view class="chev"></view>
</view>
</view>
<!-- xuchao: 图内已带标题/副标题/官方指南角标,不再叠加文字层,只保留图片 -->
<view class="guide-list">
<view class="guide-card" v-for="(item, index) in guideList" :key="index" @click="goPage(item.url)">
<image class="guide-bg" :src="item.bg" mode="scaleToFill"></image>
<view class="cat" v-for="grp in storeGroups" :key="grp.name">
<view class="cat-head">
<view class="bar bar-sm"></view>
<text class="cat-name">{{ grp.name }}</text>
</view>
<view class="mer-row">
<view class="mer-item" v-for="s in grp.stores" :key="s.shopId" @click="goStore(s)">
<image class="mer-logo" :src="s.image" mode="aspectFill"></image>
<text class="mer-name">{{ s.name }}</text>
</view>
</view>
</view>
</view>
<hhrs-tabbar current="home"></hhrs-tabbar>
<!-- xuchao: 「查询我的中奖结果」半屏弹层 -->
<hhrs-winner-sheet :visible="queryVisible" @close="queryVisible = false"></hhrs-winner-sheet>
</view>
</template>
<script>
import account from '@/common/account.js'
import HhrsTabbar from '@/components/hhrs-tabbar/hhrs-tabbar.vue'
import HhrsWinnerSheet from '@/components/hhrs-winner-sheet/hhrs-winner-sheet.vue'
export default {
components: { HhrsTabbar, HhrsWinnerSheet },
data() {
return {
kingList: [
{ icon: 'https://aliyunoss.hn12301.net/hhrs/hhrs_wlcg.png', text: '文旅场馆', url: '/pages/venue/venue' },
{ icon: 'https://aliyunoss.hn12301.net/hhrs/hhrs_shzk.png', text: '商户折扣', url: '/pages/discount/discount' },
{ icon: 'https://aliyunoss.hn12301.net/hhrs/hhrs_qyb.png', text: '权益包', url: '/pages/rights/rights', isRights: true },
{ icon: 'https://aliyunoss.hn12301.net/hhrs/hhrs_zjmd.png', text: '中奖名单', url: '/pages/winners/winners' }
],
guideList: [
{
// xuchao: ?v= 为图片版本参数,运营换图必须同步更新日期,否则各平台 WebView/CDN 会继续命中旧缓存
bg: 'https://aliyunoss.hn12301.net/hhrs/hhrs_cjzn.png?v=20260928',
url: '/pages/guide/join'
},
{
bg: 'https://aliyunoss.hn12301.net/hhrs/hhrs_syzn.png?v=20260928',
url: '/pages/guide/use'
}
],
storeGroups: [],
queryVisible: false,
// xuchao: 云闪付免密登录是否仍在进行中 —— 返回前不放行任何依赖身份的跳转
tokenLoginPending: false,
tokenLoginTimer: null
@@ -62,13 +90,32 @@
if (options.token) {
this.handleTokenLogin(options.token)
}
// xuchao: 登录页 redirect=query 回跳时自动弹出中奖查询层
if (options.openQuery) {
this.queryVisible = true
}
this.getLocation()
this.loadStores()
},
// xuchao: 离开首页时收尾,避免看门狗与遮罩残留
onUnload() {
this.finishTokenLogin()
},
methods: {
// xuchao: 首页商户板块按分类面板数量降序取前 4 类,每类取列表里前 8 家(2 行 4 列),与设计稿分组宫格一致
loadStores() {
this.$u.api.getStoreList({ pageNo: 1, pageSize: 60, typeId: 2 }).then(res => {
if (res.errcode !== 0 || !res.data) return
const cats = (res.data.categories || []).filter(c => c.value).slice(0, 4)
const list = res.data.list || []
this.storeGroups = cats.map(c => {
const matched = list.filter(s => s.category === c.value)
// xuchao: 每行 4 个,截成整行数(最少 1 行、最多 2 行),避免最后半行残缺
const rows = Math.max(1, Math.min(2, Math.floor(matched.length / 4)))
return { name: c.value, stores: matched.slice(0, rows * 4) }
}).filter(g => g.stores.length)
})
},
// xuchao: 云闪付入口 token 自动登录(免密换人)
handleTokenLogin(token) {
// xuchao: 云闪付入口是"免密换人",本机上一个账号的会话与权益缓存必须先丢弃:
@@ -150,6 +197,23 @@
goPage(url) {
uni.navigateTo({ url })
},
// xuchao: 「查询我的中奖结果」入口:免密登录中不放行,未登录先去登录并回跳,否则开弹层
openQuery() {
if (this.tokenLoginPending) {
uni.showToast({ title: '正在登录,请稍候', icon: 'none' })
return
}
const phone = uni.getStorageSync('phone')
if (!phone) {
uni.navigateTo({ url: '/pages/index/login?redirect=query' })
return
}
this.queryVisible = true
},
goStore(s) {
// xuchao: 与商户折扣页同款跳转,type=2 标记商户折扣入口
uni.navigateTo({ url: '/pages/venue/detail?id=' + s.shopId + '&type=2' })
},
goRights() {
// xuchao: 免密登录还没返回时不放行,避免带着空/旧身份进权益页
if (this.tokenLoginPending) {
@@ -176,106 +240,161 @@
</script>
<style>
/* xuchao: 原 page/.page 固定 100vh + overflow:hidden,小屏下活动指南第二张卡片会被裁掉且无法滚动;
改为 min-height 撑满、超出可滚动,视觉在正常屏上保持不变 */
/* xuchao: 改版后首页底色取设计稿暖米色;底部为自定义 tabbar(128rpx+安全区)留底衬 */
.page {
min-height: 100vh;
background-color: #f5f5f5;
display: flex;
flex-direction: column;
background-color: #FDECE2;
padding-bottom: calc(156rpx + env(safe-area-inset-bottom));
}
.banner {
width: 100%;
max-height: 300px;
overflow: hidden;
}
.banner-img {
.hero {
width: 100%;
display: block;
}
/* 金刚区 */
.king-area {
width: 100%;
/* 金刚区(整图切图 110rpx,含文字);与卡1间距由 80 减半为 40(16+卡 margin-top 24) */
.kong {
display: flex;
justify-content: space-around;
align-items: center;
padding: 10rpx 0 16rpx;
}
.kong-item {
width: 110rpx;
height: 110rpx;
}
/* 白卡通用(设计稿实测:外边距 29、左右内边距 17,内容宽 658 与切图基准一致) */
.card {
background: #FFFFFF;
border-radius: 28rpx;
margin: 24rpx 29rpx 0;
padding: 24rpx 17rpx;
}
.card-head {
display: flex;
align-items: center;
justify-content: space-between;
align-items: flex-start;
background-color: #ffffff;
padding: 24rpx;
box-sizing: border-box;
}
.king-item {
width: 25%;
.head-left {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.king-icon {
width: 100rpx;
height: 132rpx;
margin-bottom: 12rpx;
.bar {
width: 8rpx;
height: 34rpx;
border-radius: 4rpx;
background: linear-gradient(180deg, #F6613C, #E01818);
margin-right: 14rpx;
}
.king-text {
font-size: 24rpx;
.head-title {
font-size: 34rpx;
font-weight: bold;
color: #333333;
text-align: center;
}
/* 活动指南 */
.guide-section {
flex: 1;
background-color: #ffffff;
margin-top: 10rpx;
display: flex;
flex-direction: column;
.head-right {
font-size: 24rpx;
color: #BCAB9A;
}
.section-title {
.head-link {
display: flex;
align-items: center;
margin-bottom: 20rpx;
padding: 24rpx 20rpx 0 24px;
font-size: 26rpx;
font-weight: 600;
color: #E0342B;
}
.chev {
width: 12rpx;
height: 12rpx;
border-top: 3rpx solid #E0342B;
border-right: 3rpx solid #E0342B;
transform: rotate(45deg);
margin-left: 8rpx;
}
.title-line {
/* 可领权益包(切图 @1500 基准,显示 px÷2:按钮 658×102、指南卡 571×141) */
.pack-sub {
display: block;
margin-top: 22rpx;
font-size: 26rpx;
color: #E05A38;
}
.btn-query {
display: block;
width: 100%;
margin-top: 26rpx;
}
/* xuchao: 指南轮播 swiper —— 图 648x200(切图 1297x400÷2),指示点浮于图片内侧 */
.guides {
margin-top: 26rpx;
height: 200rpx;
}
/* xuchao: uni-app H5 把页面样式编成 scoped,swiper 内部元素无 data-v 属性,必须 /deep/ 穿透;
容器高=图高时 bottom 即点距图底距离,3px ≈ 原默认位置(压出图外3px)上移 6px 且完全在图内 */
.guides /deep/ .uni-swiper-dots-horizontal {
bottom: 3px !important;
}
.guide-img {
display: block;
width: 648rpx;
height: 200rpx;
border-radius: 24rpx;
margin: 0 auto;
}
/* 折扣商户 */
.cat {
margin-top: 28rpx;
}
.cat-head {
display: flex;
align-items: center;
}
.bar-sm {
width: 6rpx;
height: 32rpx;
background-color: #1890ff;
height: 26rpx;
border-radius: 3rpx;
margin-right: 12rpx;
/* xuchao: 折扣商户二级标题标记色,按 UI 要求统一琥珀金 */
background: #E79A30;
}
.title-text {
font-size: 14px;
font-weight: 600;
.cat-name {
font-size: 30rpx;
font-weight: bold;
color: #333333;
}
.guide-list {
.mer-row {
display: flex;
flex-wrap: wrap;
margin-top: 24rpx;
}
.mer-item {
width: 25%;
box-sizing: border-box;
padding: 0 8rpx;
display: flex;
flex-direction: column;
gap: 12px;
padding: 0 20rpx 30rpx;
align-items: center;
margin-bottom: 30rpx;
}
.guide-card {
width: 100%;
height: 252rpx;
.mer-logo {
width: 96rpx;
height: 96rpx;
border-radius: 16rpx;
background: #F5F5F5;
}
.mer-name {
width: 100%;
text-align: center;
font-size: 22rpx;
color: #4A3A2E;
margin-top: 12rpx;
line-height: 30rpx;
height: 60rpx;
/* xuchao: 设计稿店名可折两行,固定两行高度保证宫格对齐 */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.guide-bg {
width: 100%;
height: 252rpx;
border-radius: 16rpx;
}
</style>
+4 -1
View File
@@ -139,7 +139,10 @@ export default {
uni.setStorageSync('expiresTime', eRes.data.expiresTime)
}
}).finally(() => {
if (this.redirect === 'rights') {
if (this.redirect === 'query') {
// xuchao: 首页「查询中奖结果」发起的登录 —— 回首页自动弹查询层(openQuery 由首页 onLoad 消费)
uni.reLaunch({ url: '/pages/index/index?openQuery=1' })
} else if (this.redirect === 'rights') {
const isAuth = uni.getStorageSync('isAuth')
const hasWin = uni.getStorageSync('hasWin')
let status = 'auth'
+18 -5
View File
@@ -38,14 +38,18 @@
</view>
</view>
<!-- xuchao: 首页改版后 我的 页复用同一自定义底部导航 -->
<hhrs-tabbar current="mine"></hhrs-tabbar>
</view>
</template>
<script>
import config from '@/common/config.js'
import account from '@/common/account.js'
import HhrsTabbar from '@/components/hhrs-tabbar/hhrs-tabbar.vue'
export default {
components: { HhrsTabbar },
data() {
return {
isLogin: false,
@@ -101,19 +105,20 @@ export default {
}
</script>
<style>
/* xuchao: 配色与改版后首页统一 —— 暖米底 + 品牌红橙头 */
page {
background-color: #f2f2f7;
background-color: #FDECE2;
}
</style>
<style>
/* 用户信息 */
/* 用户信息(xuchao: 头区渐变改品牌红→页面米色,与首页 KV 同色系) */
.user-section {
display: flex;
align-items: center;
justify-content: space-between;
background: linear-gradient(to bottom, #0066cc, #f2f2f7);
background: linear-gradient(180deg, #E8542F 0%, #F5B98E 55%, #FDECE2 100%);
padding: 40px 16px 130px;
}
@@ -162,11 +167,11 @@ export default {
border-radius: 4px;
}
/* 菜单列表 */
/* 菜单列表(xuchao: 圆角与首页卡片同规格 28rpx) */
.menu-list {
margin: -88px 12px 0;
background-color: #ffffff;
border-radius: 8px;
border-radius: 14px;
}
.menu-item {
@@ -193,5 +198,13 @@ export default {
margin-left: 12px;
}
/* xuchao: 底部固定导航遮挡留白;.page 必须撑满屏高并自带底色 —— 之前底色只挂在 body 上、
高度等于内容高度,内容短时下方露出 html 白底,在 TabBar 上方形成一条白带两条缝 */
.page {
min-height: 100vh;
background-color: #FDECE2;
padding-bottom: calc(78px + env(safe-area-inset-bottom));
}
</style>
Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B