diff --git a/api/lottery.js b/api/lottery.js
index 21e7b69..834be88 100644
--- a/api/lottery.js
+++ b/api/lottery.js
@@ -49,6 +49,14 @@ export function getActivityWinRecord(activityId) {
return request.get('/draw/activityWinRecord', { activityId })
}
+/**
+ * 历史抽奖活动列表
+ * 用于在中奖名单页面切换历史抽奖活动
+ */
+export function getDrawHistoryActivities() {
+ return request.get('/draw/historyActivities')
+}
+
/**
* 获取抽奖相关显示配置
*/
diff --git a/pages/order/OrderDetails/index.vue b/pages/order/OrderDetails/index.vue
index 63749dc..c142506 100644
--- a/pages/order/OrderDetails/index.vue
+++ b/pages/order/OrderDetails/index.vue
@@ -572,6 +572,36 @@
+
+
+
@@ -641,7 +671,14 @@ export default {
isGroup: false,
key: "",
loading: true,
- addressEditOrderId: ""
+ addressEditOrderId: "",
+ drawTicketPopupHandled: false,
+ drawTicketPopup: {
+ show: false,
+ orderId: '',
+ ticketCode: '',
+ drawTime: ''
+ }
};
},
computed: {
@@ -698,6 +735,7 @@ export default {
this.id = this.$yroute.query.id;
this.isGroup = Number(this.$yroute.query.isGroup || 0) === 1;
this.key = this.$yroute.query.key || '';
+ this.setDrawTicketPopupFromQuery()
this.getDetail();
}
},
@@ -710,6 +748,48 @@ export default {
},
methods: {
copyClipboard,
+ setDrawTicketPopupFromQuery() {
+ if (this.drawTicketPopupHandled) {
+ return
+ }
+ this.drawTicketPopupHandled = true
+ const drawTicketData = this.$yroute.query.drawTicketData
+ if (!drawTicketData) {
+ return
+ }
+ let result = {}
+ try {
+ result = JSON.parse(decodeURIComponent(drawTicketData))
+ } catch (e) {
+ result = {}
+ }
+ const hasTicket = Number(result.hasTicket || 0) === 1
+ const howPopup = Number(result.showPopup || 0) === 1
+ if (!hasTicket || !howPopup) {
+ return
+ }
+ this.drawTicketPopup = {
+ show: true,
+ orderId: this.id || this.$yroute.query.id || '',
+ ticketCode: result.ticketCode || '',
+ drawTime: result.drawTime || ''
+ }
+ },
+ closeDrawTicketPopup() {
+ this.drawTicketPopup.show = false
+ },
+ goHomeFromPopup() {
+ this.drawTicketPopup.show = false
+ uni.switchTab({
+ url: '/pages/home/index'
+ })
+ },
+ goTicketsFromPopup() {
+ this.drawTicketPopup.show = false
+ uni.navigateTo({
+ url: '/pkg-video/views/county-my-tickets'
+ })
+ },
getTime(type) {
const timeMap = {
1:"48小时内",
@@ -1432,4 +1512,213 @@ export default {
align-items: center;
justify-content: space-between;
}
+
+.draw-ticket-mask {
+ position: fixed;
+ inset: 0;
+ z-index: 1000;
+ background: rgba(0, 0, 0, 0.45);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 24rpx;
+ box-sizing: border-box;
+}
+
+.draw-ticket-popup {
+ width: 100%;
+ max-width: 640rpx;
+ background: #fff;
+ border-radius: 40rpx;
+ padding: 50rpx 40rpx 60rpx;
+ position: relative;
+ box-sizing: border-box;
+}
+
+.draw-ticket-close {
+ position: absolute;
+ top: 30rpx;
+ right: 30rpx;
+ width: 60rpx;
+ height: 60rpx;
+ border: 4rpx solid #111;
+ border-radius: 50%;
+ font-size: 50rpx;
+ color: #111;
+ line-height: 52rpx;
+ text-align: center;
+ font-weight: 500;
+ z-index: 10;
+}
+
+.draw-ticket-icon {
+ display: flex;
+ justify-content: center;
+ margin-top: 20rpx;
+}
+
+.ticket-icon-box {
+ width: 90rpx;
+ height: 70rpx;
+ border: 6rpx solid #111;
+ border-radius: 10rpx;
+ position: relative;
+ box-sizing: border-box;
+}
+
+.ticket-icon-box::before {
+ content: '';
+ position: absolute;
+ top: -16rpx;
+ left: 14rpx;
+ width: 50rpx;
+ height: 12rpx;
+ border-top: 6rpx solid #111;
+ border-left: 6rpx solid #111;
+ border-right: 6rpx solid #111;
+ border-radius: 6rpx 6rpx 0 0;
+ background: #fff;
+}
+
+.ticket-icon-check {
+ width: 36rpx;
+ height: 18rpx;
+ border-left: 6rpx solid #c23326;
+ border-bottom: 6rpx solid #c23326;
+ transform: rotate(-45deg);
+ position: absolute;
+ left: 20rpx;
+ top: 14rpx;
+}
+
+.draw-ticket-title {
+ font-size: 56rpx;
+ color: #222;
+ font-weight: 800;
+ text-align: center;
+ margin-top: 24rpx;
+ letter-spacing: 2rpx;
+}
+
+.ticket-card-container {
+ margin-top: 50rpx;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.ticket-badge {
+ background-color: #fff9eb;
+ border: 6rpx solid #111;
+ border-radius: 40rpx;
+ padding: 12rpx 40rpx;
+ font-size: 46rpx;
+ font-weight: 800;
+ color: #222;
+ position: relative;
+ z-index: 2;
+ margin-bottom: -36rpx;
+ letter-spacing: 2rpx;
+}
+
+.ticket-badge-arrow {
+ position: absolute;
+ bottom: -22rpx;
+ left: 50%;
+ transform: translateX(-50%);
+ width: 0;
+ height: 0;
+ border-left: 22rpx solid transparent;
+ border-right: 22rpx solid transparent;
+ border-top: 22rpx solid #111;
+}
+
+.ticket-badge-arrow::after {
+ content: '';
+ position: absolute;
+ top: -26rpx;
+ left: -16rpx;
+ border-left: 16rpx solid transparent;
+ border-right: 16rpx solid transparent;
+ border-top: 16rpx solid #fff9eb;
+}
+
+.ticket-card {
+ width: 100%;
+ background: #c23326;
+ border-radius: 36rpx;
+ padding: 70rpx 36rpx 40rpx;
+ box-sizing: border-box;
+ text-align: center;
+ position: relative;
+}
+
+.ticket-card-subtitle {
+ display: flex;
+ justify-content: center;
+}
+
+.ticket-card-subtitle-text {
+ color: #fff;
+ font-size: 34rpx;
+ font-weight: 700;
+ border: 2rpx solid #fff;
+ border-radius: 40rpx;
+ padding: 8rpx 50rpx;
+ letter-spacing: 4rpx;
+}
+
+.ticket-card-code-box {
+ background: #fff;
+ border-radius: 20rpx;
+ margin-top: 36rpx;
+ padding: 36rpx 0;
+}
+
+.ticket-card-code {
+ color: #c23326;
+ font-size: 72rpx;
+ font-weight: 800;
+ letter-spacing: 8rpx;
+}
+
+.ticket-card-time {
+ color: #fff;
+ font-size: 30rpx;
+ margin-top: 36rpx;
+ letter-spacing: 1rpx;
+}
+
+.draw-ticket-actions {
+ margin-top: 60rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: 20rpx;
+}
+
+.action-btn {
+ flex: 1;
+ height: 86rpx;
+ border-radius: 44rpx;
+ font-size: 32rpx;
+ font-weight: 600;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ white-space: nowrap;
+}
+
+.action-btn.home-btn {
+ color: #c23326;
+ border: 2rpx solid #c23326;
+ background: #fff;
+}
+
+.action-btn.primary {
+ color: #fff;
+ background: #c23326;
+}
diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue
index 2d25cd3..156ee2a 100644
--- a/pages/order/OrderSubmission/index.vue
+++ b/pages/order/OrderSubmission/index.vue
@@ -309,38 +309,6 @@
@close="pwdPopClose"
@finish="pwdPopFinish"
/>
-
-
-
@@ -428,13 +396,7 @@ export default {
pageKeyId: Object.freeze('orderConfirm'),
total: 0,
couponTitle: '',
- hasCoupon: false,
- drawTicketPopup: {
- show: false,
- orderId: '',
- ticketCode: '',
- drawTime: ''
- }
+ hasCoupon: false
}
},
computed: mapGetters(["userInfo", "storeItems"]),
@@ -783,13 +745,11 @@ export default {
icon: "none",
duration: 2000
})
- this.afterPaySuccess(orderId, () => {
+ this.afterPaySuccess(orderId, (drawTicketResult) => {
if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) {
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
- query: {
- id: orderId
- }
+ query: this.buildOrderDetailQuery(orderId, drawTicketResult)
})
} else {
this.$yrouter.replace({
@@ -891,6 +851,12 @@ export default {
// this.couponId = uni.getStorageSync('couponId') || 0
// this.couponTitle = item.couponTitle
},
+ buildOrderDetailQuery(orderId, drawTicketResult = {}) {
+ return {
+ id: orderId,
+ drawTicketData: encodeURIComponent(JSON.stringify(drawTicketResult || {}))
+ }
+ },
async afterPaySuccess(orderId, fallback) {
if (!orderId) {
fallback && fallback()
@@ -899,42 +865,13 @@ export default {
try {
const res = await getDrawTicketByOrder(orderId)
const result = (res && res.data) || {}
- const hasTicket = Number(result.hasTicket || 0) === 1
- const howPopup = Number(result.howPopup || 0) === 1
- if (hasTicket && howPopup) {
- this.drawTicketPopup = {
- show: true,
- orderId: orderId,
- ticketCode: result.ticketCode || '',
- drawTime: result.drawTime || ''
- }
- return
- }
+ fallback && fallback(result)
+ return
} catch (e) {
}
- fallback && fallback()
+ fallback && fallback({})
},
- closeDrawTicketPopup() {
- this.drawTicketPopup.show = false
- this.$yrouter.replace({
- path: "/pages/order/MyOrder/index",
- query: {
- type: 1
- }
- })
- },
- goHomeFromPopup() {
- this.drawTicketPopup.show = false
- uni.switchTab({
- url: '/pages/home/index'
- })
- },
- goTicketsFromPopup() {
- this.drawTicketPopup.show = false
- uni.navigateTo({
- url: '/pkg-video/views/county-my-tickets'
- })
- }
+
}
};
@@ -1112,212 +1049,4 @@ export default {
color: #999;
}
-.draw-ticket-mask {
- position: fixed;
- inset: 0;
- z-index: 1000;
- background: rgba(0, 0, 0, 0.45);
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 24rpx;
- box-sizing: border-box;
-}
-
-.draw-ticket-popup {
- width: 100%;
- max-width: 640rpx;
- background: #fff;
- border-radius: 40rpx;
- padding: 50rpx 40rpx 60rpx;
- position: relative;
- box-sizing: border-box;
-}
-
-.draw-ticket-close {
- position: absolute;
- top: 30rpx;
- right: 30rpx;
- width: 60rpx;
- height: 60rpx;
- border: 4rpx solid #111;
- border-radius: 50%;
- font-size: 50rpx;
- color: #111;
- line-height: 52rpx;
- text-align: center;
- font-weight: 500;
- z-index: 10;
-}
-
-.draw-ticket-icon {
- display: flex;
- justify-content: center;
- margin-top: 20rpx;
-}
-
-.ticket-icon-box {
- width: 90rpx;
- height: 70rpx;
- border: 6rpx solid #111;
- border-radius: 10rpx;
- position: relative;
- box-sizing: border-box;
-}
-
-.ticket-icon-box::before {
- content: '';
- position: absolute;
- top: -16rpx;
- left: 14rpx;
- width: 50rpx;
- height: 12rpx;
- border-top: 6rpx solid #111;
- border-left: 6rpx solid #111;
- border-right: 6rpx solid #111;
- border-radius: 6rpx 6rpx 0 0;
- background: #fff;
-}
-
-.ticket-icon-check {
- width: 36rpx;
- height: 18rpx;
- border-left: 6rpx solid #c23326;
- border-bottom: 6rpx solid #c23326;
- transform: rotate(-45deg);
- position: absolute;
- left: 20rpx;
- top: 14rpx;
-}
-
-.draw-ticket-title {
- font-size: 56rpx;
- color: #222;
- font-weight: 800;
- text-align: center;
- margin-top: 24rpx;
- letter-spacing: 2rpx;
-}
-
-.ticket-card-container {
- margin-top: 50rpx;
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
-}
-
-.ticket-badge {
- background-color: #fff9eb;
- border: 6rpx solid #111;
- border-radius: 40rpx;
- padding: 12rpx 40rpx;
- font-size: 46rpx;
- font-weight: 800;
- color: #222;
- position: relative;
- z-index: 2;
- margin-bottom: -36rpx;
- letter-spacing: 2rpx;
-}
-
-.ticket-badge-arrow {
- position: absolute;
- bottom: -22rpx;
- left: 50%;
- transform: translateX(-50%);
- width: 0;
- height: 0;
- border-left: 22rpx solid transparent;
- border-right: 22rpx solid transparent;
- border-top: 22rpx solid #111;
-}
-
-.ticket-badge-arrow::after {
- content: '';
- position: absolute;
- top: -26rpx;
- left: -16rpx;
- border-left: 16rpx solid transparent;
- border-right: 16rpx solid transparent;
- border-top: 16rpx solid #fff9eb;
-}
-
-.ticket-card {
- width: 100%;
- background: #c23326;
- border-radius: 36rpx;
- padding: 70rpx 36rpx 40rpx;
- box-sizing: border-box;
- text-align: center;
- position: relative;
-}
-
-.ticket-card-subtitle {
- display: flex;
- justify-content: center;
-}
-
-.ticket-card-subtitle-text {
- color: #fff;
- font-size: 34rpx;
- font-weight: 700;
- border: 2rpx solid #fff;
- border-radius: 40rpx;
- padding: 8rpx 50rpx;
- letter-spacing: 4rpx;
-}
-
-.ticket-card-code-box {
- background: #fff;
- border-radius: 20rpx;
- margin-top: 36rpx;
- padding: 36rpx 0;
-}
-
-.ticket-card-code {
- color: #c23326;
- font-size: 72rpx;
- font-weight: 800;
- letter-spacing: 8rpx;
-}
-
-.ticket-card-time {
- color: #fff;
- font-size: 30rpx;
- margin-top: 36rpx;
- letter-spacing: 1rpx;
-}
-
-.draw-ticket-actions {
- margin-top: 60rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- gap: 20rpx;
-}
-
-.action-btn {
- flex: 1;
- height: 86rpx;
- border-radius: 44rpx;
- font-size: 32rpx;
- font-weight: 600;
- display: flex;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- white-space: nowrap;
-}
-
-.action-btn.home-btn {
- color: #c23326;
- border: 2rpx solid #c23326;
- background: #fff;
-}
-
-.action-btn.primary {
- color: #fff;
- background: #c23326;
-}
diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue
index c360187..b7fc54f 100644
--- a/pages/shop/GoodsCon/index.vue
+++ b/pages/shop/GoodsCon/index.vue
@@ -1496,7 +1496,7 @@ export default {
q.dailyGoodsId = Number(this.activityId)
break
case "countyLottery":
- q.activityId = Number(this.activityId || 0)
+ q.drawActivityId = Number(this.activityId || 0)
break
}
postCartAdd(q).then(function (res) {
diff --git a/pkg-video/views/county-lottery-rules.vue b/pkg-video/views/county-lottery-rules.vue
index 5e6f2b7..25c5608 100644
--- a/pkg-video/views/county-lottery-rules.vue
+++ b/pkg-video/views/county-lottery-rules.vue
@@ -7,15 +7,14 @@
- 《香道汉平台》满额抽奖活动规则
{{ loading ? '规则加载中...' : '暂无活动规则' }}
@@ -90,7 +89,6 @@ export default {
width: 56rpx;
height: 56rpx;
border-radius: 8rpx;
- border: 2rpx solid #d8d8d8;
display: flex;
align-items: center;
justify-content: center;
diff --git a/pkg-video/views/county-lottery.vue b/pkg-video/views/county-lottery.vue
index d8a4070..949f728 100644
--- a/pkg-video/views/county-lottery.vue
+++ b/pkg-video/views/county-lottery.vue
@@ -50,21 +50,28 @@
实付满{{ buyThresholdText }}元即可获得抽奖码,定时统一开奖
-
-
+
+
-
+
-
- {{ item.prizeName }}
+
+ {{ prize.prizeName }}
@@ -152,16 +159,6 @@ export default {
prizeList() {
return this.activityInfo.prizePool || []
},
- chunkedPrizeList() {
- const list = this.prizeList
- if (!list || !list.length) return []
- const chunkSize = 3
- const result = []
- for (let i = 0; i < list.length; i += chunkSize) {
- result.push(list.slice(i, i + chunkSize))
- }
- return result
- },
activityGoodsList() {
const list = this.activityInfo.products || []
if (list.length > 0) {
@@ -331,7 +328,7 @@ export default {
uniqueId: currentSelect.unique || ''
}
if (this.activityId) {
- q.activityId = Number(this.activityId)
+ q.drawActivityId = Number(this.activityId)
}
postCartAdd(q).then(res => {
this.isOpen = false
@@ -608,7 +605,6 @@ export default {
.pool-list-group {
display: flex;
flex-wrap: nowrap;
- width: 100%;
}
.pool-item {
diff --git a/pkg-video/views/county-my-tickets.vue b/pkg-video/views/county-my-tickets.vue
index f3bb244..5cfbab7 100644
--- a/pkg-video/views/county-my-tickets.vue
+++ b/pkg-video/views/county-my-tickets.vue
@@ -75,11 +75,23 @@
{{ loading ? '加载中...' : '暂无抽奖码记录' }}
+
+