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> </view>
<text class="head-right">数量有限 先到先得</text> <text class="head-right">数量有限 先到先得</text>
</view> </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> <image class="btn-query" src="/static/hhrs2_btn_query.png" mode="widthFix" @click="openQuery()"></image>
<!-- 指南轮播:两张图 3 秒自动轮播,图片下方指示点标当前张 --> <!-- 指南轮播:两张图 3 秒自动轮播,图片下方指示点标当前张 -->
@@ -80,11 +81,18 @@
return { return {
storeGroups: [], storeGroups: [],
queryVisible: false, queryVisible: false,
// xuchao: 千元权益包发放数 = 中奖名单总数;加载前用 10000 兜底
winPackCount: 10000,
// xuchao: 云闪付免密登录是否仍在进行中 —— 返回前不放行任何依赖身份的跳转 // xuchao: 云闪付免密登录是否仍在进行中 —— 返回前不放行任何依赖身份的跳转
tokenLoginPending: false, tokenLoginPending: false,
tokenLoginTimer: null tokenLoginTimer: null
} }
}, },
computed: {
winCountText() {
return (this.winPackCount || 10000).toLocaleString()
}
},
onLoad(options) { onLoad(options) {
// xuchao: 云闪付入口带 token 进来 —— 直接免密换取会话,不经过手机号验证码 // xuchao: 云闪付入口带 token 进来 —— 直接免密换取会话,不经过手机号验证码
if (options.token) { if (options.token) {
@@ -96,6 +104,7 @@
} }
this.getLocation() this.getLocation()
this.loadStores() this.loadStores()
this.loadWinCount()
}, },
// xuchao: 离开首页时收尾,避免看门狗与遮罩残留 // xuchao: 离开首页时收尾,避免看门狗与遮罩残留
onUnload() { onUnload() {
@@ -103,6 +112,18 @@
}, },
methods: { methods: {
// xuchao: 首页商户板块按分类面板数量降序取前 4 类,每类取列表里前 8 家(2 行 4 列),与设计稿分组宫格一致 // 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() { loadStores() {
this.$u.api.getStoreList({ pageNo: 1, pageSize: 60, typeId: 2 }).then(res => { this.$u.api.getStoreList({ pageNo: 1, pageSize: 60, typeId: 2 }).then(res => {
if (res.errcode !== 0 || !res.data) return if (res.errcode !== 0 || !res.data) return
+4 -1
View File
@@ -250,7 +250,10 @@
.logo { width: 100%; height: 100%; display: block; } .logo { width: 100%; height: 100%; display: block; }
.head-name { .head-name {
flex: 1; min-width: 0; font-size: 36rpx; font-weight: 800; color: #33200F; flex: 1; min-width: 0; font-size: 36rpx; font-weight: 800; color: #33200F;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; /* xuchao: 店铺名完整显示,允许换行,不用省略号 */
white-space: normal;
word-break: break-all;
line-height: 1.35;
} }
.badge { .badge {
flex-shrink: 0; min-width: 132rpx; border-radius: 14rpx; padding: 12rpx 16rpx; flex-shrink: 0; min-width: 132rpx; border-radius: 14rpx; padding: 12rpx 16rpx;