<template>
	<view class="page" :style="{'min-height':(h)+'px','padding-top':mt+'px'}">
		<c-nav-bar title="扫码核销"></c-nav-bar>
		<view class="list">
			<view class="item" v-for="(i,index) in data" :key="index" @click="check(i)">
				<text>{{i.BOAT_NO}}</text>
				<text>核销</text>
			</view>
		</view>
		<Tabbares :tabbarid="1" :value="1"></Tabbares>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				date: new Date().Format('yyyy-MM-dd'),
				show: false,
				data: [],
			}
		},
		onLoad() {
			this.getList();
		},
		methods: {
			jj(){
				uni.navigateTo({
					url:'/pagesHouse/Verification/success'
				})
			},
			dd(){
				uni.navigateTo({
					url:'/pagesHouse/Verification/record'
				})
			},
			getList(){
				this.$api.get('/scenic/order/queryCurBoatNo/'+ uni.getStorageSync('merchantId')).then(res=>{
					if(res.data.code==0){
						console.log(res)
						this.data=res.data.data;
					}
				})
			},
			check(item) {
				// #ifdef APP-PLUS
					uni.navigateTo({
						url: '/pagesHouse/Verification/checkApp?=&boatNo='+item.BOAT_NO
					})
				// #endif
				// #ifdef MP-WEIXIN
					uni.navigateTo({
						url: '/pagesHouse/Verification/check?=&boatNo='+item.BOAT_NO
					})
				// #endif
			}
		}
	}
</script>

<style lang="less" scoped>
	.page {
		background: #F5F8FA;
		padding-bottom: 40rpx;
		box-sizing: border-box;
	}

	.list {
		box-sizing: border-box;
		padding: 30rpx 30rpx 0;

		.item {
			height: 160rpx;
			display: flex;
			justify-content: space-between;
			padding: 0 24rpx;
			background-color: #fff;
			align-items: center;
			box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
			margin-bottom: 20rpx;
			border-radius: 16rpx;

			text {
				&:first-child {
					font-size: 54rpx;
					font-weight: bold;
					color: #111;
				}

				&:last-child {
					display: inline-block;
					width: 168rpx;
					height: 88rpx;
					line-height: 88rpx;
					text-align: center;
					background-color: #007A69;
					color: #fff;
					font-size: 32rpx;
					border-radius: 44rpx;
				}
			}
		}
	}
</style>