<template>
	<view class="flowOrder">
		<!-- #ifdef H5 -->
		<u-navbar  back-text=" " :custom-back='goBack' title="订单查询" :border-bottom="false" :background="{backgroundColor: '#d52e4c'}" back-icon-color="#fff" title-color="#fff"></u-navbar>
		<!-- #endif -->
		<u-toast ref="uToast" />
		<image class="sou" src="../../static/img/image40.55b8540ef37ab05a6581.png" mode=""></image>
		<u-input v-model="phone" height="100" placeholder-style="font-size:34rpx;" :clearable="false"
			placeholder="请输入您下单时联系人手机号" />
		<view class="btn" @tap="flowOrderList()">
			查询
		</view>
		<image  class="bottom" :style="{'top':top+'px'}" src="../../static/img/image39.aa54921789e70cf0022c.png" mode=""></image>
	</view>
</template>

<script>
	import {
		fail
	} from 'assert'
	export default {
		data() {
			return {
				phone: '',
				top:'',
				chanId:''
			}
		},
		onLoad(option){
			if(option.chanId){
				uni.setStorageSync('chanId', option.chanId);
				this.chanId=option.chanId
			}else{
				uni.removeStorageSync('chanId');
			}
		},
		onReady() {
			this.top=uni.getSystemInfoSync().windowHeight-240
			
		},
		methods: {
			goBack(){
			if(getCurrentPages().length==1){
				return
			}else{
				uni.redirectTo({
									url:'/pages/flow/flow?chanId='+this.chanId
								})
			}
				
			},
			// 号码详情
			flowOrderList() {
				uni.navigateTo({
					url: '/pages/flowOrderList/flowOrderList?phone=' + this.phone,
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		height: 100%;
	}

	.flowOrder {
		/* #ifndef MP-KUAISHOU */
		height: 100%;
		/* #endif */
		/* #ifdef MP-KUAISHOU */
		height: 100vh;
		/* #endif */
		background-color: #cae5ff;
		text-align: center;

		.sou {
			width: 380rpx;
			height: 80rpx;
			margin-top: 120rpx;
		}

		.u-input {
			width: 690rpx;
			margin: 40rpx auto;
			margin-top: 90rpx;
			background-color: #fff;
			border-radius: 30rpx;
			box-sizing: border-box;
			padding-left: 30rpx !important;
		}

		.btn {
			width: 690rpx;
			height: 90rpx;
			line-height: 90rpx;
			text-align: center;
			font-size: 32rpx;
			margin: 90rpx auto 0;
			color: #fff;
			background-color: #4891ef;
			border-radius: 30rpx;
		}

		.bottom {
			position: absolute;
			left: 0;
			width: 100%;
		}
	}
</style>
