From 59565871d95161ee0e5cc31200ed4c8db455ae52 Mon Sep 17 00:00:00 2001 From: LinCyJang Date: Thu, 7 May 2026 00:10:09 +0800 Subject: [PATCH] =?UTF-8?q?Task=EF=BC=9A=E6=8A=BD=E5=A5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/index.vue | 2 +- pages/shop/GoodsCon/index.vue | 10 +- pkg-video/views/county-claim-address.vue | 28 ++++-- pkg-video/views/county-lottery.vue | 41 ++++++-- pkg-video/views/county-my-tickets.vue | 106 ++++++++++++++++++-- pkg-video/views/county-winners.vue | 6 +- pkg_user/views/gift/gift.vue | 120 ++++++++++++++++++++++- 7 files changed, 286 insertions(+), 27 deletions(-) diff --git a/pages/home/index.vue b/pages/home/index.vue index 7096b64..f7f9094 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -1645,7 +1645,7 @@ export default { (data.isOldUserPopupShow || 0) && data.oldUserPopup && data.oldUserPopup.image && - (data.lotteryCanDraw || false) + (data.lotteryCanDraw || false) ) this.isDrawPosterVisible = hasDrawPoster this.isOldUser = !hasDrawPoster && this.canShowOldPoster diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index 9b68214..54060a5 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -1514,9 +1514,17 @@ export default { } if(news === 2) { const coupId = that.couponId ? that.couponId : (that.couponList.usable[0] && that.couponList.usable[0].id || '') + let giftUrl = '/pkg_user/views/gift/gift?cartId=' + res.data.cartId + if (that.storeInfo.discount) { + giftUrl += '&discount=' + that.storeInfo.discount + } + if (that.source === 'countyLottery') { + giftUrl += '&from=countyLottery' + giftUrl += '&drawActivityId=' + Number(that.activityId || 0) + } uni.navigateTo({ // + '&couponId=' + coupId - url: '/pkg_user/views/gift/gift?cartId=' + res.data.cartId + (that.storeInfo.discount ? '&discount=' + that.storeInfo.discount : '') + url: giftUrl }) } if(news === 0) { diff --git a/pkg-video/views/county-claim-address.vue b/pkg-video/views/county-claim-address.vue index b3b5194..03bfed5 100644 --- a/pkg-video/views/county-claim-address.vue +++ b/pkg-video/views/county-claim-address.vue @@ -99,14 +99,14 @@ - + - × + × 提交成功 - 奖品将在7个工作日内寄出 + 奖品将在{{ shipDayText }}个工作日内寄出 返回 查看 @@ -150,6 +150,8 @@ export default { }, showRealnamePopup: false, showSubmitSuccessPopup: false, + shipDay: 7, + prizeOrderId: '', userInfo: {}, realnameStatus: 0, waitSubmitAfterRealname: false, @@ -159,6 +161,11 @@ export default { computed: { prizeImage() { return this.form.prizeImage || '' + }, + shipDayText() { + const day = Number(this.shipDay) + if (!day || Number.isNaN(day) || day < 1) return 7 + return day } }, onLoad(options) { @@ -273,6 +280,8 @@ export default { return } await claimCoupon(ticketId) + this.shipDay = 7 + this.prizeOrderId = '' this.showSubmitSuccessPopup = true }, async submitPhysicalClaim() { @@ -295,7 +304,10 @@ export default { } } const addressId = await this.createAddress() - await claimPrize(ticketId, addressId) + const res = await claimPrize(ticketId, addressId) + const data = (res && res.data) || {} + this.shipDay = Number(data.shipDay || 0) || 7 + this.prizeOrderId = String(data.orderId || '') this.waitSubmitAfterRealname = false this.showSubmitSuccessPopup = true } catch (e) { @@ -398,12 +410,14 @@ export default { }, confirmSuccess() { this.showSubmitSuccessPopup = false - uni.navigateBack() + uni.redirectTo({ + url: '/pkg-video/views/county-my-tickets' + }) }, goMyTicket() { this.showSubmitSuccessPopup = false - uni.navigateTo({ - url: '/pkg-video/views/county-my-tickets' + uni.redirectTo({ + url: `/pages/order/OrderDetails/index?id=${this.prizeOrderId}` }) } } diff --git a/pkg-video/views/county-lottery.vue b/pkg-video/views/county-lottery.vue index b57b16c..26b3fdb 100644 --- a/pkg-video/views/county-lottery.vue +++ b/pkg-video/views/county-lottery.vue @@ -99,8 +99,14 @@ :key="index" class="goods-item" > + - {{ item.name }} + {{ item.storeName }} ¥{{ item.price }} @@ -114,7 +120,7 @@ :attr="attr" :cartNum="cart_num" :showOk="true" - okText="立即下单" + :okText="currentGoodsItem && Number(currentGoodsItem.isGiftCard) === 1 ? '送给朋友' : '立即下单'" @changeFun="changeFun" @ok="submitFromSku()" /> @@ -155,7 +161,9 @@ export default { time: '--:--:--' }, countdownTimer: null, - currentSwiperIndex: 0 + currentSwiperIndex: 0, + webUrl: this.$VUE_APP_RESOURCES_URL, + currentGoodsItem: null } }, computed: { @@ -173,15 +181,18 @@ export default { return list.map(item => ({ id: item.productId || item.id || 0, image: item.productImage || item.image || item.pic || '', - name: item.productName || item.name || item.prizeName || '', - price: item.productPrice || item.price || item.salePrice || 0 + storeName: item.storeName || '', + productName: item.productName || item.name || item.prizeName || '', + price: item.productPrice || item.price || item.salePrice || 0, + isGiftCard: Number(item.isGiftCard || 0) })) } return this.prizeList.map(item => ({ id: item.productId || 0, image: item.prizeImage || '', name: item.prizeName || '', - price: item.productPrice || item.price || 0 + price: item.productPrice || item.price || 0, + isGiftCard: Number(item.isGiftCard || 0) })) }, winnerSortedList() { @@ -329,11 +340,13 @@ export default { }, openGoodsSku(item) { if (!item.id) return + this.currentGoodsItem = item this.addToCart(item) }, submitFromSku() { const productSelect = this.getAttrItemData(this.attrValue) const currentSelect = productSelect || this.attr.productSelect || {} + const isGiftOrder = Number(this.currentGoodsItem && this.currentGoodsItem.isGiftCard) === 1 const stock = Number(currentSelect.stock || 0) const hasNo = (this.attr.productAttr.length && !productSelect && this.isOpen) || stock <= 0 if (hasNo) { @@ -360,6 +373,12 @@ export default { this.cart_num = 1 const cartId = (res.data && res.data.cartId) || '' if (!cartId) return + if (isGiftOrder) { + uni.navigateTo({ + url: `/pkg_user/views/gift/gift?cartId=${cartId}&from=countyLottery&drawActivityId=${this.activityId || 0}` + }) + return + } uni.navigateTo({ url: `/pages/order/OrderSubmission/index?id=${cartId}` }) @@ -786,6 +805,16 @@ export default { width: 316rpx; background: #fff; margin-bottom: 30rpx; + position: relative; + + .goods-gift-tag { + position: absolute; + left: 0; + top: 0; + width: 120rpx; + z-index: 2; + pointer-events: none; + } .goods-image { width: 100%; diff --git a/pkg-video/views/county-my-tickets.vue b/pkg-video/views/county-my-tickets.vue index b3867b4..c5693df 100644 --- a/pkg-video/views/county-my-tickets.vue +++ b/pkg-video/views/county-my-tickets.vue @@ -25,9 +25,31 @@ --> - - {{ summaryText }} - 查看全部 + + 暂时无人中奖 + + 恭喜 {{ winnerSortedList[0].name }} + 在第 {{ winnerSortedList[0].periodNo }} 期抽奖活动中获得 + {{ winnerSortedList[0].prizeName }} + + + + + 恭喜 {{ winner.name }} + 在第 {{ winner.periodNo }} 期抽奖活动中获得 + {{ winner.prizeName }} + + + + 查看全部 @@ -56,7 +78,7 @@