index_alert.vue
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
<view class="drawAlertWrap">
<view class="drawAlert">
<view class="alertImg">
<image :src="alertInfo.imgUrl" mode=""></image>
</view>
<view class="drawTxtItem">
{{alertInfo.alertTxt}}
</view>
<view class="drawTxtItem" v-if="alertInfo.otherTxt != ''">
{{alertInfo.otherTxt}}
</view>
<view class="drawTxtItem" v-if="alertInfo.share_num > 0" style="padding-top: 8rpx;">
可再获得<text>{{alertInfo.share_num}}次</text>抽奖机会
</view>
<view class="drawBtn" @click="choseDrawAlert" :style="{'margin-top':alertInfo.btnMt+'rpx'}">
{{alertInfo.btnTxt}}
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
}
},
props:{
alertInfo:{
type:Object
}
},
methods:{
choseDrawAlert(){
this.$emit('choseDrawAlert')
}
}
}
</script>
<style>
/* 抽奖弹框区域 */
.drawAlertWrap{position: fixed;top: 0;bottom: 0;left: 0;right: 0;background: rgba(0,0,0,0.5);z-index: 3;display: flex;justify-content: center;align-items: center;}
.drawAlertWrap .drawAlert{width: 280rpx;height: 494rpx;background: #6b6aa8;border: 8rpx solid #322d74;border-radius: 40rpx;padding: 0 112rpx;}
.drawAlert .alertImg{height: 268rpx;display: flex;justify-content: center;align-items: center;}
.alertImg image{width: 268rpx;height: 268rpx;}
.drawAlert .drawTxtItem{font-size: 28rpx;font-weight: 600;text-align: center;color: #fff;}
.drawTxtItem text{color: #fcd87e;}
.drawAlert .drawBtn{width: 144rpx;height: 48rpx;background: linear-gradient(113deg,#fed96c 0%, #ff9060 100%);border-radius: 24rpx;color: #fff;text-align: center;line-height: 48rpx;font-size: 24rpx;font-weight: 600;margin: 0 auto;}
</style>