1。添加广告轮播

yj-dev
杨杰 3 years ago
parent 2da167844e
commit 23c3817208
  1. 86
      subPages/lottery/lottery.vue

@ -9,29 +9,25 @@
@finish="handleDrawFinish" v-if="prizeList.length" /> @finish="handleDrawFinish" v-if="prizeList.length" />
</view> </view>
<view class="almost-lottery__rule"> <view class="almost-lottery__rule">
<view class="rule-head"> <!-- <view class="rule-head">
<view class="line"></view> <view class="line"></view>
<text class="title">中奖名单</text> <text class="title">中奖名单</text>
<view class="line"></view> <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> -->
<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="rule-head">
<view class="line"></view> <view class="line"></view>
@ -77,25 +73,6 @@
<text>中奖产品自动放入系统卡包在我的-我的优惠券中查看90天内有效</text> <text>中奖产品自动放入系统卡包在我的-我的优惠券中查看90天内有效</text>
</view> </view>
</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> </view>
</view> </view>
@ -158,7 +135,10 @@
// //
goldNum: 20, goldNum: 20,
// //
freeNumDay: 3 freeNumDay: 3,
interval:3000,
duration:12000,
list: ['1分钟前,无夏购买了会员', '2分钟前,无夏购买了会员', '3分钟前,无夏购买了会员']
} }
}, },
computed: { computed: {
@ -192,16 +172,13 @@
uni.showLoading({ uni.showLoading({
title: '奖品准备中...' title: '奖品准备中...'
}) })
// //
let res = await this.requestApiGetPrizeList() let res = await this.requestApiGetPrizeList()
console.log('获取奖品列表', res)
if (res.ok) { if (res.ok) {
uni.hideLoading()
let data = res.data let data = res.data
if (data.length) { if (data.length) {
this.prizeList = data this.prizeList = data
console.log('已获取到奖品列表数据,开始绘制抽奖转盘')
// //
// //
@ -486,6 +463,29 @@
</script> </script>
<style lang="scss" scoped> <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 { .almost-lottery {
flex: 1; flex: 1;
background-color: #FF893F; background-color: #FF893F;

Loading…
Cancel
Save