<template>
	<view class="content">
		<view class="container">

			<!-- <view class="form-sub">
				
			</view> -->
			<view class="content-icon">
				<u-icon name="checkmark-circle" size="108" color="#5ac725" v-if="type == 'success'"></u-icon>
				<view class="text" v-if="type == 'success'">提交成功</view>
				<u-icon name="close-circle" size="108" color="#f56c6c" v-if="type == 'failed'"></u-icon>
				<view class="text" v-if="type == 'failed'">{{titleFailes}}</view>
				<view style="display: flex;flex-direction: row;" class="bottom-button">
					<!-- <u-button type="primary" @click="reset" color="#3d4b70" :plain="true" style="margin-right: 5px;">重置</u-button> -->
					<u-button type="success" @click="submit" v-if="type == 'success'">完成</u-button>
					<u-button type="error" @click="submit" v-if="type == 'failed'">完成</u-button>
				</view>
			</view>
		</view>


	</view>
</template>

<script>
	import config from '../../config/common.js'
	export default {
		data() {
			return {
				showSex: false,
				type: 'success',
				titleFailes: '提交失败，请稍后重新提交',
				appurl:config.uni_app_url

			}
		},
		mounted() {
			var a = document.getElementsByClassName('uni-page-head-hd')[0]
			a.style.display = 'none';
		},
		onLoad(options) {
			this.type = options.type
			if (options.title&&options.title!=='') {
				this.titleFailes = options.title
			}

		},
		// onReady() {},
		methods: {
			submit() {
				// uni.navigateBack({
				// 	delta:2
				// })
				// const Company = uni.getStorageSync('Company') 
				// uni.reLaunch({
				// 	url: '/pages/index/index?Company='+Company
				// })
				uni.reLaunch({
					url: '/pages/webview/webview?url=' + this.appurl
				})
			},

		}
	}
</script>

<style>
	.content {
		background-color: #f6faff;
		width: 100%;
		/* #ifndef APP-PLUS */
		height: calc(100vh - 44px ); // 非APP平台下生效
		/* #endif */
		/* #ifdef APP-PLUS */
		height: 100vh; // APP平台下生效
		/* #endif */
	}

	.container {
		padding: 80px 16px 10px 16px;
	}

	.content-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
	}

	.text {
		font-size: 16px;
		color: #909399;
		margin-top: 20px;
	}

	.bottom-button {
		/* position: fixed;
		bottom: 0;
		left: 0; */
		width: 80%;
		padding: 10px 16px;
		/* box-sizing: border-box; */
		/* background: #f4f7ff; */
		z-index: 999;
		margin-top: 60px;
	}
</style>