<template>
	<view>
		<!-- <view class="topTabBar" :style="{position:headerPosition,top:headerTop}">
			<view class="grid" v-for="(grid,tbIndex) in businType" :key="tbIndex" @tap="showType(tbIndex)">
				<view class="text" :class="[tbIndex==tabbarIndex?'on':'']">{{grid}}</view>
			</view>

		</view> -->
		<view class="width100 mart60 fotct" @click="scan">
			<image style="width: 120px;height: 120px;"
				src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkRBODM3Q0I0OTA2QzExRUJBMzg5RTREN0EwQzhCQUIxIiB4bXBNTTpEb2N1bWVudElEPSJ4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V/KL42VoaCY1Dlb2RqpcyGHluMsKsPkc6xMBUZBccqZLEkRsvEex8rucnx5rIwF38MtydsSA4INGK06n/R3eVDUBAIOcKfrOYkFwcTzyv6eXLzDI8wCAVhghnNtZMZdMEAsYC1fW7lvJOYTh2DCB6fGf4c82gkmBJI4x8CtVIJJwCAJxGAep1y7JVYix26u+3l+uqmYDx31G9KPEpIRruiwguv8N367sZhPHYa1/eNItu9GgSe4rrf48eZiPnYcOmgzlF1O+otPhHDxOdftDD90xoMoEANswh9NstAxTPye63S+3280FhCH4hiX8crwYkIZ5Qouca7DceTh0TwikMPOvUMZTqxeLbEWOFZz3d0RpIdcLICOxojHGNLHylsl7nxPK9fVGArgyGQsoE7HEwizrScpe1Ni0LegbkZxXQUyNY4FvALwYpRzST8TaYvEo2/YwnWCuvkwyAWJhaRC8EJRvFP5Zirjyk9B8/2/cV0sCEOBYiGqHOS6eEn8cdykH5R4LRkH2ed4R9v9YeobxkJYWXu5UzhM2QPSkS/6Q+kBfijB53vCVsBYiCsPuxZvVDZU2T0sHMG7h9A9LAz4eGdYCxqLQGXijZxzlA1SNpsCMkHlUzayDwexT3eEvcCxCFUujop5WNnxyqYqw4vO5XDt7MBHv2KfHc8+PBSVwldFtMJfZhuo7ArSF8wNEi2kgaFarLT9ubKtUXVCLOJBgIq/i/spWB/0UBTSBgd2sA/GsU/ujLI4otqCWNGl7F22GzhAMNGFHW7DQ172DcoWkT5v8Q77QhCBOIplCRuxQCayWCYoawxBX2wJi2IxC0QQgRT0hH2EDf7C+q/T2dDSHOPz+9/OLeNS0g9hw4mWsmVABFIUEFgr2R7m3zUpO5FtJP9Eq3NUie9tP4t5rbJ1KT93SrWJQMoJJiTfpMxVxb2UDSF9Rn+wsv7K+pisVllP/jz+3MB/xkn4xgspm/nPe0yGDvVm0ucmNinbJ1XhPf8vwAB/5qn1Ycfv6wAAAABJRU5ErkJggg==">
			</image>
		</view>
	</view>
</template>

<script>
	import {
		useCouponCode
	} from '../../../Utils/Api.js';
	let app = getApp();
	export default {
		data() {
			return {
				businType: ['扫码消核', '消核统计'],
				tabbarIndex: 0,
				headerPosition: "fixed",
				headerTop: "0px",
			}
		},
		onPageScroll(e) {
			return;
			//兼容iOS端下拉时顶部漂移
			this.headerPosition = e.scrollTop >= 0 ? "fixed" : "absolute";
		},
		methods: {
			showType(tbIndex) {
				this.tabbarIndex = tbIndex;
			},
			scan() {
				uni.scanCode({
					success: function(res) {
						let datas = {
							"code": res.result
						}
						useCouponCode(datas).then(res => {
							if (res.return_code == '000000') {
								uni.showToast({
									title: res.return_data,
									duration: 2000
								})
							} else {
								uni.showToast({
									title: res.return_msg,
									icon: "none"
								})
							}
						})
					}
				});

			}
		}
	}
</script>

<style lang="scss">
	.topTabBar {
		width: 100%;
		position: fixed;
		top: 0;
		z-index: 10;
		background-color: #f8f8f8;
		height: 80upx;
		display: flex;
		justify-content: space-around;

		.grid {
			width: 20%;
			height: 80upx;
			display: flex;
			justify-content: center;
			align-items: center;
			color: #444;
			font-size: 28upx;

			.text {
				height: 76upx;
				display: flex;
				align-items: center;

				&.on {
					color: #0083f5;
					border-bottom: solid 4upx #0083f5;
				}
			}

		}
	}
</style>
