From e00d37d923dfc0ef4a00c85eb384db0fbd61fb39 Mon Sep 17 00:00:00 2001
From: lcj <17763797832@163.com>
Date: Thu, 12 Nov 2026 10:29:13 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20hj=E4=B8=AD=E5=A5=96=E8=AE=B0=E5=BD=95?=
=?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=AF=8F=E8=BD=AE=E5=BC=B9=E7=AA=97=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=E4=B8=AD=E5=A5=96=E5=90=8D=E5=8D=95=EF=BC=8C=E5=BC=B9?=
=?UTF-8?q?=E7=AA=97=E5=86=85searchKey=E6=9C=8D=E5=8A=A1=E7=AB=AF=E6=90=9C?=
=?UTF-8?q?=E7=B4=A2(=E9=BB=98=E8=AE=A4=E4=BC=A0=E7=A9=BA=E4=B8=B2)?=
=?UTF-8?q?=EF=BC=8C=E6=81=AD=E5=96=9C=E4=B8=AD=E5=A5=96=E5=BE=BD=E7=AB=A0?=
=?UTF-8?q?=EF=BC=8C=E5=90=8D=E5=8D=95=E6=87=92=E5=8A=A0=E8=BD=BD=E7=BC=93?=
=?UTF-8?q?=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/hj-win-records/hj-win-records.vue | 162 ++++++++++++++++--------
1 file changed, 111 insertions(+), 51 deletions(-)
diff --git a/pages/hj-win-records/hj-win-records.vue b/pages/hj-win-records/hj-win-records.vue
index 25c85a7..eaa119b 100644
--- a/pages/hj-win-records/hj-win-records.vue
+++ b/pages/hj-win-records/hj-win-records.vue
@@ -39,21 +39,30 @@
-
+
+
+
+
+ 查询
+
+
-
-
- {{ w.win_level_name }}
+
+
+ 恭喜中奖
{{ w.user_name }}
{{ w.user_phone }}
-
- 暂无中奖名单
+
+ 名单加载中...
+
+
+ {{ (currentItem.searchKey || '').trim() ? '暂无匹配的中奖人' : '暂无中奖名单' }}
@@ -72,10 +81,10 @@
data() {
return {
isLoggedIn: false,
- lotteryStarted: false,
+ lotteryStarted: true,
list: [],
showWinModal: false,
- winList: [],
+ currentItem: null,
bgHeight: 0
}
},
@@ -108,8 +117,15 @@
}).then(res => {
if (res.code === 0) {
const data = res.Data || {}
- this.list = data.list || data.records || data || []
- if (!Array.isArray(this.list)) this.list = []
+ let arr = data.list || data.records || data || []
+ if (!Array.isArray(arr)) arr = []
+ arr.forEach(it => {
+ it.winList = []
+ it.winLoading = false
+ it.winLoaded = false
+ it.searchKey = ''
+ })
+ this.list = arr
} else {
uni.showToast({ title: res.msg || '加载失败', icon: 'none' })
}
@@ -121,19 +137,38 @@
return String(item.status_desc || '').indexOf('已结束') > -1
},
showWinList(item) {
- this.winList = []
+ this.currentItem = item
this.showWinModal = true
- this.$u.api.getWenjuanWinDetailList({
+ if (!item.winLoaded && !item.winLoading) {
+ this.fetchWinList(item)
+ }
+ },
+ searchWinList() {
+ if (this.currentItem) {
+ this.fetchWinList(this.currentItem)
+ }
+ },
+ fetchWinList(item) {
+ const params = {
wenjuan_id: 1007,
- period: item.index
- }).then(res => {
- if (res.code === 0) {
- this.winList = Array.isArray(res.Data) ? res.Data : []
- } else {
- uni.showToast({ title: res.msg || '加载失败', icon: 'none' })
+ period: item.index,
+ searchKey: (item.searchKey || '').trim()
+ }
+ item.winLoading = true
+ this.$u.api.getWenjuanWinDetailList(params).then(res => {
+ let arr = []
+ if (res && res.code === 0) {
+ if (Array.isArray(res.Data)) arr = res.Data
+ else if (res.Data && Array.isArray(res.Data.list)) arr = res.Data.list
+ } else if (res && res.code !== 0) {
+ uni.showToast({ title: res.msg || '查询失败', icon: 'none' })
}
+ item.winList = arr
+ item.winLoaded = true
}).catch(() => {
- uni.showToast({ title: '网络异常', icon: 'none' })
+ item.winList = []
+ }).finally(() => {
+ item.winLoading = false
})
},
closeWinModal() {
@@ -297,24 +332,6 @@
text-align: center;
}
- .empty-box {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 80rpx 0;
- }
-
- .empty-icon {
- font-size: 80rpx;
- margin-bottom: 16rpx;
- }
-
- .empty-text {
- font-size: 26rpx;
- color: rgba(255,255,255,0.7);
- }
-
.modal-mask {
position: fixed;
top: 0;
@@ -366,6 +383,41 @@
flex-direction: column;
}
+ .win-search {
+ display: flex;
+ align-items: center;
+ padding: 0 30rpx 20rpx;
+ }
+
+ .win-search-input {
+ flex: 1;
+ height: 68rpx;
+ line-height: 68rpx;
+ background: #F5F5F5;
+ border-radius: 34rpx;
+ padding: 0 28rpx;
+ font-size: 24rpx;
+ color: #333;
+ box-sizing: border-box;
+ }
+
+ .win-search-btn {
+ flex-shrink: 0;
+ margin-left: 16rpx;
+ height: 68rpx;
+ line-height: 68rpx;
+ padding: 0 28rpx;
+ border-radius: 34rpx;
+ background: linear-gradient(135deg, #FD5401, #FF7A3D);
+ box-shadow: 0 4rpx 12rpx rgba(253,84,1,0.3);
+ }
+
+ .win-search-btn-txt {
+ font-size: 24rpx;
+ color: #fff;
+ font-weight: 600;
+ }
+
.win-list {
flex: 1;
max-height: 60vh;
@@ -384,8 +436,8 @@
border-bottom: none;
}
- .win-level {
- width: 120rpx;
+ .win-congrats {
+ width: 140rpx;
height: 44rpx;
line-height: 44rpx;
text-align: center;
@@ -394,18 +446,8 @@
color: #fff;
flex-shrink: 0;
margin-right: 16rpx;
- }
-
- .win-level-1 {
- background: linear-gradient(135deg, #F8D65E, #D9A400);
- }
-
- .win-level-2 {
- background: linear-gradient(135deg, #F0C85A, #C9962E);
- }
-
- .win-level-3 {
- background: linear-gradient(135deg, #D98E4A, #B87333);
+ background: linear-gradient(135deg, #FD5401, #FF7A3D);
+ box-shadow: 0 2rpx 8rpx rgba(253,84,1,0.3);
}
.win-name {
@@ -429,4 +471,22 @@
color: #999;
padding: 60rpx 0;
}
+
+ .empty-box {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 80rpx 0;
+ }
+
+ .empty-icon {
+ font-size: 80rpx;
+ margin-bottom: 16rpx;
+ }
+
+ .empty-text {
+ font-size: 26rpx;
+ color: rgba(255,255,255,0.7);
+ }