no message

This commit is contained in:
2025-11-12 18:02:27 +08:00
parent c79061e8c6
commit 09afe17fee
2 changed files with 53 additions and 4 deletions
+8
View File
@@ -32,6 +32,14 @@ export function getWinningList(data) {
data, data,
}); });
} }
export function getCommonRaffle(data) {
return request({
url: "/raffle/getCommonRaffleWinningList",
method: "get",
data,
});
}
/** /**
* 领取实物奖品 * 领取实物奖品
* @param {Object} params * @param {Object} params
+45 -4
View File
@@ -13,7 +13,12 @@
<!-- 九宫格抽奖组件 --> <!-- 九宫格抽奖组件 -->
<LotteryGrid :prizesObj="prizesObj" :remainCount="prizesObj.times" :is-disabled="isRotating" <LotteryGrid :prizesObj="prizesObj" :remainCount="prizesObj.times" :is-disabled="isRotating"
@start="handleStartLottery" @complete="handleLotteryComplete" /> @start="handleStartLottery" @complete="handleLotteryComplete" />
<view class="notice-view">
<view class="notice-li">
<u-notice-bar :text="noticeList" color="#fff" icon="" justifyContent="center"
direction="column" bgColor="rgba(0,0,0,0)"></u-notice-bar>
</view>
</view>
<!-- 规则 --> <!-- 规则 -->
<view class="rule"> <view class="rule">
<view class="rule-title"> 活动规则</view> <view class="rule-title"> 活动规则</view>
@@ -28,7 +33,7 @@
<script> <script>
import LotteryGrid from './components/LotteryGrid.vue' import LotteryGrid from './components/LotteryGrid.vue'
import ResultModal from './components/ResultModal.vue' import ResultModal from './components/ResultModal.vue'
import { getActivityList, raffleExecute } from '@/api/raffle.js'; import { getActivityList, raffleExecute,getCommonRaffle } from '@/api/raffle.js';
export default { export default {
components: { components: {
@@ -38,6 +43,7 @@ export default {
data() { data() {
return { return {
// 奖品配置数据 // 奖品配置数据
noticeList:[],
prizesObj: { prizesObj: {
prizes: [], prizes: [],
}, },
@@ -55,13 +61,32 @@ export default {
console.log("option backPath", backPath); console.log("option backPath", backPath);
if (backPath && backPath !== 'null') { if (backPath && backPath !== 'null') {
this.backPath = backPath; this.backPath = backPath;
} }
this.getCommon();
}, },
mounted() { mounted() {
this.getActivityList(); this.getActivityList();
}, },
methods: { methods: {
getCommon(){
getCommonRaffle().then(res=>{
let tmpArr = res.data && res.data.length ? res.data : [];
this.noticeList = [];
tmpArr.forEach(item=>{
if(item.type == 'quicken'){
item.text = `恭喜 ${item.user} 获得${item.parValue}个${item.prizeName}`;
}else if(item.type == 'balance'){
item.text = `恭喜 ${item.user} 获得${item.parValue}元${item.prizeName}`;
}else if(item.type == 'redpacket'){
item.text = `恭喜 ${item.user} 获得${item.parValue}${item.prizeName}`;
}
this.noticeList.push(item.text);
})
console.log('getCommonRaffle',res)
})
},
/** /**
* 查询活动详情 * 查询活动详情
*/ */
@@ -127,6 +152,22 @@ export default {
</script> </script>
<style scoped> <style scoped>
.notice-view{
width:100%;
min-height:64rpx;
display: flex;
padding: 0 40rpx;
margin-top:30rpx;
box-sizing: border-box;
.notice-li{
width:100%;
height:100%;
display: flex;
border-radius: 32rpx;
background: linear-gradient( 180deg, #FF8876 0%, #FF3D36 17%, #FF4646 85%, #FF8978 100%);
}
}
.lottery-page { .lottery-page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -156,7 +197,7 @@ export default {
background: linear-gradient(180deg, #FF8876 0%, #FF3D36 17%, #FF4646 85%, #FF8978 100%); background: linear-gradient(180deg, #FF8876 0%, #FF3D36 17%, #FF4646 85%, #FF8978 100%);
border-radius: 24rpx; border-radius: 24rpx;
padding: 50rpx 24rpx; padding: 50rpx 24rpx;
margin: 100rpx auto 0; margin: 30rpx auto 0;
font-size: 34rpx; font-size: 34rpx;
color: #FFFAE3; color: #FFFAE3;
line-height: 54rpx; line-height: 54rpx;