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;