Feat:抽奖2.0(部分接口未调通)
This commit is contained in:
+54
-4
@@ -3,15 +3,57 @@ import request from '@/utils/request'
|
||||
/**
|
||||
* 抽奖活动信息
|
||||
* */
|
||||
export function getDetail() {
|
||||
return request.get('/lottery/dice/detail')
|
||||
export function getDetail(params = {}) {
|
||||
return request.get('/lottery/dice/detail', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖
|
||||
* */
|
||||
export function getPrize() {
|
||||
return request.post('/lottery/dice/draw')
|
||||
export function getPrize(data = {}) {
|
||||
return request.post('/lottery/dice/draw', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 县域抽奖活动详情
|
||||
* @param activityId 抽奖活动ID
|
||||
*/
|
||||
export function getDrawActivityInfo(activityId) {
|
||||
return request.get('/draw/activityInfo', { activityId })
|
||||
}
|
||||
|
||||
/**
|
||||
* 县域抽奖活动规则
|
||||
*/
|
||||
export function getDrawRuleConfig() {
|
||||
return request.get('/draw/ruleConfig')
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的抽奖码列表
|
||||
* @param status 抽奖码状态(0:等待开奖, 1:已中奖, 2:未中奖, -1:已失效)
|
||||
*/
|
||||
export function getDrawMyTickets(status) {
|
||||
const params = {}
|
||||
if (status !== undefined && status !== null && status !== '') {
|
||||
params.status = status
|
||||
}
|
||||
return request.get('/draw/myTickets', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖活动中奖记录
|
||||
* @param activityId 抽奖活动ID
|
||||
*/
|
||||
export function getActivityWinRecord(activityId) {
|
||||
return request.get('/draw/activityWinRecord', { activityId })
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取抽奖相关显示配置
|
||||
*/
|
||||
export function getDrawConfig() {
|
||||
return request.get('/draw/config')
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,3 +78,11 @@ export function getLogs(page = 1, limit = 10) {
|
||||
export function getLotteryShareInfo() {
|
||||
return request.get('/lottery/shareImage')
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单支付完成后检查抽奖码
|
||||
* @param orderId 订单号
|
||||
*/
|
||||
export function getDrawTicketByOrder(orderId) {
|
||||
return request.get('/draw/ticketByOrder', { orderId })
|
||||
}
|
||||
|
||||
+24
@@ -401,11 +401,35 @@
|
||||
"navigationBarTitleText": "抽奖"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/county-lottery",
|
||||
"style": {
|
||||
"navigationBarTitleText": "抽奖"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/lottery-log",
|
||||
"style": {
|
||||
"navigationBarTitleText": "抽奖记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/county-lottery-rules",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/county-my-tickets",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/county-winners",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+67
-2
@@ -346,10 +346,34 @@
|
||||
<!-- v9 老用户弹窗 -->
|
||||
|
||||
<u-popup
|
||||
v-if="isOldUserPopupShow"
|
||||
v-if="drawEntranceConfig.homePosterEnable"
|
||||
mode="center"
|
||||
bgColor="transparent"
|
||||
:show="isOldUser && oldUserPopup.image && lotteryCanDraw"
|
||||
:show="isDrawPosterVisible"
|
||||
>
|
||||
<view class="popup-old-user flex flex-col ai-center">
|
||||
<image
|
||||
:src="drawEntranceConfig.homePosterImage"
|
||||
class="main"
|
||||
mode="scaleToFill"
|
||||
@click="tapDrawPoster()"
|
||||
/>
|
||||
<view
|
||||
class="icon-box flex jc-center ai-center"
|
||||
@click="closeDrawPoster()"
|
||||
>
|
||||
<image
|
||||
:src="webUrl+'/20230608112219219303.png'"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup
|
||||
v-if="canShowOldPoster"
|
||||
mode="center"
|
||||
bgColor="transparent"
|
||||
:show="isOldUser"
|
||||
>
|
||||
<view class="popup-old-user flex flex-col ai-center">
|
||||
<image
|
||||
@@ -431,6 +455,8 @@ export default {
|
||||
return {
|
||||
isFirstLoad: true,
|
||||
isOldUserPopupShow: 0,
|
||||
isDrawPosterVisible: false,
|
||||
canShowOldPoster: false,
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
// 状态栏高度
|
||||
statusBarHeight: 20,
|
||||
@@ -458,6 +484,8 @@ export default {
|
||||
// 老用户弹窗
|
||||
isOldUser: true,
|
||||
oldUserPopup: {},
|
||||
// 首页抽奖弹窗入口
|
||||
drawEntranceConfig: {},
|
||||
// 民宿专题轮播
|
||||
contentHomestay: [],
|
||||
// 新品推荐
|
||||
@@ -1492,6 +1520,7 @@ export default {
|
||||
_this.bastLeftList = []
|
||||
_this.bastRightList = []
|
||||
_this.lotteryCanDraw = data.lotteryCanDraw || false
|
||||
_this.initPosterPopupState(data)
|
||||
if (data.bastList) {
|
||||
for (let i = 0; i < data.bastList.length; i++) {
|
||||
if (i % 2 === 0) {
|
||||
@@ -1544,6 +1573,7 @@ export default {
|
||||
this.$set(this, 'isOldUserPopupShow', data.isOldUserPopupShow || 0)
|
||||
this.indexVideo = data.indexVideo ? data.indexVideo.videoUrl : ''
|
||||
this.lotteryCanDraw = data.lotteryCanDraw || false
|
||||
this.initPosterPopupState(data)
|
||||
if (data.bastList) {
|
||||
const newBastLeftList = []
|
||||
const newBastRightList = []
|
||||
@@ -1606,6 +1636,41 @@ export default {
|
||||
changeOldPopup(state) {
|
||||
this.isOldUser = state
|
||||
},
|
||||
initPosterPopupState(data = {}) {
|
||||
const drawEntranceConfig = data.drawEntranceConfig || {}
|
||||
this.$set(this, 'drawEntranceConfig', drawEntranceConfig)
|
||||
const hasDrawPoster = Number(drawEntranceConfig.homePosterEnable) === 1
|
||||
this.canShowOldPoster = Boolean(
|
||||
(data.isOldUserPopupShow || 0) &&
|
||||
data.oldUserPopup &&
|
||||
data.oldUserPopup.image &&
|
||||
(data.lotteryCanDraw || false)
|
||||
)
|
||||
this.isDrawPosterVisible = hasDrawPoster
|
||||
this.isOldUser = !hasDrawPoster && this.canShowOldPoster
|
||||
},
|
||||
showNextPoster() {
|
||||
if (!this.isDrawPosterVisible && this.canShowOldPoster) {
|
||||
this.isOldUser = true
|
||||
}
|
||||
},
|
||||
closeDrawPoster() {
|
||||
this.isDrawPosterVisible = false
|
||||
this.showNextPoster()
|
||||
},
|
||||
goDrawLotteryPage() {
|
||||
const config = this.drawEntranceConfig || {}
|
||||
const linkType = Number(config.homePosterLinkType) || 1
|
||||
const activityId = Number(config.homePosterAreaId) || 0
|
||||
uni.navigateTo({
|
||||
url: `/pkg-video/views/county-lottery?linkType=${linkType}&activityId=${4}`
|
||||
})
|
||||
},
|
||||
tapDrawPoster() {
|
||||
this.isDrawPosterVisible = false
|
||||
this.goDrawLotteryPage()
|
||||
this.showNextPoster()
|
||||
},
|
||||
// 民宿专题
|
||||
goHomeStay(item) {
|
||||
if (item.type === 1) {
|
||||
|
||||
@@ -309,6 +309,38 @@
|
||||
@close="pwdPopClose"
|
||||
@finish="pwdPopFinish"
|
||||
/>
|
||||
<view v-if="drawTicketPopup.show" class="draw-ticket-mask" @touchmove.stop.prevent>
|
||||
<view class="draw-ticket-popup">
|
||||
<view class="draw-ticket-close" @click="closeDrawTicketPopup">×</view>
|
||||
<view class="draw-ticket-icon">
|
||||
<view class="ticket-icon-box">
|
||||
<view class="ticket-icon-check"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="draw-ticket-title">支付成功</view>
|
||||
|
||||
<view class="ticket-card-container">
|
||||
<view class="ticket-badge">
|
||||
<text>恭喜获得抽奖码!</text>
|
||||
<view class="ticket-badge-arrow"></view>
|
||||
</view>
|
||||
<view class="ticket-card">
|
||||
<view class="ticket-card-subtitle">
|
||||
<text class="ticket-card-subtitle-text">您的专属抽奖码</text>
|
||||
</view>
|
||||
<view class="ticket-card-code-box">
|
||||
<text class="ticket-card-code">{{ drawTicketPopup.ticketCode }}</text>
|
||||
</view>
|
||||
<view class="ticket-card-time" v-if="drawTicketPopup.drawTime">开奖时间:{{ drawTicketPopup.drawTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="draw-ticket-actions">
|
||||
<view class="action-btn home-btn" @click="goHomeFromPopup">返回首页</view>
|
||||
<view class="action-btn primary" @click="goTicketsFromPopup">查看我的抽奖码</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -328,6 +360,7 @@ import {isNullOrEmpty, isWeixin} from "@/utils"
|
||||
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue'
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue'
|
||||
import CouponsPopup from "@/components/CouponsPopup.vue"
|
||||
import { getDrawTicketByOrder } from '@/api/lottery'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
const NAME = "OrderSubmission"
|
||||
@@ -395,7 +428,13 @@ export default {
|
||||
pageKeyId: Object.freeze('orderConfirm'),
|
||||
total: 0,
|
||||
couponTitle: '',
|
||||
hasCoupon: false
|
||||
hasCoupon: false,
|
||||
drawTicketPopup: {
|
||||
show: false,
|
||||
orderId: '',
|
||||
ticketCode: '',
|
||||
drawTime: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: mapGetters(["userInfo", "storeItems"]),
|
||||
@@ -707,6 +746,7 @@ export default {
|
||||
createOrder(this.orderGroupInfo.orderKey, params).then(res => {
|
||||
uni.hideLoading()
|
||||
const data = res.data
|
||||
const orderId = data && data.result ? data.result.orderId : ''
|
||||
switch (data.status) {
|
||||
case "ORDER_EXIST":
|
||||
case "EXTEND_ORDER":
|
||||
@@ -718,7 +758,7 @@ export default {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: {
|
||||
id: data.result.orderId
|
||||
id: orderId
|
||||
}
|
||||
})
|
||||
break;
|
||||
@@ -743,11 +783,12 @@ export default {
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
})
|
||||
this.afterPaySuccess(orderId, () => {
|
||||
if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: {
|
||||
id: data.result.orderId
|
||||
id: orderId
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -758,6 +799,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "WECHAT_H5_PAY":
|
||||
// H5支付
|
||||
@@ -770,7 +812,16 @@ export default {
|
||||
break;
|
||||
case "WECHAT_PAY":
|
||||
// 小程序支付
|
||||
weappPay(data.result.jsConfig).finally(() => {
|
||||
weappPay(data.result.jsConfig).then(() => {
|
||||
this.afterPaySuccess(orderId, () => {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/MyOrder/index",
|
||||
query: {
|
||||
type: 1
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/MyOrder/index",
|
||||
query: {
|
||||
@@ -781,13 +832,22 @@ export default {
|
||||
break;
|
||||
case "WECHAT_APP_PAY":
|
||||
// APP支付
|
||||
weappPay(data.result.jsConfig).finally(() => {
|
||||
weappPay(data.result.jsConfig).then(() => {
|
||||
this.afterPaySuccess(orderId, () => {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/MyOrder/index",
|
||||
query: {
|
||||
type: 1
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/MyOrder/index",
|
||||
query: {
|
||||
type: 1
|
||||
}
|
||||
})
|
||||
})
|
||||
break;
|
||||
}
|
||||
@@ -830,6 +890,50 @@ export default {
|
||||
this.computedPrice(1)
|
||||
// this.couponId = uni.getStorageSync('couponId') || 0
|
||||
// this.couponTitle = item.couponTitle
|
||||
},
|
||||
async afterPaySuccess(orderId, fallback) {
|
||||
if (!orderId) {
|
||||
fallback && fallback()
|
||||
return
|
||||
}
|
||||
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
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
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'
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1007,4 +1111,213 @@ export default {
|
||||
padding: 20rpx 0 0 0;
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -215,6 +215,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="drawConfig.myTicketImageEnable === 1 && drawConfig.myTicketImage"
|
||||
class="my-ticket-entry"
|
||||
@click="goMyTicketList"
|
||||
>
|
||||
<image :src="drawConfig.myTicketImage" mode="widthFix" class="img" />
|
||||
</view>
|
||||
<!-- 我的服务开始 -->
|
||||
<view class="myService" style="margin-top: 30rpx !important;">
|
||||
<view class="title acea-row row-middle">
|
||||
@@ -301,6 +308,7 @@ import {
|
||||
noticeList,
|
||||
getUserCenterBanner
|
||||
} from "@/api/user"
|
||||
import { getDrawConfig } from '@/api/lottery'
|
||||
import {isWeixin} from "@/utils"
|
||||
import cookie from "@/utils/store/cookie"
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
@@ -389,6 +397,10 @@ export default {
|
||||
],
|
||||
bannerBgUrl: '',
|
||||
userCenterBannerUrl: '',
|
||||
drawConfig: {
|
||||
myTicketImage: '',
|
||||
myTicketImageEnable: 0
|
||||
},
|
||||
pageKeyId: Object.freeze('userIndex'),
|
||||
nowrap: true,
|
||||
// 是否已登录
|
||||
@@ -403,6 +415,7 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
uni.$emit('updateUnreadMessageCount')
|
||||
this.getDrawConfigReq()
|
||||
if (this.$store.getters.token) {
|
||||
this.isNoLogin = false
|
||||
uni.showLoading({
|
||||
@@ -429,6 +442,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['updateAuthorizationPage']),
|
||||
getDrawConfigReq() {
|
||||
getDrawConfig().then(res => {
|
||||
if (res && res.data) {
|
||||
this.drawConfig = {
|
||||
myTicketImage: res.data.myTicketImage || '',
|
||||
myTicketImageEnable: Number(res.data.myTicketImageEnable) || 0
|
||||
}
|
||||
}
|
||||
}).catch(() => {})
|
||||
},
|
||||
goMyTicketList() {
|
||||
this.linkTo('/pkg-video/views/county-my-tickets')
|
||||
},
|
||||
// 新增方法:计算文本像素长度
|
||||
getTextWidth() {
|
||||
this.$nextTick(() => {
|
||||
@@ -681,6 +707,14 @@ export default {
|
||||
}
|
||||
.my-wrapper {
|
||||
padding: 30upx;
|
||||
.my-ticket-entry {
|
||||
margin-top: 30rpx;
|
||||
.img {
|
||||
width: 100%;
|
||||
border-radius: 24rpx;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
&.wrapper {
|
||||
padding: 0 0 30rpx 0 !important;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<view class="county-lottery-rules-page">
|
||||
<view class="custom-header" :style="{ paddingTop: `${statusBarHeight}px` }">
|
||||
<view class="header-inner">
|
||||
<view class="header-back" @click="goBack">
|
||||
<text class="header-back-icon">‹</text>
|
||||
</view>
|
||||
<view class="header-title">活动规则</view>
|
||||
<view class="header-right">
|
||||
<view class="right-dot"></view>
|
||||
<view class="right-ring"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="page-body" :style="{ paddingTop: `${statusBarHeight + 88}px` }">
|
||||
<view class="rule-card">
|
||||
<view class="rule-title">《香道汉平台》满额抽奖活动规则</view>
|
||||
<view class="rule-content">
|
||||
<rich-text v-if="ruleContent" :nodes="ruleContent" />
|
||||
<view class="state-text" v-else>{{ loading ? '规则加载中...' : '暂无活动规则' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDrawRuleConfig } from '@/api/lottery'
|
||||
|
||||
export default {
|
||||
name: 'CountyLotteryRulesPage',
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: 20,
|
||||
loading: true,
|
||||
ruleContent: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 20
|
||||
this.fetchRuleConfig()
|
||||
},
|
||||
methods: {
|
||||
fetchRuleConfig() {
|
||||
this.loading = true
|
||||
getDrawRuleConfig().then(res => {
|
||||
const data = res.data || {}
|
||||
this.ruleContent = data.ruleContent || ''
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
return
|
||||
}
|
||||
uni.switchTab({
|
||||
url: '/pages/home/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.county-lottery-rules-page {
|
||||
min-height: 100vh;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.custom-header {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
background: #f5f5f5;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.header-inner {
|
||||
height: 88rpx;
|
||||
padding: 0 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header-back {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #d8d8d8;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.header-back-icon {
|
||||
font-size: 44rpx;
|
||||
color: #111;
|
||||
line-height: 1;
|
||||
margin-top: -4rpx;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
margin-left: 56rpx;
|
||||
font-size: 34rpx;
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
width: 88rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid #d8d8d8;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.right-dot {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
background: #111;
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
|
||||
.right-ring {
|
||||
width: 18rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #111;
|
||||
}
|
||||
|
||||
.page-body {
|
||||
padding: 24rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.rule-card {
|
||||
background: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.rule-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.rule-content {
|
||||
margin-top: 20rpx;
|
||||
font-size: 32rpx;
|
||||
color: #444;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
/deep/ .rule-content p {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,786 @@
|
||||
<template>
|
||||
<view class="county-lottery-page">
|
||||
<view class="banner-wrapper">
|
||||
<view class="top-banner" :style="topBannerStyle">
|
||||
<view class="banner-content">
|
||||
<view class="banner-date">开奖时间:{{ openDateText }}</view>
|
||||
<view class="banner-countdown">
|
||||
<text class="text">距离开奖还有</text>
|
||||
<text class="num">{{ countdownData.day }}</text>
|
||||
<text class="text">天</text>
|
||||
<text class="num">{{ countdownData.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="side-entry rules" @click="openRulesModel">活动规则</view>
|
||||
<view class="side-entry mine" @click="navToLog">我的抽奖码</view>
|
||||
|
||||
<view class="winners-wrap" @click="navToLog">
|
||||
<view class="winners-text" v-if="!winnerSortedList.length">暂时无人中奖</view>
|
||||
<view class="winners-text one-t" v-else-if="winnerSortedList.length === 1">
|
||||
恭喜 <text class="blue">{{ winnerSortedList[0].name }}</text>
|
||||
在第 <text class="blue">{{ winnerSortedList[0].periodNo }}</text> 期抽奖活动中获得
|
||||
<text class="red">{{ winnerSortedList[0].prizeName }}</text>
|
||||
</view>
|
||||
<swiper
|
||||
v-else
|
||||
class="winner-swiper"
|
||||
vertical
|
||||
circular
|
||||
autoplay
|
||||
:interval="3000"
|
||||
:duration="500"
|
||||
>
|
||||
<swiper-item v-for="(winner, index) in winnerSortedList" :key="index">
|
||||
<view class="winners-text one-t">
|
||||
恭喜 <text class="blue">{{ winner.name }}</text>
|
||||
在第 <text class="blue">{{ winner.periodNo }}</text> 期抽奖活动中获得
|
||||
<text class="red">{{ winner.prizeName }}</text>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="winners-btn" @click="navToWinners">查看全部 <text class="arrow">➔</text></view>
|
||||
</view>
|
||||
|
||||
<view class="pool-wrap">
|
||||
<view class="pool-header">
|
||||
<view class="pool-title">奖品池 <text class="sub">/ prize pool</text></view>
|
||||
<view class="pool-desc">实付满{{ buyThresholdText }}元即可获得抽奖码,定时统一开奖</view>
|
||||
</view>
|
||||
<view class="pool-body">
|
||||
<swiper class="pool-swiper" :autoplay="true" :circular="true" :interval="5000" :duration="500" v-if="chunkedPrizeList.length">
|
||||
<swiper-item v-for="(group, gIndex) in chunkedPrizeList" :key="gIndex">
|
||||
<view class="pool-list-group">
|
||||
<view
|
||||
v-for="(item, index) in group"
|
||||
:key="index"
|
||||
class="pool-item"
|
||||
>
|
||||
<view class="item-inner">
|
||||
<view class="item-dashed">
|
||||
<image class="pool-image" :src="item.prizeImage" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<image class="prize-tag" :src="item.levelIcon" v-if="item.levelIcon" mode="aspectFit" />
|
||||
<view class="pool-name one-t">{{ item.prizeName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="goods-section">
|
||||
<view class="goods-header-box">
|
||||
<view class="goods-title-pill">
|
||||
<text class="dot">·</text> 活动商品 <text class="dot">·</text>
|
||||
<view class="triangle"></view>
|
||||
</view>
|
||||
<view class="goods-sub">—— 购买即得抽奖码 ——</view>
|
||||
</view>
|
||||
<view class="goods-list">
|
||||
<view
|
||||
v-for="(item, index) in activityGoodsList"
|
||||
:key="index"
|
||||
class="goods-item"
|
||||
>
|
||||
<image class="goods-image" :src="item.image" mode="aspectFill" @click="goGoodsDetail(item)" />
|
||||
<view class="goods-name more-t">{{ item.name }}</view>
|
||||
<view class="goods-bottom">
|
||||
<text class="goods-price">¥{{ item.price }}</text>
|
||||
<view class="goods-cart" @click.stop="openGoodsSku(item)">购</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<ProductWindow
|
||||
ref="attrWindow"
|
||||
:attr="attr"
|
||||
:cartNum="cart_num"
|
||||
:showOk="true"
|
||||
okText="立即下单"
|
||||
@changeFun="changeFun"
|
||||
@ok="submitFromSku()"
|
||||
/>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDrawActivityInfo } from '@/api/lottery'
|
||||
import { postCartAdd } from '@/api/store'
|
||||
import ProductWindow from '@/components/ProductWindow'
|
||||
import goCartMixin from '@/mixins/goCartMixins'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: 'CountyLotteryPage',
|
||||
components: {
|
||||
ProductWindow
|
||||
},
|
||||
mixins: [pageListenMixins, goCartMixin],
|
||||
data() {
|
||||
return {
|
||||
ready: false,
|
||||
activityInfo: {
|
||||
drawImage: '',
|
||||
drawTime: '',
|
||||
winnerList: [],
|
||||
prizePool: [],
|
||||
products: []
|
||||
},
|
||||
activityId: 0,
|
||||
linkType: 1,
|
||||
onlyOneToAddCart: false,
|
||||
statusBarHeight: 20,
|
||||
countdownData: {
|
||||
day: '--',
|
||||
time: '--:--:--'
|
||||
},
|
||||
countdownTimer: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
topBannerStyle() {
|
||||
const drawImage = String(this.activityInfo.drawImage || '').trim()
|
||||
if (!drawImage) return ''
|
||||
return `background-image:url(${drawImage});background-size:100% 100%;background-repeat:no-repeat;background-position:center top;`
|
||||
},
|
||||
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) {
|
||||
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
|
||||
}))
|
||||
}
|
||||
return this.prizeList.map(item => ({
|
||||
id: item.productId || 0,
|
||||
image: item.prizeImage || '',
|
||||
name: item.prizeName || '',
|
||||
price: item.productPrice || item.price || 0
|
||||
}))
|
||||
},
|
||||
winnerSortedList() {
|
||||
const list = this.activityInfo.winnerList || []
|
||||
if (!list.length) return []
|
||||
const mapped = list.map(item => ({
|
||||
name: item.realName || item.phone || '用户',
|
||||
periodNo: item.periodNo || '-',
|
||||
prizeName: item.prizeName || '神秘奖品'
|
||||
}))
|
||||
return mapped.sort((a, b) => this.getPeriodNoValue(b.periodNo) - this.getPeriodNoValue(a.periodNo))
|
||||
},
|
||||
buyThresholdText() {
|
||||
return 99
|
||||
},
|
||||
openDateText() {
|
||||
const target = this.getTargetDate()
|
||||
if (!target) return '--'
|
||||
const year = target.getFullYear()
|
||||
const month = String(target.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(target.getDate()).padStart(2, '0')
|
||||
return `${year}年${month}月${day}日`
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.linkType = Number(options.linkType) || 1
|
||||
this.activityId = Number(options.activityId || options.areaId) || 0
|
||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 20
|
||||
this.init()
|
||||
},
|
||||
onUnload() {
|
||||
this.clearCountdownTimer()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
if (!this.activityId) {
|
||||
uni.showToast({
|
||||
title: '缺少活动ID',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
getDrawActivityInfo(this.activityId).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.data || {}
|
||||
this.activityInfo = {
|
||||
...this.activityInfo,
|
||||
...data,
|
||||
drawImage: data.drawImage || ''
|
||||
}
|
||||
this.ready = true
|
||||
this.startCountdown()
|
||||
}
|
||||
})
|
||||
},
|
||||
getTargetDate() {
|
||||
const targetTime = this.activityInfo.drawTime || ''
|
||||
if (!targetTime) return null
|
||||
const date = new Date(String(targetTime).replace(/-/g, '/'))
|
||||
if (Number.isNaN(date.getTime())) return null
|
||||
return date
|
||||
},
|
||||
startCountdown() {
|
||||
this.clearCountdownTimer()
|
||||
const calc = () => {
|
||||
const target = this.getTargetDate()
|
||||
if (!target) {
|
||||
this.countdownData = { day: '--', time: '--:--:--' }
|
||||
return
|
||||
}
|
||||
let diff = target.getTime() - Date.now()
|
||||
if (diff <= 0) {
|
||||
this.countdownData = { day: '00', time: '00:00:00' }
|
||||
return
|
||||
}
|
||||
const day = Math.floor(diff / (24 * 60 * 60 * 1000))
|
||||
diff -= day * 24 * 60 * 60 * 1000
|
||||
const hour = Math.floor(diff / (60 * 60 * 1000))
|
||||
diff -= hour * 60 * 60 * 1000
|
||||
const minute = Math.floor(diff / (60 * 1000))
|
||||
diff -= minute * 60 * 1000
|
||||
const second = Math.floor(diff / 1000)
|
||||
const dd = String(day).padStart(2, '0')
|
||||
const hh = String(hour).padStart(2, '0')
|
||||
const mm = String(minute).padStart(2, '0')
|
||||
const ss = String(second).padStart(2, '0')
|
||||
this.countdownData = {
|
||||
day: dd,
|
||||
time: `${hh}:${mm}:${ss}`
|
||||
}
|
||||
}
|
||||
calc()
|
||||
this.countdownTimer = setInterval(calc, 1000)
|
||||
},
|
||||
clearCountdownTimer() {
|
||||
if (this.countdownTimer) {
|
||||
clearInterval(this.countdownTimer)
|
||||
this.countdownTimer = null
|
||||
}
|
||||
},
|
||||
getPeriodNoValue(periodNo) {
|
||||
const text = String(periodNo || '')
|
||||
const match = text.match(/\d+/g)
|
||||
if (!match || !match.length) return 0
|
||||
return Number(match.join('')) || 0
|
||||
},
|
||||
openRulesModel() {
|
||||
uni.navigateTo({ url: '/pkg-video/views/county-lottery-rules' })
|
||||
},
|
||||
navToWinners() {
|
||||
uni.navigateTo({
|
||||
url: `/pkg-video/views/county-winners?activityId=${this.activityId}`
|
||||
})
|
||||
},
|
||||
navToLog() {
|
||||
uni.navigateTo({ url: '/pkg-video/views/county-my-tickets' })
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
return
|
||||
}
|
||||
uni.switchTab({
|
||||
url: '/pages/home/index'
|
||||
})
|
||||
},
|
||||
goGoodsDetail(item) {
|
||||
if (!item.id) return
|
||||
uni.navigateTo({ url: `/pages/shop/GoodsCon/index?id=${item.id}&from=countyLottery&activityId=${this.activityId}` })
|
||||
},
|
||||
openGoodsSku(item) {
|
||||
if (!item.id) return
|
||||
this.addToCart(item)
|
||||
},
|
||||
submitFromSku() {
|
||||
const productSelect = this.getAttrItemData(this.attrValue)
|
||||
const currentSelect = productSelect || this.attr.productSelect || {}
|
||||
const stock = Number(currentSelect.stock || 0)
|
||||
const hasNo = (this.attr.productAttr.length && !productSelect && this.isOpen) || stock <= 0
|
||||
if (hasNo) {
|
||||
uni.showToast({
|
||||
title: '产品库存不足,请选择其他商品',
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
return
|
||||
}
|
||||
const q = {
|
||||
productId: this.m_id,
|
||||
cartNum: Number(currentSelect.cart_num || 1),
|
||||
new: 1,
|
||||
uniqueId: currentSelect.unique || ''
|
||||
}
|
||||
postCartAdd(q).then(res => {
|
||||
this.isOpen = false
|
||||
this.attr.cartAttr = false
|
||||
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
this.cart_num = 1
|
||||
const cartId = (res.data && res.data.cartId) || ''
|
||||
if (!cartId) return
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/OrderSubmission/index?id=${cartId}`
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.county-lottery-page {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.custom-header {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 30;
|
||||
background: rgba(255, 255, 255, 0);
|
||||
}
|
||||
|
||||
.custom-header-inner {
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.header-back {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 50%;
|
||||
background: rgba(0, 0, 0, .35);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header-back-icon {
|
||||
color: #fff;
|
||||
font-size: 56rpx;
|
||||
line-height: 1;
|
||||
margin-top: -6rpx;
|
||||
}
|
||||
|
||||
.banner-wrapper {
|
||||
position: relative;
|
||||
background: #f5f5f5;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
.banner-red-curve {
|
||||
background: #cb302c;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
border-bottom-left-radius: 60rpx;
|
||||
border-bottom-right-radius: 60rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.top-banner {
|
||||
background-color: #ffb611;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
height: 640rpx;
|
||||
position: relative;
|
||||
border-bottom-left-radius: 40rpx;
|
||||
border-bottom-right-radius: 40rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.banner-content {
|
||||
position: absolute;
|
||||
bottom: 40rpx;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.banner-date {
|
||||
position: relative;
|
||||
background: #3b7cf6;
|
||||
color: #fff;
|
||||
border: 4rpx solid #fff;
|
||||
border-radius: 40rpx;
|
||||
padding: 6rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -14rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-width: 14rpx 14rpx 0;
|
||||
border-style: solid;
|
||||
border-color: #fff transparent transparent transparent;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -8rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-width: 10rpx 10rpx 0;
|
||||
border-style: solid;
|
||||
border-color: #3b7cf6 transparent transparent transparent;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.banner-countdown {
|
||||
background: #cb302c;
|
||||
color: #fff;
|
||||
border: 6rpx solid #fff;
|
||||
border-radius: 60rpx;
|
||||
padding: 10rpx 40rpx;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
box-shadow: inset 0 0 0 6rpx rgba(0, 0, 0, 0.1);
|
||||
|
||||
.text {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.side-entry {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font-size: 24rpx;
|
||||
width: 44rpx;
|
||||
padding: 24rpx 0;
|
||||
text-align: center;
|
||||
border-radius: 24rpx 0 0 24rpx;
|
||||
z-index: 10;
|
||||
writing-mode: vertical-rl;
|
||||
letter-spacing: 6rpx;
|
||||
font-weight: bold;
|
||||
box-shadow: -2rpx 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.side-entry.rules {
|
||||
top: 60rpx;
|
||||
}
|
||||
|
||||
.side-entry.mine {
|
||||
top: 260rpx;
|
||||
}
|
||||
|
||||
.winners-wrap {
|
||||
margin: 0 24rpx;
|
||||
background: #fff;
|
||||
border-radius: 40rpx;
|
||||
padding: 10rpx 10rpx 10rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border: 2rpx solid #333;
|
||||
|
||||
.winners-text {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
|
||||
.blue {
|
||||
color: #3b7cf6;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: #cb302c;
|
||||
}
|
||||
}
|
||||
|
||||
.winner-swiper {
|
||||
flex: 1;
|
||||
height: 36rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.winners-btn {
|
||||
background: #3b7cf6;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-left: 16rpx;
|
||||
|
||||
.arrow {
|
||||
margin-left: 4rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pool-wrap {
|
||||
margin: 24rpx;
|
||||
background: #cb302c;
|
||||
border-radius: 24rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.pool-header {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
|
||||
.pool-title {
|
||||
background: #ffb611;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
padding: 10rpx 24rpx;
|
||||
border-radius: 40rpx;
|
||||
margin: 20rpx 30rpx 20rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
.sub {
|
||||
font-size: 20rpx;
|
||||
font-weight: bold;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pool-desc {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 20rpx 0 30rpx;
|
||||
border-bottom-left-radius: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pool-body {
|
||||
padding: 30rpx 0 40rpx 20rpx;
|
||||
}
|
||||
|
||||
.pool-swiper {
|
||||
height: 250rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pool-list-group {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pool-item {
|
||||
width: 220rpx;
|
||||
margin-right: 32rpx;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
|
||||
.item-inner {
|
||||
background: #fff;
|
||||
border-radius: 16rpx 48rpx 16rpx 16rpx;
|
||||
padding: 12rpx;
|
||||
height: 220rpx;
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #ffb611;
|
||||
box-shadow: 10rpx 10rpx 0 #ffb611;
|
||||
|
||||
.item-dashed {
|
||||
border: 2rpx dashed #ccc;
|
||||
border-radius: 8rpx 36rpx 8rpx 8rpx;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.pool-image {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.prize-tag {
|
||||
position: absolute;
|
||||
left: -10rpx;
|
||||
bottom: 20rpx;
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.pool-name {
|
||||
position: absolute;
|
||||
bottom: -16rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: #fff;
|
||||
color: #cb302c;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
padding: 6rpx 24rpx;
|
||||
border-radius: 30rpx;
|
||||
white-space: nowrap;
|
||||
z-index: 3;
|
||||
border: 2rpx solid #ffb611;
|
||||
max-width: 95%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-section {
|
||||
margin: 60rpx 24rpx 24rpx;
|
||||
background: #fff;
|
||||
border-radius: 24rpx;
|
||||
position: relative;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.goods-header-box {
|
||||
background: #cb302c;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
padding: 50rpx 0 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.goods-title-pill {
|
||||
position: absolute;
|
||||
top: -24rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: #ffb611;
|
||||
color: #333;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
padding: 8rpx 40rpx;
|
||||
border-radius: 40rpx;
|
||||
border: 6rpx solid #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
|
||||
.dot {
|
||||
margin: 0 8rpx;
|
||||
}
|
||||
|
||||
.triangle {
|
||||
position: absolute;
|
||||
bottom: -16rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 12rpx solid transparent;
|
||||
border-right: 12rpx solid transparent;
|
||||
border-top: 12rpx solid #ffb611;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-sub {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.goods-item {
|
||||
width: 316rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.goods-image {
|
||||
width: 100%;
|
||||
height: 316rpx;
|
||||
background: #f8f8f8;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
margin: 16rpx 0;
|
||||
height: 72rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.goods-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-price {
|
||||
color: #cb302c;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.goods-cart {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
background-color: #cb302c;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z'/%3E%3C/svg%3E");
|
||||
background-size: 28rpx 28rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,550 @@
|
||||
<template>
|
||||
<view class="county-my-tickets-page">
|
||||
<view class="custom-header" :style="{ paddingTop: `${statusBarHeight}px` }">
|
||||
<view class="header-inner">
|
||||
<view class="header-back" @click="goBack">
|
||||
<text class="header-back-icon">‹</text>
|
||||
</view>
|
||||
<view class="header-title">我的抽奖码</view>
|
||||
<view class="header-right">
|
||||
<view class="right-dot"></view>
|
||||
<view class="right-ring"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tabs">
|
||||
<view
|
||||
v-for="tab in tabs"
|
||||
:key="tab.key"
|
||||
class="tab-item"
|
||||
:class="{ active: activeTab === tab.key }"
|
||||
@click="onChangeTab(tab.key)"
|
||||
>
|
||||
{{ tab.label }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="page-body" scroll-y :style="{ paddingTop: `calc(${statusBarHeight}px + 168rpx)` }">
|
||||
<view class="tip-bar" v-if="summaryText">
|
||||
<view class="tip-text one-t">{{ summaryText }}</view>
|
||||
<view class="tip-btn" @click="goWinnersPage">查看全部 <text class="icon-expand">⤢</text></view>
|
||||
</view>
|
||||
|
||||
<view class="ticket-list" v-if="displayList.length">
|
||||
<view class="ticket-card" v-for="item in displayList" :key="item.id">
|
||||
<view class="ticket-head">
|
||||
<view class="ticket-code">
|
||||
<text class="code-icon">🎟</text>
|
||||
<text class="code-label">抽奖码:</text>
|
||||
<text class="code-value">{{ item.ticketCode || '--' }}</text>
|
||||
</view>
|
||||
<view class="ticket-status" :class="[ `status-${item.status}`, item.status === 0 ? 'status-pill' : '', item.status === 1 && item.claimStatus === 1 ? 'status-claimed' : '' ]">{{ getStatusText(item) }}</view>
|
||||
</view>
|
||||
|
||||
<view class="ticket-info-row">
|
||||
<text class="label">来源订单</text>
|
||||
<text class="value">{{ item.sourceOrderId || '--' }}</text>
|
||||
</view>
|
||||
<view class="ticket-info-row">
|
||||
<text class="label">开奖时间</text>
|
||||
<text class="value">{{ formatDrawTime(item.drawTime) }}</text>
|
||||
</view>
|
||||
|
||||
<view class="prize-box" v-if="showPrize(item)">
|
||||
恭喜获得:{{ item.prizeName || '神秘奖品' }}
|
||||
</view>
|
||||
|
||||
<view class="ticket-footer" v-if="item.status === 1">
|
||||
<template v-if="item.claimStatus === 0">
|
||||
<view class="footer-note">注意:请在7天内领取,过期不予发放</view>
|
||||
<view class="footer-btn btn-claim" @click="onClaim(item)">立 即 领 取</view>
|
||||
</template>
|
||||
<template v-else-if="item.claimStatus === 1">
|
||||
<view class="footer-note done">奖品已领取</view>
|
||||
<view class="footer-btn btn-order" @click="goOrder(item)">查看订单</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<view class="invalid-reason" v-if="item.status === -1">
|
||||
失效原因:{{ getInvalidReason(item) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty-wrap" v-else>
|
||||
<view class="empty-text">{{ loading ? '加载中...' : '暂无抽奖码记录' }}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { getDrawMyTickets } from '@/api/lottery'
|
||||
|
||||
export default {
|
||||
name: 'CountyMyTicketsPage',
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: 20,
|
||||
loading: false,
|
||||
activeTab: 'all',
|
||||
activityId: 1,
|
||||
tabs: [
|
||||
{ key: 'all', label: '全部' },
|
||||
{ key: 'wait', label: '待开奖' },
|
||||
{ key: 'opened', label: '已开奖' },
|
||||
{ key: 'invalid', label: '已失效' }
|
||||
],
|
||||
list: [],
|
||||
openedList: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
displayList() {
|
||||
return this.activeTab === 'opened' ? this.openedList : this.list
|
||||
},
|
||||
summaryText() {
|
||||
return `恭喜海*在第01期抽奖活动中获得 iPhone17 pro 手机`
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.activityId) {
|
||||
this.activityId = Number(options.activityId) || 1
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 20
|
||||
this.fetchList()
|
||||
},
|
||||
methods: {
|
||||
mapTabToStatus(tab) {
|
||||
const map = {
|
||||
wait: 0,
|
||||
invalid: -1
|
||||
}
|
||||
return map[tab]
|
||||
},
|
||||
onChangeTab(tab) {
|
||||
if (this.activeTab === tab) return
|
||||
this.activeTab = tab
|
||||
this.fetchList()
|
||||
},
|
||||
goWinnersPage() {
|
||||
uni.navigateTo({
|
||||
url: `/pkg-video/views/county-winners?activityId=${this.activityId}`
|
||||
})
|
||||
},
|
||||
fetchList() {
|
||||
this.loading = true
|
||||
|
||||
// 使用模拟数据以匹配设计图所有状态
|
||||
setTimeout(() => {
|
||||
const mockData = [
|
||||
{
|
||||
id: 1,
|
||||
ticketCode: 'A8F92E',
|
||||
status: 0,
|
||||
sourceOrderId: '12345678910',
|
||||
drawTime: '2026-05-30 10:00:00',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
ticketCode: 'A8F92E',
|
||||
status: 1,
|
||||
claimStatus: 0,
|
||||
sourceOrderId: '12345678910',
|
||||
drawTime: '2026-05-30 10:00:00',
|
||||
prizeName: '一等奖ipone17 pro max手机'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
ticketCode: 'A8F92E',
|
||||
status: 1,
|
||||
claimStatus: 1,
|
||||
sourceOrderId: '12345678910',
|
||||
drawTime: '2026-05-30 10:00:00',
|
||||
prizeName: '一等奖ipone17 pro max手机'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
ticketCode: 'A8F92E',
|
||||
status: -1,
|
||||
claimStatus: 0,
|
||||
sourceOrderId: '12345678910',
|
||||
drawTime: '2026-05-30 10:00:00',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
ticketCode: 'A8F92E',
|
||||
status: -1,
|
||||
claimStatus: -1,
|
||||
sourceOrderId: '12345678910',
|
||||
drawTime: '2026-05-30 10:00:00',
|
||||
prizeName: '一等奖ipone17 pro max手机'
|
||||
}
|
||||
];
|
||||
|
||||
let filteredData = mockData;
|
||||
if (this.activeTab === 'wait') {
|
||||
filteredData = mockData.filter(item => item.status === 0);
|
||||
} else if (this.activeTab === 'opened') {
|
||||
filteredData = mockData.filter(item => item.status === 1 || item.status === 2);
|
||||
} else if (this.activeTab === 'invalid') {
|
||||
filteredData = mockData.filter(item => item.status === -1);
|
||||
}
|
||||
|
||||
this.list = filteredData;
|
||||
this.openedList = mockData.filter(item => item.status === 1 || item.status === 2);
|
||||
this.loading = false;
|
||||
}, 300);
|
||||
},
|
||||
getStatusText(item) {
|
||||
const status = Number(item.status)
|
||||
if (status === 0) return '等待开奖'
|
||||
if (status === 1) return item.claimStatus === 1 ? '已领取' : '已开奖'
|
||||
if (status === 2) return '已开奖'
|
||||
if (status === -1) return '已失效'
|
||||
return '--'
|
||||
},
|
||||
showPrize(item) {
|
||||
return [1, 2, -1].includes(Number(item.status)) && !!item.prizeName
|
||||
},
|
||||
getInvalidReason(item) {
|
||||
if (Number(item.claimStatus) === -1) return '奖品过期未领取'
|
||||
return '订单取消'
|
||||
},
|
||||
formatDrawTime(time) {
|
||||
if (!time) return '--'
|
||||
const date = new Date(String(time).replace(/-/g, '/'))
|
||||
if (Number.isNaN(date.getTime())) return time
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const d = String(date.getDate()).padStart(2, '0')
|
||||
const hh = String(date.getHours()).padStart(2, '0')
|
||||
const mm = String(date.getMinutes()).padStart(2, '0')
|
||||
return `${y}年${m}月${d}日 ${hh}:${mm}`
|
||||
},
|
||||
onClaim(item) {
|
||||
if (!item.id) return
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/OrderSubmission/index?lotteryRecordId=${item.id}`
|
||||
})
|
||||
},
|
||||
goOrder(item) {
|
||||
if (!item.sourceOrderId) {
|
||||
uni.showToast({
|
||||
title: '缺少订单号',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/OrderDetails/index?id=${item.sourceOrderId}`
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
return
|
||||
}
|
||||
uni.switchTab({
|
||||
url: '/pages/home/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.county-my-tickets-page {
|
||||
min-height: 100vh;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.custom-header {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 20;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.header-inner {
|
||||
height: 88rpx;
|
||||
padding: 0 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header-back {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header-back-icon {
|
||||
font-size: 60rpx;
|
||||
color: #111;
|
||||
line-height: 1;
|
||||
margin-top: -4rpx;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
margin-left: 56rpx;
|
||||
font-size: 34rpx;
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
width: 88rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid #d8d8d8;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.right-dot {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
background: #111;
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
|
||||
.right-ring {
|
||||
width: 18rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #111;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
height: 80rpx;
|
||||
padding: 0 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
margin-right: 20rpx;
|
||||
padding: 8rpx 24rpx;
|
||||
border-radius: 30rpx;
|
||||
color: #666;
|
||||
font-size: 26rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
color: #BD3124;
|
||||
background: rgba(220,60,53,0.39);
|
||||
}
|
||||
|
||||
.page-body {
|
||||
box-sizing: border-box;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.tip-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10rpx 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
background: #fff;
|
||||
border-radius: 160rpx;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
.tip-text {
|
||||
flex: 1;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.tip-btn {
|
||||
background: #FCF9EA;
|
||||
padding: 6rpx 16rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.icon-expand {
|
||||
font-size: 20rpx;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
.ticket-list {
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.ticket-card {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin: 0 24rpx 20rpx;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.ticket-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 2rpx dashed #eee;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ticket-code {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.code-icon {
|
||||
margin-right: 8rpx;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.code-label {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.code-value {
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.ticket-status {
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.status-pill {
|
||||
background: #BD3124;
|
||||
color: #fff;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: normal;
|
||||
position: absolute;
|
||||
right: -24rpx;
|
||||
}
|
||||
|
||||
.status-0 {
|
||||
/* handled by pill */
|
||||
}
|
||||
|
||||
.status-1,
|
||||
.status-2 {
|
||||
color: #BD3124;
|
||||
}
|
||||
|
||||
.status-claimed {
|
||||
color: #999 !important;
|
||||
}
|
||||
|
||||
.status--1 {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.ticket-info-row {
|
||||
margin-top: 14rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.ticket-info-row .label {
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.ticket-info-row .value {
|
||||
color: #333;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.prize-box {
|
||||
margin-top: 24rpx;
|
||||
border: 2rpx solid #BD3124;
|
||||
border-radius: 40rpx;
|
||||
color: #BD3124;
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
padding: 16rpx 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ticket-footer {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.footer-note {
|
||||
flex: 1;
|
||||
color: #BD3124;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.footer-note.done {
|
||||
color: #BD3124;
|
||||
}
|
||||
|
||||
.footer-btn {
|
||||
width: 170rpx;
|
||||
height: 54rpx;
|
||||
border-radius: 30rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn-claim {
|
||||
background: #BD3124;
|
||||
}
|
||||
|
||||
.btn-order {
|
||||
background: #BD3124;
|
||||
}
|
||||
|
||||
.invalid-reason {
|
||||
margin-top: 14rpx;
|
||||
font-size: 24rpx;
|
||||
color: #BD3124;
|
||||
}
|
||||
|
||||
.empty-wrap {
|
||||
padding-top: 120rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,692 @@
|
||||
<template>
|
||||
<view class="winners-page">
|
||||
<view class="custom-header" :style="{ paddingTop: `${statusBarHeight}px` }">
|
||||
<view class="header-inner">
|
||||
<view class="header-back" @click="goBack">
|
||||
<text class="header-back-icon">‹</text>
|
||||
</view>
|
||||
<view class="header-title">中奖名单</view>
|
||||
<view class="header-actions">
|
||||
<text class="dot">···</text>
|
||||
<view class="circle-dot"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-wrap" v-if="loaded">
|
||||
<view class="draw-info-wrap">
|
||||
<view class="period-side left">
|
||||
<text class="side-text">第{{ periodLabel }}期</text>
|
||||
</view>
|
||||
<view class="period-side right">
|
||||
<view class="side-text side-text-count">
|
||||
<text>往</text>
|
||||
<text>期</text>
|
||||
<text>中</text>
|
||||
<text>奖</text>
|
||||
<text>名</text>
|
||||
<text>单</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="draw-main">
|
||||
<view class="draw-title">本期已开奖</view>
|
||||
<view class="draw-time">开奖时间:{{ drawTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="win-banner" v-if="hasWon === 1 && userWinList.length > 0">
|
||||
<view class="win-badge">
|
||||
<text class="win-badge-text">恭喜您中奖了!</text>
|
||||
</view>
|
||||
|
||||
<view class="win-banner-subtitle">
|
||||
您的抽奖码 <text class="code">{{ userWinList[0].ticketCode }}</text> 获得了
|
||||
</view>
|
||||
|
||||
<view class="prize-card" v-for="(prize, index) in userWinList" :key="index">
|
||||
<view class="prize-img-wrap">
|
||||
<image class="prize-img" :src="prize.prizeImage" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="prize-info">
|
||||
<view class="prize-name-wrap">
|
||||
<text class="prize-level">{{ prize.levelName }}:</text>
|
||||
<text class="prize-name">{{ prize.prizeName }}</text>
|
||||
</view>
|
||||
<view class="prize-desc">{{ prize.prizeDesc || "默认" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button class="my-tickets-btn" @click="handleClaimNow">
|
||||
<text class="btn-text">立即领取</text>
|
||||
</button>
|
||||
<view class="claim-tip">*请在7天内领取,过期失效</view>
|
||||
</view>
|
||||
|
||||
<view class="winners-list-wrap">
|
||||
<view class="list-title-badge">
|
||||
<text class="gift-icon">🎁</text>
|
||||
<text class="title-text">中奖名单</text>
|
||||
</view>
|
||||
|
||||
<view class="list-content">
|
||||
<view class="list-item" v-for="(item, index) in activityWinnerList" :key="index">
|
||||
<view class="item-left">
|
||||
<view class="item-prize">
|
||||
<text class="level">{{ item.levelName }}:</text>
|
||||
<text class="name">{{ item.prizeName }}</text>
|
||||
</view>
|
||||
<view class="item-code">
|
||||
中奖码:<text class="code-text">{{ item.ticketCode }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<view class="user-name">{{ item.realName }}</view>
|
||||
<view class="user-phone">{{ item.phone }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-text" v-if="activityWinnerList.length === 0">暂无中奖名单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coupon-popup-mask" v-if="showCouponSuccessPopup" @click="closeCouponSuccessPopup">
|
||||
<view class="coupon-popup" @click.stop>
|
||||
<view class="popup-close" @click="closeCouponSuccessPopup">×</view>
|
||||
<view class="popup-icon-wrap">
|
||||
<text class="popup-icon">🎉</text>
|
||||
</view>
|
||||
<view class="popup-title">领取成功</view>
|
||||
<view class="popup-desc">您的奖品已经领取成功,请前往“我的优惠券”查看详情</view>
|
||||
<view class="popup-btn" @click="goMyCoupons">去查看我的优惠券</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: 20,
|
||||
periodLabel: "01",
|
||||
drawTime: "2026年5月30日",
|
||||
hasWon: 1,
|
||||
userWinList: [],
|
||||
activityWinnerList: [],
|
||||
loaded: false,
|
||||
showCouponSuccessPopup: false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
this.statusBarHeight = systemInfo.statusBarHeight || 20
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
navToMyTickets() {
|
||||
uni.navigateTo({
|
||||
url: '/pkg-video/views/county-my-tickets'
|
||||
})
|
||||
},
|
||||
handleClaimNow() {
|
||||
if (!this.userWinList.length) return
|
||||
|
||||
const allCouponPrize = this.userWinList.every((item) => this.isCouponPrize(item))
|
||||
if (allCouponPrize) {
|
||||
this.showCouponSuccessPopup = true
|
||||
return
|
||||
}
|
||||
|
||||
if (this.userWinList.length === 1) {
|
||||
this.navToReceiveInfo(this.userWinList[0])
|
||||
return
|
||||
}
|
||||
|
||||
this.navToMyTickets()
|
||||
},
|
||||
isCouponPrize(prize = {}) {
|
||||
const prizeType = Number(prize.prizeType)
|
||||
const prizeName = String(prize.prizeName || "")
|
||||
return prizeType === 3 || prize.prizeType === "coupon" || /券/.test(prizeName)
|
||||
},
|
||||
navToReceiveInfo(prize = {}) {
|
||||
const query = `?source=lottery&ticketCode=${encodeURIComponent(prize.ticketCode || "")}&prizeName=${encodeURIComponent(prize.prizeName || "")}`
|
||||
uni.navigateTo({
|
||||
url: `/pages/user/address/AddAddress/index${query}`
|
||||
})
|
||||
},
|
||||
closeCouponSuccessPopup() {
|
||||
this.showCouponSuccessPopup = false
|
||||
},
|
||||
goMyCoupons() {
|
||||
this.showCouponSuccessPopup = false
|
||||
uni.navigateTo({
|
||||
url: "/pkg_user/views/myCoupons"
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
const mockData = {
|
||||
hasWon: 1,
|
||||
userWinList: [
|
||||
{
|
||||
levelName: "优惠券奖",
|
||||
prizeName: "满100减20优惠券",
|
||||
prizeDesc: "领取后自动发放到我的优惠券",
|
||||
ticketCode: "A8F92E",
|
||||
prizeType: 3,
|
||||
prizeImage:
|
||||
"https://img0.baidu.com/it/u=1461707600,2879596427&fm=253&fmt=auto&app=138&f=PNG?w=640&h=640"
|
||||
}
|
||||
],
|
||||
activityWinnerList: [
|
||||
{ levelName: "一等奖", prizeName: "iphone17 pro max手机", ticketCode: "A82F9E", realName: "海*", phone: "123****4567" },
|
||||
{ levelName: "二等奖", prizeName: "ipad", ticketCode: "A82F9E", realName: "微信*", phone: "123****4567" },
|
||||
{ levelName: "三等奖", prizeName: "手表", ticketCode: "A82F9E", realName: "微信*", phone: "123****4567" },
|
||||
{ levelName: "四等奖", prizeName: "运动手环", ticketCode: "A82F9E", realName: "微信*", phone: "123****4567" },
|
||||
{ levelName: "五等奖", prizeName: "礼盒", ticketCode: "A82F9E", realName: "微信*", phone: "123****4567" }
|
||||
]
|
||||
}
|
||||
this.hasWon = mockData.hasWon
|
||||
this.userWinList = mockData.userWinList
|
||||
this.activityWinnerList = mockData.activityWinnerList
|
||||
this.loaded = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.winners-page {
|
||||
min-height: 100vh;
|
||||
background: #f4f6f8;
|
||||
padding-bottom: 48rpx;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
|
||||
}
|
||||
|
||||
.custom-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
|
||||
.header-inner {
|
||||
height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
padding: 0 24rpx;
|
||||
|
||||
.header-back {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.header-back-icon {
|
||||
font-size: 60rpx;
|
||||
color: #333;
|
||||
margin-top: -4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.header-title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
width: 120rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
padding: 0 16rpx;
|
||||
|
||||
.dot {
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
.circle-dot {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border: 3rpx solid #333;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 6rpx;
|
||||
height: 6rpx;
|
||||
background: #333;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-wrap {
|
||||
padding: 28rpx 24rpx 0;
|
||||
}
|
||||
|
||||
.draw-info-wrap {
|
||||
border: 5rpx solid #1f1f1f;
|
||||
border-radius: 26rpx;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
margin: 18rpx 0 38rpx;
|
||||
padding: 24rpx 70rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 168rpx;
|
||||
box-shadow: 0 6rpx 0 #d8d8d8;
|
||||
|
||||
.period-side {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 54rpx;
|
||||
height: 152rpx;
|
||||
border: 4rpx solid #1f1f1f;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fff4d1;
|
||||
padding-bottom: 15rpx;
|
||||
.side-text {
|
||||
writing-mode: vertical-rl;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.1;
|
||||
font-weight: 900;
|
||||
letter-spacing: 2rpx;
|
||||
color: #1f1f1f;
|
||||
}
|
||||
|
||||
.side-text-count {
|
||||
writing-mode: horizontal-tb;
|
||||
height: 132rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
letter-spacing: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
&.left {
|
||||
left: -10rpx;
|
||||
background: #fff7df;
|
||||
}
|
||||
|
||||
&.right {
|
||||
right: -10rpx;
|
||||
background: #ffbe12;
|
||||
}
|
||||
}
|
||||
|
||||
.draw-main {
|
||||
flex: 1;
|
||||
border: 2rpx dashed #bcc3cd;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
padding: 18rpx 12rpx;
|
||||
}
|
||||
|
||||
.draw-title {
|
||||
font-size: 58rpx;
|
||||
line-height: 1.05;
|
||||
color: #d73222;
|
||||
font-weight: 900;
|
||||
letter-spacing: 1rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.draw-time {
|
||||
font-size: 30rpx;
|
||||
color: #222;
|
||||
font-weight: 800;
|
||||
}
|
||||
}
|
||||
|
||||
.win-banner {
|
||||
background: #d93325;
|
||||
border: 5rpx solid #1f1f1f;
|
||||
border-radius: 28rpx;
|
||||
padding: 54rpx 20rpx 26rpx;
|
||||
text-align: center;
|
||||
margin-bottom: 62rpx;
|
||||
position: relative;
|
||||
box-shadow: 0 8rpx 0 #9f1e14;
|
||||
|
||||
.win-badge {
|
||||
position: absolute;
|
||||
top: -34rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 390rpx;
|
||||
height: 72rpx;
|
||||
background: #ffca1c;
|
||||
border: 4rpx solid #1f1f1f;
|
||||
border-radius: 18rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 5rpx 0 #d49400;
|
||||
|
||||
.win-badge-text {
|
||||
font-size: 52rpx;
|
||||
font-weight: 900;
|
||||
color: #fff;
|
||||
text-shadow: -2rpx -2rpx 0 #1f1f1f, 2rpx -2rpx 0 #1f1f1f, -2rpx 2rpx 0 #1f1f1f, 2rpx 2rpx 0 #1f1f1f, 0 4rpx 0 #1f1f1f;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.win-banner-subtitle {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top: 8rpx;
|
||||
font-weight: 700;
|
||||
|
||||
.code {
|
||||
font-weight: 900;
|
||||
font-size: 40rpx;
|
||||
margin: 0 8rpx;
|
||||
color: #ffe8db;
|
||||
}
|
||||
}
|
||||
|
||||
.prize-card {
|
||||
background: #fffdf5;
|
||||
border: 4rpx solid #1f1f1f;
|
||||
border-radius: 20rpx;
|
||||
padding: 12rpx;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 18rpx;
|
||||
text-align: left;
|
||||
box-shadow: inset 0 0 0 2rpx #fff;
|
||||
|
||||
.prize-img-wrap {
|
||||
width: 132rpx;
|
||||
height: 132rpx;
|
||||
border-radius: 12rpx;
|
||||
border: 2rpx dashed #b3b3b3;
|
||||
padding: 4rpx;
|
||||
margin-right: 18rpx;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.prize-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.prize-info {
|
||||
flex: 1;
|
||||
padding-top: 8rpx;
|
||||
|
||||
.prize-name-wrap {
|
||||
font-size: 40rpx;
|
||||
color: #222;
|
||||
margin-bottom: 10rpx;
|
||||
line-height: 1.2;
|
||||
|
||||
.prize-level {
|
||||
font-weight: 900;
|
||||
}
|
||||
.prize-name {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.prize-desc {
|
||||
font-size: 34rpx;
|
||||
color: #8c8c8c;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.my-tickets-btn {
|
||||
background: linear-gradient(180deg, #ffd33d 0%, #ffb300 100%);
|
||||
border: 4rpx solid #1f1f1f;
|
||||
border-radius: 48rpx;
|
||||
padding: 0;
|
||||
height: 90rpx;
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: inset 0 -8rpx 0 rgba(0, 0, 0, 0.12), 0 8rpx 0 #1f1f1f;
|
||||
transition: all 0.1s;
|
||||
|
||||
&:active {
|
||||
transform: translateY(4rpx);
|
||||
box-shadow: inset 0 -4rpx 0 rgba(0, 0, 0, 0.12), 0 4rpx 0 #1f1f1f;
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
font-size: 50rpx;
|
||||
font-weight: 900;
|
||||
color: #fff;
|
||||
text-shadow: -2rpx -2rpx 0 #1f1f1f, 2rpx -2rpx 0 #1f1f1f, -2rpx 2rpx 0 #1f1f1f, 2rpx 2rpx 0 #1f1f1f, 0 4rpx 0 #1f1f1f;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.claim-tip {
|
||||
margin-top: 16rpx;
|
||||
color: #fff0de;
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.winners-list-wrap {
|
||||
background: #fff;
|
||||
border-radius: 28rpx;
|
||||
padding: 46rpx 24rpx 10rpx;
|
||||
position: relative;
|
||||
box-shadow: 0 5rpx 0 #e6e8ec;
|
||||
|
||||
.list-title-badge {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: -30rpx;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8rpx 34rpx;
|
||||
border-radius: 38rpx;
|
||||
border: 4rpx solid #1f1f1f;
|
||||
background: #ffd554;
|
||||
box-shadow: 0 4rpx 0 #d8a61b;
|
||||
|
||||
.gift-icon {
|
||||
font-size: 28rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
font-size: 34rpx;
|
||||
font-weight: 900;
|
||||
color: #222;
|
||||
}
|
||||
}
|
||||
|
||||
.list-content {
|
||||
.list-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 2rpx solid #f1f1f1;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.item-left {
|
||||
flex: 1;
|
||||
|
||||
.item-prize {
|
||||
font-size: 36rpx;
|
||||
color: #333;
|
||||
margin-bottom: 8rpx;
|
||||
line-height: 1.25;
|
||||
|
||||
.level {
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.item-code {
|
||||
font-size: 32rpx;
|
||||
color: #666;
|
||||
font-weight: 700;
|
||||
|
||||
.code-text {
|
||||
color: #d8392b;
|
||||
font-weight: 900;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-right {
|
||||
margin-left: 16rpx;
|
||||
text-align: right;
|
||||
|
||||
.user-name {
|
||||
font-size: 32rpx;
|
||||
color: #666;
|
||||
font-weight: 700;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.user-phone {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
text-align: center;
|
||||
padding: 60rpx 0;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.coupon-popup-mask {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 1000;
|
||||
background: rgba(0, 0, 0, 0.55);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.coupon-popup {
|
||||
width: 100%;
|
||||
max-width: 620rpx;
|
||||
background: #fff;
|
||||
border-radius: 32rpx;
|
||||
padding: 26rpx 34rpx 42rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.popup-close {
|
||||
position: absolute;
|
||||
right: 18rpx;
|
||||
top: 18rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #333;
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.popup-icon-wrap {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
margin: 20rpx auto 8rpx;
|
||||
border-radius: 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.popup-icon {
|
||||
font-size: 70rpx;
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
text-align: center;
|
||||
font-size: 60rpx;
|
||||
font-weight: 900;
|
||||
color: #222;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.popup-desc {
|
||||
margin: 38rpx auto 42rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.6;
|
||||
color: #9a9a9a;
|
||||
width: 92%;
|
||||
}
|
||||
|
||||
.popup-btn {
|
||||
width: 86%;
|
||||
height: 96rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 48rpx;
|
||||
background: #c43124;
|
||||
color: #fff;
|
||||
font-size: 40rpx;
|
||||
font-weight: 900;
|
||||
text-align: center;
|
||||
line-height: 96rpx;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user