<template>
	<view class="page">
		<view class="hander">
			<view class="content">
				<view class="" style="display: flex; justify-content: space-between;">
					<view class="">

					</view>
					<view class="one">
						<image src="https://i.ringzle.com/file/20240225/dc4ab62598874a89ae24f26d30d631d1.png" mode="">
						</image>
					</view>
				</view>
				<view class="two">
					<u--input type='number' placeholder="请输入核销码" border="none" v-model="value" color='#FFFFFF'
						size='36'></u--input>
				</view>
			</view>
		</view>
		<view class="btn" @click="handleDetail">
			验证
		</view>

	</view>
</template>
<script>
	export default {
		data() {
			return {
				h: uni.getSystemInfoSync().windowHeight - 87,
				mt: uni.getSystemInfoSync().statusBarHeight + 44,
				value: ''
			}
		},
		methods: {
			// 核销验证
			handleDetail() {
				console.log(this.value);
				this.$api.get('/merchant/merchantFisherman/home/getDetails?writeOffCode=' + this.value).then(res => {
					if (res.data.code == 0) {
						this.value = ''
						uni.setStorageSync('list', res.data.data);
						uni.navigateTo({
							url: '/pagesHouse/Verification/details'
						})
					} else {
						this.value = ''
						this.$showToast(res.data.msg)
					}
				})
			},

		}
	}
</script>
<style lang="scss">
	* {
		margin: 0;
		padding: 0;
		box-sizing: border-box;
	}

	.page {
		height: 100%;
		box-sizing: border-box;
		background-color: #f0f0f0;

		.hander {
			box-sizing: border-box;
			background-color: #fff;
			height: 436rpx;

			.content {
				height: 320rpx;
				background-color: #4E6088;
				// width: 100%;
				padding: 27rpx 30rpx;

				.one {

					width: 54rpx;
					height: 54rpx;

					image {
						width: 100%;
						height: 100%;
					}
				}

			}
		}
	}

	.btn {
		position: fixed;
		bottom: 0;
		width: 100%;
		height: 118rpx;
		background-color: #8E939C;
		line-height: 118rpx;
		text-align: center;
		font-size: 30rpx;
		color: #FFFFFF;
		font-weight: Regular;
	}
</style>