|
|
|
@ -9,30 +9,26 @@ |
|
|
|
|
@finish="handleDrawFinish" v-if="prizeList.length" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="almost-lottery__rule"> |
|
|
|
|
<view class="rule-head"> |
|
|
|
|
<!-- <view class="rule-head"> |
|
|
|
|
<view class="line"></view> |
|
|
|
|
<text class="title">中奖名单</text> |
|
|
|
|
<view class="line"></view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- <view style="height: 40px;"> |
|
|
|
|
<view class="page-section swiper"> |
|
|
|
|
<view class="page-section-spacing"> |
|
|
|
|
<swiper class="swiper" vertical="true" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration"> |
|
|
|
|
<swiper-item style="height: 40px;"> |
|
|
|
|
<view class="swiper-item uni-bg-red">冯绍峰地方是的反手反手电风扇电风扇发是</view> |
|
|
|
|
</swiper-item> |
|
|
|
|
<swiper-item style="height: 40px;"> |
|
|
|
|
<view class="swiper-item uni-bg-green">了看了你别浪费女生了妇女了啥地方了南斯拉夫弄丢了</view> |
|
|
|
|
</swiper-item> |
|
|
|
|
<swiper-item style="height: 40px;"> |
|
|
|
|
<view class="swiper-item uni-bg-blue">沃尔沃二女玩女人温柔我能让你为免费派送费牛棚</view> |
|
|
|
|
</swiper-item> |
|
|
|
|
</swiper> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
<view class="_notice"> |
|
|
|
|
<swiper class="_swiper tc" indicator-dots="false" autoplay="true" :interval="interval" circular="true" |
|
|
|
|
display-multiple-items="2" :duration="duration"> |
|
|
|
|
<swiper-item> |
|
|
|
|
<view class="swiper-item uni-bg-red"></view> |
|
|
|
|
</swiper-item> |
|
|
|
|
<swiper-item> |
|
|
|
|
<view class="swiper-item uni-bg-red"></view> |
|
|
|
|
</swiper-item> |
|
|
|
|
<swiper-item v-for="(item,index) in list" :key="index"> |
|
|
|
|
<view class="swiper-item uni-bg-red">{{item}}</view> |
|
|
|
|
</swiper-item> |
|
|
|
|
</swiper> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="rule-head"> |
|
|
|
|
<view class="line"></view> |
|
|
|
|
<text class="title">活动规则</text> |
|
|
|
@ -77,25 +73,6 @@ |
|
|
|
|
<text>中奖产品自动放入系统卡包,在我的-我的优惠券中查看,90天内有效。</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- <template> |
|
|
|
|
<view class="item"> |
|
|
|
|
<view class="number">3</view> |
|
|
|
|
<view class="text">本次活动由XXXXXXX发起,与Apple.Inc无关。</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="item"> |
|
|
|
|
<view class="number">4</view> |
|
|
|
|
<view class="text">苹果公司不是本活动的赞助商且没有以任何形式参与活动。</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="item"> |
|
|
|
|
<view class="number">5</view> |
|
|
|
|
<view class="text">本活动仅限17岁以上用户参加。</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="item"> |
|
|
|
|
<view class="number">6</view> |
|
|
|
|
<view class="text">本活动最终解释权归XXXXXXX所有。</view> |
|
|
|
|
</view> |
|
|
|
|
</template> --> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -158,7 +135,10 @@ |
|
|
|
|
// 每次消耗的金币数 |
|
|
|
|
goldNum: 20, |
|
|
|
|
// 每天免费抽奖次数 |
|
|
|
|
freeNumDay: 3 |
|
|
|
|
freeNumDay: 3, |
|
|
|
|
interval:3000, |
|
|
|
|
duration:12000, |
|
|
|
|
list: ['1分钟前,无夏购买了会员', '2分钟前,无夏购买了会员', '3分钟前,无夏购买了会员'] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -192,16 +172,13 @@ |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '奖品准备中...' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// 等待接口返回的数据进一步处理 |
|
|
|
|
let res = await this.requestApiGetPrizeList() |
|
|
|
|
console.log('获取奖品列表', res) |
|
|
|
|
|
|
|
|
|
if (res.ok) { |
|
|
|
|
uni.hideLoading() |
|
|
|
|
let data = res.data |
|
|
|
|
if (data.length) { |
|
|
|
|
this.prizeList = data |
|
|
|
|
console.log('已获取到奖品列表数据,开始绘制抽奖转盘') |
|
|
|
|
|
|
|
|
|
// 如果开启了前端控制概率 |
|
|
|
|
// 得出权重的最大值并生成权重数组 |
|
|
|
@ -486,6 +463,29 @@ |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
|
._notice { |
|
|
|
|
position: fixed; |
|
|
|
|
left: 0; |
|
|
|
|
top: 0; |
|
|
|
|
/* #ifdef H5 */ |
|
|
|
|
top: 88upx; |
|
|
|
|
/* #endif */ |
|
|
|
|
z-index: 9; |
|
|
|
|
width: 100%; |
|
|
|
|
background: rgba(72, 1, 1, 0.3); |
|
|
|
|
font-size: 20upx; |
|
|
|
|
height: 44upx; |
|
|
|
|
color: #ffffff; |
|
|
|
|
border-radius: 6upx; |
|
|
|
|
overflow: hidden; |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
._swiper { |
|
|
|
|
line-height: 44upx; |
|
|
|
|
} |
|
|
|
|
.almost-lottery { |
|
|
|
|
flex: 1; |
|
|
|
|
background-color: #FF893F; |
|
|
|
|