diff --git a/pagesActivity/myActivityDetail.vue b/pagesActivity/myActivityDetail.vue index 577884a..8b830d3 100644 --- a/pagesActivity/myActivityDetail.vue +++ b/pagesActivity/myActivityDetail.vue @@ -5,8 +5,15 @@ 累计进度 + + + 累计目标已完成,请耐心等待品牌方兑付奖励 + 品牌方已发起兑付奖励,快递单号:{{activity.expressNo || '暂无'}},请注意查收 + 累计活动已结束,兑付时间:{{activity.claimTime || '-'}} + + - + 剩余累计目标 {{activity.remainingBeerCount || 0}} @@ -15,7 +22,7 @@ - + {{remainingDays}} @@ -154,22 +161,29 @@ 活动状态 - {{!reward ? '累计中' : (reward.rewardStatus == 0 ? '待确认' : '已确认')}} + {{activity.activityStatus == 0 ? '未参与' : + activity.activityStatus == 1 ? '累计中' : + activity.activityStatus == 2 ? '待兑付' : + activity.activityStatus == 3 ? '待确认' : '已完成'}} - - {{!reward ? '扫码累计' : (reward.rewardStatus == 0 ? '确认兑付完成' : '兑付已确认')}} + @click="activity.activityStatus == 1 ? toScan() : + activity.activityStatus == 3 ? confirmPay() : null"> + + {{activity.activityStatus == 0 ? '未参与' : + activity.activityStatus == 1 ? '扫码累计' : + activity.activityStatus == 2 ? '累计目标已完成' : + activity.activityStatus == 3 ? '确认兑付完成' : '已完成'}} @@ -299,18 +313,17 @@ content: '确认兑付完成?', success: (res) => { if (res.confirm) { - confirmPayApi(this.reward.id).then(res => { uni.showToast({ title: '确认成功', icon: 'success', }) - this.init() + // 更新活动状态为4(已完成) + this.activity.activityStatus = 4 }) } }, }) - }, toScan() { uni.switchTab({ @@ -392,6 +405,21 @@ padding: 32rpx; } + .status-tip { + text-align: center; + margin-bottom: 32rpx; + padding: 24rpx; + background: rgba(25, 54, 122, 0.05); + border-radius: 12rpx; + + .tip-text { + font-size: 28rpx; + color: #19367A; + line-height: 1.5; + display: block; + } + } + .target-display { text-align: center; margin-bottom: 32rpx; diff --git a/pagesActivity/scanResult.vue b/pagesActivity/scanResult.vue index 0e23a5a..2636265 100644 --- a/pagesActivity/scanResult.vue +++ b/pagesActivity/scanResult.vue @@ -5,36 +5,37 @@ - - - - - - - - {{ beer.beerName }} - {{ beer.brandName }} - - - 生产日期: - {{ beer.createTime ? beer.createTime.split(' ')[0] : '' }} - - - 净含量: - {{ beer.netContent }} + + + + + 识别产品 + + + + + + + + + + {{ beer.beerName }} + {{ beer.brandName }} + + {{ beer.beerOverallRating || '4.9' }} + {{ beer.beerReviewsCount || '20' }} reviews @@ -53,181 +54,433 @@ @@ -284,10 +537,13 @@ longitude: this.longitude }).then(res => { console.log(res.data) + this.showError = false // 重置错误状态 + this.errorType = null // 重置错误类型 this.info = res.data this.beer = res.data.beer this.activity = res.data.activity || [] this.platformActivity = res.data.platformActivity || [] + this.activitySum = 0 // 重置活动数量 if (this.activity && this.activity.length > 0) { this.activitySum += this.activity.length this.activityId = this.activity[0].id @@ -298,12 +554,13 @@ } }).catch(err => { console.error('获取二维码信息失败:', err) + this.showError = true if (err.code === 500 && err.msg === '请在酒吧附近100米范围内扫码') { - this.showError = true this.errorType = 'location' } else if (err.code === 500 && err.msg.includes('已失效')) { this.errorType = 'expired' } else { + this.errorType = 'expired' uni.showToast({ title: err.msg || '获取信息失败', icon: 'none' @@ -403,128 +660,147 @@ padding: 0rpx 26rpx 60rpx; .error-page { + padding: 120rpx 32rpx; display: flex; flex-direction: column; align-items: center; - padding-top: 120rpx; - + .status-icon { width: 160rpx; height: 160rpx; - margin-bottom: 40rpx; + margin-bottom: 32rpx; } - + .status-title { font-size: 36rpx; - color: #3D3D3D; + color: #333333; font-weight: 600; margin-bottom: 16rpx; + text-align: center; } - + .status-desc { font-size: 28rpx; - color: #5F5F63; - font-weight: 400; - margin-bottom: 12rpx; + color: #666666; + margin-bottom: 8rpx; text-align: center; + } + } + + .product-section { + margin-top: 48rpx; + padding: 0 32rpx; + + .section-header { + display: flex; + align-items: center; + gap: 12rpx; + margin-bottom: 24rpx; - &:last-of-type { - margin-bottom: 60rpx; + .section-icon { + width: 40rpx; + height: 40rpx; + } + + text { + font-size: 32rpx; + color: #333333; + font-weight: 500; } } - - .product-card { - width: 100%; - background: #FFFFFF; - border-radius: 24rpx; - box-shadow: 0px 8rpx 24rpx rgba(0, 0, 0, 0.08); - padding: 36rpx; - margin-bottom: 40rpx; + } + + .product-card { + background: #FFFFFF; + border-radius: 16rpx; + padding: 24rpx; + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04); + margin-bottom: 32rpx; + + .product-content { + display: flex; + gap: 24rpx; - .product-content { - display: flex; + .product-image { + width: 160rpx; + height: 240rpx; + border-radius: 12rpx; + overflow: hidden; + flex-shrink: 0; - .product-image { - margin-right: 28rpx; - - .cover { - width: 200rpx; - height: 300rpx; - border-radius: 16rpx; - box-shadow: 0px 8rpx 16rpx rgba(0, 0, 0, 0.12); - } + .cover { + width: 100%; + height: 100%; + object-fit: cover; + } + } + + .product-info { + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; + + .product-name { + font-size: 32rpx; + color: #333333; + font-weight: 600; + margin-bottom: 12rpx; } - .product-info { - flex: 1; + .product-brand { + font-size: 28rpx; + color: #666666; + margin-bottom: 16rpx; + } + + .product-details { + margin-bottom: 16rpx; - .product-name { - font-size: 40rpx; - color: #141415; - font-weight: 600; - margin-bottom: 16rpx; - } - - .product-brand { - font-size: 30rpx; - color: #5F5F63; - font-weight: 500; - margin-bottom: 16rpx; - } - - .product-details { - margin-bottom: 28rpx; + .detail-item { + display: flex; + align-items: center; + margin-bottom: 8rpx; - .detail-item { - display: flex; - margin-bottom: 12rpx; - font-size: 28rpx; - - .detail-label { - color: #3D3D3D; - margin-right: 8rpx; - font-weight: 500; - } - - .detail-value { - color: #5F5F63; - font-weight: 400; - } + .detail-label { + font-size: 26rpx; + color: #999999; + margin-right: 8rpx; + } + + .detail-value { + font-size: 26rpx; + color: #333333; } } } - } - } - - .error-action { - width: 100%; - padding: 0 40rpx; - margin-top: 40rpx; - - .action-btn { - display: flex; - align-items: center; - justify-content: center; - width: 100%; - height: 96rpx; - background: #D42E78; - border-radius: 12rpx; - font-size: 28rpx; - color: #FFFFFF; - font-weight: 500; - box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.1); - - .btn-icon { - width: 40rpx; - height: 40rpx; - margin-right: 12rpx; - filter: brightness(0) invert(1); + + .product-rating { + display: flex; + align-items: center; + gap: 12rpx; + + .rating-stars { + display: flex; + align-items: center; + gap: 8rpx; + + .rating-value { + font-size: 26rpx; + color: #333333; + font-weight: 500; + } + } + + .rating-count { + font-size: 24rpx; + color: #999999; + } } } } } - /* 状态提示样式 */ .lq-state-box { display: flex; flex-direction: column; @@ -587,96 +863,6 @@ } } - /* 产品卡片样式 */ - .product-card { - background: #FFFFFF; - border-radius: 24rpx; - box-shadow: 0px 8rpx 24rpx rgba(0, 0, 0, 0.08); - padding: 36rpx; - margin-bottom: 40rpx; - - .product-content { - display: flex; - - .product-image { - margin-right: 28rpx; - - .cover { - width: 200rpx; - height: 300rpx; - border-radius: 16rpx; - box-shadow: 0px 8rpx 16rpx rgba(0, 0, 0, 0.12); - } - } - - .product-info { - flex: 1; - - .product-name { - font-size: 40rpx; - color: #141415; - font-weight: 600; - margin-bottom: 16rpx; - } - - .product-brand { - font-size: 30rpx; - color: #5F5F63; - font-weight: 600; - margin-bottom: 16rpx; - } - - .product-details { - margin-bottom: 28rpx; - - .detail-item { - display: flex; - margin-bottom: 12rpx; - font-size: 28rpx; - - .detail-label { - color: #3D3D3D; - margin-right: 8rpx; - font-weight: 500; - } - - .detail-value { - color: #5F5F63; - font-weight: 400; - } - } - } - - .product-rating { - display: flex; - align-items: center; - - .rating-stars { - display: flex; - align-items: center; - background: #F5F5F5; - padding: 8rpx 16rpx; - border-radius: 16rpx; - margin-right: 16rpx; - - .rating-value { - font-size: 28rpx; - color: #5F5F63; - font-weight: 400; - margin-left: 8rpx; - } - } - - .rating-count { - font-size: 28rpx; - color: #5F5F63; - font-weight: 400; - } - } - } - } - } - /* 福利卡片样式 */ .benefit-card { background: #FFFFFF; @@ -766,34 +952,62 @@ margin-right: 28rpx; box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.05); - .brand-logo { + .brand-logo-container { width: 140rpx; height: 140rpx; border-radius: 16rpx; margin-bottom: 20rpx; + overflow: hidden; + + .brand-logo { + width: 100%; + height: 100%; + object-fit: cover; + } + } + + .brand-logo-placeholder { + width: 140rpx; + height: 140rpx; + border-radius: 16rpx; + margin-bottom: 20rpx; + background: #EEEEEE; + display: flex; + align-items: center; + justify-content: center; + border: 2rpx dashed #CCCCCC; + + .placeholder-text { + font-size: 24rpx; + color: #999999; + } } .progress-info { + display: flex; + flex-direction: column; + align-items: center; text-align: center; .progress-label { + margin-top: 12rpx; font-size: 24rpx; color: #9E9E9E; font-weight: 400; - margin-bottom: 8rpx; + margin-bottom: 32rpx; } .progress-value { .completed { font-size: 32rpx; color: #DE3C4B; - font-weight: 500; + font-weight: 600; } .remaining { font-size: 40rpx; color: #DE3C4B; - font-weight: 500; + font-weight: 600; } } } @@ -802,22 +1016,54 @@ .activity-right { flex: 1; - .activity-name { - font-size: 32rpx; - font-weight: 600; - color: #0B0E26; + .activity-header { + display: flex; + align-items: center; + justify-content: space-between; margin-bottom: 20rpx; + + .activity-name { + font-size: 32rpx; + font-weight: 600; + color: #0B0E26; + } + + .activity-tag { + font-size: 24rpx; + color: #FFFFFF; + background: #DE3C4B; + padding: 4rpx 12rpx; + border-radius: 8rpx; + } } - .activity-detail { - font-size: 26rpx; - color: #0B0E26; - font-weight: 400; - margin-bottom: 16rpx; + .activity-details { + margin-bottom: 20rpx; - .highlight { - color: #DE3C4B; - font-weight: 500; + .detail-row { + display: flex; + align-items: center; + margin-bottom: 12rpx; + + .detail-label { + font-size: 26rpx; + color: #999999; + margin-right: 8rpx; + flex-shrink: 0; + } + + .detail-value { + font-size: 26rpx; + color: #333333; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + .highlight { + color: #DE3C4B; + font-weight: 500; + } + } } } @@ -839,6 +1085,22 @@ } } + .beer-scroll-placeholder { + width: 100%; + height: 144rpx; + background: #F5F5F5; + border-radius: 8rpx; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 20rpx; + + .placeholder-text { + font-size: 24rpx; + color: #999999; + } + } + .reward-info { display: flex; align-items: center; @@ -859,6 +1121,11 @@ font-weight: 400; } } + + .error-text { + color: #DE3C4B; + font-style: italic; + } } } } diff --git a/static/information.svg b/static/information.svg new file mode 100644 index 0000000..1c3a03a --- /dev/null +++ b/static/information.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/tick-circle@2x.png b/static/tick-circle@2x.png deleted file mode 100644 index aefe277..0000000 Binary files a/static/tick-circle@2x.png and /dev/null differ