From b6bfdf18b8ccc41c657f88706588584ea2bc7c24 Mon Sep 17 00:00:00 2001 From: jacobxu666 Date: Tue, 27 Oct 2026 09:46:46 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E5=BA=97=E5=90=8D=E5=AE=8C=E6=95=B4=E6=8D=A2=E8=A1=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=9B=E9=A6=96=E9=A1=B5=E6=9D=83=E7=9B=8A=E5=8C=85?= =?UTF-8?q?=E4=BB=BD=E6=95=B0=E6=94=B9=E4=B8=BA=E4=B8=AD=E5=A5=96=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E5=AE=9E=E9=99=85=E6=80=BB=E6=95=B0=EF=BC=88=E5=BD=93?= =?UTF-8?q?=E5=89=8D4000=EF=BC=8C=E5=85=9C=E5=BA=9510000=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - shop/detail 头部店铺名去掉省略号,长名称换行完整显示 - 首页文案改为“会产生 N 份千元权益包·实时公证开奖”,N=各期开奖名单 total 求和(与公示页同口径),接口异常回退 10,000 Co-Authored-By: Claude Fable 5 --- pages/index/index.vue | 23 ++++++++++++++++++++++- pages/shop/detail.vue | 5 ++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 1271903..f4349bc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -21,7 +21,8 @@ 数量有限 先到先得 - 本期已产生10,000份千元权益包·实时公证开奖 + + 会产生 {{ winCountText }} 份千元权益包·实时公证开奖 @@ -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 diff --git a/pages/shop/detail.vue b/pages/shop/detail.vue index 4cf4b38..f5410b3 100644 --- a/pages/shop/detail.vue +++ b/pages/shop/detail.vue @@ -250,7 +250,10 @@ .logo { width: 100%; height: 100%; display: block; } .head-name { 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 { flex-shrink: 0; min-width: 132rpx; border-radius: 14rpx; padding: 12rpx 16rpx;