<template>
	<view style="padding: 40rpx 30rpx; background-color: #f6f6f6;height: 100vh;width: 100vw;">

		<!-- 卡片 -->
		<view class="card">
			<!-- 图片 -->
			<view class="card_img">
				<image v-if="product_type=='1'" class="img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/order/1.png"></image>
				<image v-else-if="product_type=='2'" class="img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/order/2.png"></image>
				<image v-else-if="product_type=='3'" class="img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/order/3.png"></image>
				<image v-else-if="product_type=='4'" class="img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/order/4.png"></image>
				<image v-else-if="product_type=='5'" class="img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/order/5.png"></image>
				<image v-else-if="product_type=='6'" class="img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/order/6.png"></image>
				<image v-else-if="product_type=='7'" class="img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/order/7.png"></image>
			</view>
			<!-- 黑字 -->
			<view class="card_text">
				<text v-if="product_type=='1'">您已发起电话咨询</text>
				<text v-else-if="product_type=='2'">您已发起图文咨询</text>
				<text v-else-if="product_type=='3'">您已发起门诊预约</text>
				<text v-else-if="product_type=='4'||product_type=='5'">您已提交预约申请！</text>
				<text v-else-if="product_type=='7'">您已充值成功</text>
				<text v-else>您已成功购买服务包</text>
			</view>
			<!-- 灰字 -->
			<view class="describe" v-if="product_type=='3' || product_type=='4'||product_type=='5'">
				<view>我们会在预约成功后以短信的方式通知您</view>
				<view>请注意查收</view>
			</view>
		</view>
		<view style="height: 50%;"></view>
		<!-- 按钮 -->
		<view class="button">
			<view class="b">
				<u-button v-if="product_type==1||product_type==2" type="primary">查看咨询</u-button>
				<u-button v-else-if="product_type==3||product_type==4||product_type==5" type="primary">查看预约</u-button>
				<u-button v-else type="primary">查看服务包</u-button>
			</view>
			<view class="b">
				<u-button :hair-line="false" @click="gotoindex" style="color: #0B73B9;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">返回首页</u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(op) {
			this.product_type = op.type
		},
		data() {
			return {
				// 产品类型
				product_type: ''
			}
		},
		methods: {
			gotoindex() {
				uni.switchTab({
					url: "../index/index"
				})
			}
		},
		onShow() {

		}
	}
</script>

<style lang="scss">
	.card {
		height: 35%;
		width: 100%;
		border-radius: 20rpx;
		box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);

		.card_img {
			height: 40%;
			width: 100%;
			display: flex; //
			justify-content: center;
			align-items: flex-end;

			.img {

				height: 100rpx;
				width: 100rpx;
			}
		}

		.card_text {
			height: 25%;
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;

			text {
				font-size: 36rpx;
				font-weight: bold;
				color: #333333;
			}
		}

		.describe {
			height: 35%;
			width: 100%;
			display: block;
			text-align: center;

			view {
				padding-top: 5rpx;
				font-size: 28rpx;
				color: #999999;
			}
		}
	}

	.button {
		height: 15%;
		width: 100%;
		display: block;
		align-items: flex-end;

		.b {
			padding: 10rpx 0;
			width: 100%;

		}
	}
</style>
