feat:详情页店名完整换行显示;首页权益包份数改为中奖名单实际总数(当前4000,兜底10000)

- shop/detail 头部店铺名去掉省略号,长名称换行完整显示
- 首页文案改为“会产生 N 份千元权益包·实时公证开奖”,N=各期开奖名单 total 求和(与公示页同口径),接口异常回退 10,000

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-10-27 09:46:46 +08:00
co-authored by Claude Fable 5
parent 3049b2a1b9
commit b6bfdf18b8
2 changed files with 26 additions and 2 deletions
+22 -1
View File
@@ -21,7 +21,8 @@
</view>
<text class="head-right">数量有限 先到先得</text>
</view>
<text class="pack-sub">本期已产生10,000份千元权益包·实时公证开奖</text>
<!-- xuchao: 数量取中奖名单实际总人数(各期 total 求和),接口失败/未出时兜底 10,000 -->
<text class="pack-sub">会产生 {{ winCountText }} 份千元权益包·实时公证开奖</text>
<!-- 查询按钮整图切图(含渐变底/礼盒图标/文案),点击打开中奖查询半屏弹层 -->
<image class="btn-query" src="/static/hhrs2_btn_query.png" mode="widthFix" @click="openQuery()"></image>
<!-- 指南轮播:两张图 3 秒自动轮播,图片下方指示点标当前张 -->
@@ -80,11 +81,18 @@
return {
storeGroups: [],
queryVisible: false,
// xuchao: 千元权益包发放数 = 中奖名单总数;加载前用 10000 兜底
winPackCount: 10000,
// xuchao: 云闪付免密登录是否仍在进行中 —— 返回前不放行任何依赖身份的跳转
tokenLoginPending: false,
tokenLoginTimer: null
}
},
computed: {
winCountText() {
return (this.winPackCount || 10000).toLocaleString()
}
},
onLoad(options) {
// xuchao: 云闪付入口带 token 进来 —— 直接免密换取会话,不经过手机号验证码
if (options.token) {
@@ -96,6 +104,7 @@
}
this.getLocation()
this.loadStores()
this.loadWinCount()
},
// xuchao: 离开首页时收尾,避免看门狗与遮罩残留
onUnload() {
@@ -103,6 +112,18 @@
},
methods: {
// xuchao: 首页商户板块按分类面板数量降序取前 4 类,每类取列表里前 8 家(2 行 4 列),与设计稿分组宫格一致
// xuchao: 首页"会产生 N 份"= 各期开奖名单 total 求和(与中奖公示页"已产生"同口径);
// pageSize=1 只取计数不拉名单,失败静默保持 10,000 兜底
loadWinCount() {
this.$u.api.getWinnerDates().then(res => {
if (res.errcode !== 0 || !Array.isArray(res.data) || !res.data.length) return
Promise.all(res.data.map(d => this.$u.api.getWinnerList({ pageNo: 1, pageSize: 1, drawDate: d })))
.then(list => {
const sum = list.reduce((acc, r) => acc + ((r && r.errcode === 0 && r.data && r.data.total) || 0), 0)
if (sum > 0) this.winPackCount = sum
}).catch(() => {})
}).catch(() => {})
},
loadStores() {
this.$u.api.getStoreList({ pageNo: 1, pageSize: 60, typeId: 2 }).then(res => {
if (res.errcode !== 0 || !res.data) return