<template>
	<view class="s-pages">
		<vew class="heads">
			<view><u-icon name="checkmark-circle-fill" size="200" color="red"></u-icon></view>
			<view v-if="type==1">洗车机归位成功</view>
			<view v-if="type==0">洗车已完成</view>
			<view class="s-butoon">
				<u-button @click="toHome" type="error">重新扫码洗车</u-button>
			</view>
		</vew>
		<view class="infos">
			<view>操作说明:</view>
			<view>【重新扫码洗车】需要再次支付洗车费用,如果遇到非个人原因导致洗车机中途归位,客服会在7个工作日内核实情况后,将已付费用按原支付渠道退款给付款账户。带来不便,敬请谅解。</view>
			<view @click="callPhone">如有疑问,请联系客服:<text>{{kfMobile}}</text> </view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 1,
				kfMobile: ''
			};
		},
		onLoad(opts) {
			this.type = opts.type
			this.kfMobile = this.$store.state.vuex_kfMobile
		},
		methods:{
			// 电话客服
			callPhone () {
				uni.makePhoneCall({
				    phoneNumber: this.$store.state.vuex_kfMobile
				})
			},
			// 返回首页
			toHome () {
				uni.reLaunch({
					url: "/pages/index/index"
				})
			},
			// 再次洗车
			toWork(){
				uni.redirectTo({
					url: "/pages/getOrder/getOrder"
				})
			}
		}
	}
</script>

<style lang="scss">
	.s-pages{
		width: 100%;
		.heads{
			text-align: center;
			display: flex;
			justify-content: center;
			flex-direction: column;
			padding: 50rpx 50rpx 20rpx;
			.s-butoon{
				padding: 50rpx 0 0 0;
				.u-btn{
					margin-bottom: 35rpx;
				}
			}
		}
		.infos{
			padding:0 50rpx;
			> view{
				padding: 10rpx 0;
				text-indent: 24px;
				line-height: 22px;
				&:first-child{
					text-indent: 0;
				}
				text{
					color: red;
				}
			}
		}
	}
</style>