index_alert.vue 1.7 KB
<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>