<template>
	<!-- 活动抽奖 -->
	<!-- navy页面 -->
	 <view class="homenavpages">
		 
		<view class="honenavlist">
			
			<view  v-if="isshowall==2">
				<navigator url="../send/send" class="send_cell flex ali-c">
					<view class="inputname">实物抽奖</view>
					<view class="input_box flex1 jus-e">
						<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
					</view>
				</navigator>
				
				<navigator url="../LuckList/LuckList?type=0" class="send_cell flex ali-c linetowpad">
					<view class="inputname">关闭抽奖</view>
					<view class="input_box flex1 jus-e ali-c">
						<text class="textssum">{{conutdata.closeLottery}}</text>
						<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
					</view>
				</navigator>
				
				<navigator url="../LuckList/LuckList?type=1" class="send_cell flex ali-c ">
					<view class="inputname">发起抽奖</view>
					<view class="input_box flex1 jus-e ali-c">
						<text class="textssum">{{conutdata.inLottery}}</text>
						<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
					</view>
				</navigator>
				
				<navigator url="../LuckList/LuckList?type=2" class="send_cell flex ali-c">
					<view class="inputname">开奖记录</view>
					<view class="input_box flex1 jus-e ali-c">
						<text class="textssum">{{conutdata.openLottery}}</text>
						<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
					</view>
				</navigator>
			</view>
			
			<navigator url="../LuckList/LuckList?type=3" class="send_cell flex ali-c ">
				<view class="inputname">参与抽奖</view>
				<view class="input_box flex1 jus-e ali-c">
					<text class="textssum">{{conutdata.inCount}}</text>
					<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
				</view>
			</navigator>
			
			<navigator url="../LuckList/LuckList?type=4" class="send_cell flex ali-c send_cell_boder">
				<view class="inputname">中奖记录</view>
				<view class="input_box flex1 jus-e ali-c">
					<text class="textssum">{{conutdata.inPrize}}</text>
					<image class="jiantou_icon" src="/static/LuckDraw/jiantou_icon.png" mode=""></image>
				</view>
			</navigator>
			
			
			<!-- App 进来的只剩下 参与抽奖 和 中奖记录 -->
			
		</view>
		
	 </view>
</template>

<script>
	import {slotCountLottery} from "@/utils/api/LuckDraw.js";
	export default {
		data(){
			return {
				conutdata:{},
				isshowall:2,// 1是显示 部分的  2是显示全部的
			}
		},
		computed: {
			staticUrl () {//静态资源地址
				return this.$store.state.joinurl;
			}
		},
		onLoad(opdata) {
			
			// if(opdata.isshowal!=undefined){
			// 	this.isshowall = opdata.isshowall;
			// }else{
			// 	this.isshowall = 1;//默认部分
			// }
			
			//this.isshowall = opdata.isshowall;
			
			this.getslotCountLottery();
		},
		methods:{
			async getslotCountLottery(){
				console.info("请求开始");
				let res = await slotCountLottery({
					
				});
				console.info("请求结束");
				if(res.code==0){
					this.conutdata = res.data;
				}else{
					this.$api.msg(res.msg);
				}
				
			}
		}
	}
</script>

<style lang="scss">
	@import  "./homenav.scss";
</style>
