<template>
	<view class="app" :style="styleCom">
		<wd-navbar :bordered="false" custom-style="background-color: #799675 !important;" safeAreaInsetTop></wd-navbar>

		<view class="header">
			<image :src="images[!type ? 'success' : 'warning']" class="success-image"></image>
			<view class="success-title">{{ !type ? '支付成功' : '未检测到支付结果' }}</view>
			<view class="hr"></view>
		</view>
		<view class="info-box">
			<view class="info-amount">¥ {{ Number(options.payableAmount).toFixed(2) }}</view>
			<view class="left-circle" v-if="options.orderNo || options.createTime"></view>
			<view class="right-circle" v-if="options.orderNo || options.createTime"></view>
			<view class="info-main" v-if="options.orderNo || options.createTime">
				<view class="info-cell" v-if="options.deductionAmount">
					<view class="left">抵扣金额</view>
					<view class="right" style="color: #ff2929;">￥{{ options.deductionAmount }}</view>
				</view>
				<view class="info-cell" v-if="options.orderNo">
					<view class="left">订单编号</view>
					<view class="right">{{ options.orderNo }}</view>
				</view>
				<view class="info-cell" v-if="options.createTime">
					<view class="left">付款时间</view>
					<view class="right">{{ timeFormat(options.createTime, 'yyyy-MM-dd hh:mm:ss') }}</view>
				</view>
			</view>
		</view>
		<view class="button-query" @click="queryOrder">查看订单</view>
		<view class="button-query1" @click="queryHome">返回首页</view>
		<view class="footer-hr"></view>
	</view>
</template>
<script>
import api from '@/api/index';
export default {
	data() {
		return {
			options: {
				amount: '',
				orderNo: '',
				createTime: ''
			},
			images: {
				warning:
					'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c6QAAE+pJREFUeF7tnc/LHtUVx++gKJUGNBZe6EZT180qew0Ywb/ARQTjzm6FEnBjshGk4FZ3voJZ+BcUTMFkXVftuvV1Uwj4C1IsLZVpzvvOpOOT+XHvnXtm7rn3M5DkzfvM3Dnne879Puece+5M4zhAAASqRaCpVnMUBwEQcBBAAU7Qtu3znRovOeeec871/5dfj/08/F2PwMkBFP3/h7+Xn792zp00TXOnAOiqVwECMOIC3SSXiftiJ7L8LH9k0u919OTQk8FdIYeOIA4JZS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vaWNvbi1mb250L3RtcC9pY29uX3ZwM212emVpcjcvemhpZnVjaGVuZ2dvbmcuc3ZntdPldAAAAABJRU5ErkJggg=='
			},
			// 默认颜色
			color: {
				wxpay: '#799675',
				alipay: '#799675'
			},
			type: ''
		};
	},
	onLoad(options = {}) {
		api.orderInfo({ id: options.id }).then((res) => {
			console.log(res);
			this.options = res;
		});

		// options.createTime = new Date(options.createTime).getTime();
		// this.options = options;
		// this.type = options.type;
	},
	methods: {
		timeFormat(time, fmt = 'yyyy-MM-dd hh:mm:ss', targetTimezone = 8) {
			try {
				if (!time) {
					return '';
				}
				if (typeof time === 'string' && !isNaN(time)) time = Number(time);
				// 其他更多是格式化有如下:
				// yyyy-MM-dd hh:mm:ss|yyyy年MM月dd日 hh时MM分等,可自定义组合
				let date;
				if (typeof time === 'number') {
					if (time.toString().length == 10) time *= 1000;
					date = new Date(time);
				} else {
					date = time;
				}

				const dif = date.getTimezoneOffset();
				const timeDif = dif * 60 * 1000 + targetTimezone * 60 * 60 * 1000;
				const east8time = date.getTime() + timeDif;

				date = new Date(east8time);
				let opt = {
					'M+': date.getMonth() + 1, //月份
					'd+': date.getDate(), //日
					'h+': date.getHours(), //小时
					'm+': date.getMinutes(), //分
					's+': date.getSeconds(), //秒
					'q+': Math.floor((date.getMonth() + 3) / 3), //季度
					S: date.getMilliseconds() //毫秒
				};
				if (/(y+)/.test(fmt)) {
					fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
				}
				for (let k in opt) {
					if (new RegExp('(' + k + ')').test(fmt)) {
						fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? opt[k] : ('00' + opt[k]).substr(('' + opt[k]).length));
					}
				}
				return fmt;
			} catch (err) {
				// 若格式错误,则原值显示
				return time;
			}
		},
		queryOrder() {
			
			
			uni.reLaunch({
				url:'/pages/order/order'
			})
			
			
			// uni.navigateTo({
			// 	url: `/pages/order/details?id=${this.options.id}`
			// });
		},
		queryHome() {
			uni.reLaunch({
				url: '/pages/index/index'
			});
		},
		onaderror(e) {
			console.log('ad-error', e);
		}
	},
	// 监听器
	watch: {
		mainColorCom: {
			immediate: true,
			handler(newVal, oldVal) {
				// 动态改变导航栏颜色
				setTimeout(function () {
					uni.setNavigationBarColor({
						frontColor: '#ffffff',
						backgroundColor: newVal
					});
				}, 0);
			}
		}
	},
	// 计算属性
	computed: {
		mainColorCom() {
			let color = '';
			// #ifdef MP-ALIPAY
			color = this.options.main_color || this.color.alipay;
			// #endif
			// #ifndef MP-ALIPAY
			color = this.options.main_color || this.color.wxpay;
			// #endif
			return color;
		},
		styleCom() {
			return `--main:${this.mainColorCom};`;
		}
	}
};
</script>
<style lang="scss" scoped>
.app {
	--bgcolor: #f3f3f3;

	background-color: var(--bgcolor);
	min-height: calc(100vh - var(--window-bottom) - var(--window-top));
}
.header {
	background-color: var(--main);
	text-align: center;
	color: #ffffff;
	padding: 80rpx 30rpx 50rpx 30rpx;
	.success-image {
		width: 120rpx;
		height: 120rpx;
	}
	.success-title {
		font-size: 34rpx;
		margin-top: 40rpx;
		font-weight: bold;
	}
	.hr {
		margin-top: 40rpx;
		width: 100%;
		height: 30rpx;
		border-radius: 20rpx;
		opacity: 0.1;
		background-color: #000000;
	}
}
.info-box {
	width: calc(100% - 100rpx);
	margin: 0 50rpx;
	position: relative;
	margin-top: -64rpx;
	background-color: #ffffff;
	.info-amount {
		height: 150rpx;
		line-height: 150rpx;
		text-align: center;
		color: var(--main);
		font-weight: bold;
		font-size: 60rpx;
		border-bottom: 4rpx dashed #f3f3f3;
	}
	.left-circle {
		background-color: var(--bgcolor);
		position: absolute;
		width: 40rpx;
		height: 40rpx;
		border-radius: 50%;
		top: calc(150rpx - 20rpx);
		left: -20rpx;
	}
	.right-circle {
		background-color: var(--bgcolor);
		position: absolute;
		width: 40rpx;
		height: 40rpx;
		border-radius: 50%;
		top: calc(150rpx - 20rpx);
		right: -20rpx;
	}
	.info-main {
		padding: 30rpx;
		font-size: 26rpx;
		color: #333333;
		.info-cell {
			/* #ifndef APP-NVUE */
			display: flex;
			/* #endif */
			line-height: 50rpx;
			.left {
				width: 200rpx;
				text-align: left;
			}
			.right {
				flex: 1;
				text-align: right;
			}
		}
	}
}
.uni-ad {
	margin-top: 50rpx;
	min-height: 100rpx;
	.ad-interactive {
		text-align: center;
	}
}
.button-query {
	background-color: var(--main);
	color: #ffffff;
	width: calc(100% - 120rpx);
	margin: 50rpx 60rpx 0 60rpx;
	padding: 20rpx 30rpx;
	border-radius: 50rpx;
	text-align: center;
	box-sizing: border-box;
}
.button-query:active {
	opacity: 0.7;
}

.button-query1 {
	border: 1rpx solid var(--main);
	color: var(--main);
	width: calc(100% - 120rpx);
	margin: 50rpx 60rpx 0 60rpx;
	padding: 20rpx 30rpx;
	border-radius: 50rpx;
	text-align: center;
	box-sizing: border-box;
}

.footer-hr {
	height: 100rpx;
	display: block;
}
</style>
