<template>
	<view style="width: 100%;height: 100vh;background-color: red;">

		<view >
			<view style="width: 100%;height: 10vh;font-size: 20px;color: floralwhite;text-align: center;line-height: 10vh;font-weight: bold;">10-30万价值黄金提现</view>
			<view style="margin-top: 82px;">
				<!-- <view class="content">
					<view class="" style="font-size: 15px;text-align: center;color: red;">
						<view class="">
							针对审核速度缓慢问题,现为加快审核速度
						</view>
						<view class="">
							银监会特批福云2024专项审核通道,进入通道审核快至2小时内到账!
						</view>
						<view class="">

						</view>
						<view class="">
							(到账后自动退返200元至绑定银行卡)
						</view>
					</view>
					<view class="" style="font-size: 24px;color: red;margin: 20px 0;">
						¥{{mony}}元
					</view>

				</view> -->
				<view style="width: 100%;height: 35vh;margin-top: -80px; background-image: url('../../static/xxx22.jpg');background-size: 100% 100%; background-position: center; background-repeat: no-repeat;">

				</view>
				<view class="pop" style="width:100%;height: 200px;margin-top: 20px;width: 90%;margin-left: 20px;background-color: #fff;border-radius: 10px;height: 30vh; ">

					<view class="pays" style="display: flex;flex-direction: column;">
						<view style="width: 90%;border-bottom: 1px solid black;height: 30px; margin-left: 15px;color: #000;font-size: 18px;display: flex;line-height: 30px;">
							<view style="font-size: 14px;font-weight: bold;">加工捐助</view><view style="font-size: 20px;font-weight: bold;color: red;">¥{{mony}}</view>
						</view>

						<text style="margin-left: 15px;color: #000;font-size: 18px;margin-top: 5px;font-size: 14px;color:grey; ">请选择支付方式</text>
						<view class="" style="margin-top: 10px;">
							<u-radio-group v-model="radiovalue" placement="column" @change="groupChange"
								iconPlacement="right" style="width: 90%; margin: 0 auto; ">
								<view class="demo" v-if="wechat==1" style="position: relative;margin-bottom: 10px;">
									<view class="item" style="position: absolute; ">
										<image src="@/static/payup/wx.svg" mode="" style="width: 20px;height: 20px;">
										</image>
									</view>
									<u-radio style="margin-left: 25px;" labelSize="40rpx" labelColor="fff"
										:customStyle="{marginBottom: '8px'}" name="wechat" label="微信支付"
										@change="radioChange">
									</u-radio>
								</view>
								<view class="demo" v-if="zfb==1" style="position: relative;margin-bottom: 5px;">
									<view class="item" style="position: absolute; ">
										<image src="@/static/payup/zfb.svg" mode="" style="width: 20px;height: 20px;">
										</image>
									</view>
									<u-radio style="margin-left: 25px;" labelSize="40rpx" labelColor="fff"
										:customStyle="{marginBottom: '8px'}" name="ali" label="支付宝支付"
										@change="radioChange">
									</u-radio>
								</view>
								<view class="demo" v-if="yl==1" style="position: relative;margin-bottom: 5px;border-bottom: 1px solid #dde3e9;">
									<view class="item" style="position: absolute; ">
										<image src="@/static/payup/yinlian.svg" mode="" style="width: 20px;height: 20px;">
										</image>
									</view>
									<u-radio style="margin-left: 25px;" labelSize="40rpx" labelColor="fff"
										:customStyle="{marginBottom: '8px'}" name="yl" label="银联支付"
										@change="radioChange">
									</u-radio>
								</view>
								<!-- <view style="margin-left: 15px;color: #000;font-size: 18px;margin-top: 5px;font-size: 14px;color:grey;">支付说明:XXXXXXXXXXXXXXXXXXXXXXXXXXXXX</view> -->
								
				
							</u-radio-group>
						</view>
					</view>
					
				</view>
				<view style="width: 100%;height: 3vh;font-size: 12px;color: #cc9933;margin-left: 30px;">参与扶贫贫善行动后在我的订单内查看黄金额度提现状态</view>
				<button class="btnsss" @click="submit" v-if='!iscould' style="width: 85%;margin-top: 20px;">{{btn}}</button>
					<button class="btnsss" v-else>提交确认,请勿退出{{seconds}}</button>

			</view>
			

		</view>
	</view>



</template>

<script>
	export default {

		data() {
			return {
				info: '',
				btn: '立即支付',
				mony: 1000,
				seconds: 6,
				iscould: false,
				passshow: false,
				pass: '',
				radiovalue: 'wechat',
				zhifulist: [],
				id: 3,
				urls: '/ops/daybook',
				wechat: 1,
				zfb: 1,
				yl: 1, // 确保这里的值为1
				content: '',
				title: '',

			}
		},

		onLoad(val) {

		},
		onShow() {
			let data = {
				noticeType: 3
			}

		},
		methods: {
			groupChange(n) {},
			radioChange(n) {},

			countDown() {
				// 如果秒数不为0,就继续减少秒数
				if (this.seconds > 0) {
					this.seconds--;
					setTimeout(this.countDown, 1000);
				} else {
					this.iscould = ""
					this.seconds = 6;
				}
			},
			// 确认添加
			submit() {
				this.iscould = "false"
				if (!this.radiovalue) {
					uni.showToast({
						title: "请选择支付方式",
						icon: "none"
					})
					return
				}
				let timer1 = setTimeout(() => {
					this.countDown()
					clearTimeout(timer1);
				}, 1000);
				let data = {
					remark: this.radiovalue,
					balance: this.mony,
					type: 2,
					productId:11



				}
				this.$request(`${this.urls}`, data, 'post', true).then((res) => {
					if (res.data.code == 200) {
						let script = res.data.msg
						console.log(res);
						// #ifdef APP
						plus.runtime.openURL(encodeURI(script))
						// #endif
						// #ifdef H5
						location.href = script
						// #endif
						this.close()
					} else {
						uni.showToast({
							title: res.data.msg,
							icon: "none"
						})
					}
				})


			},
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #F1F5FA;
	}

	.btnsss {
		border-radius: 20px;
		color: #fff;
		width: 80%;
		height: 44px;
		background-color: #cc9933;
		line-height: 44px;
		margin-top: 18px;
	}

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background-color: #fff;
		// margin: 10px auto 0;
		// height: 160px;
		width: 100%;
		border-radius: 15px;
		box-sizing: border-box;
		// padding: 20px 15px;
		box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;

		.item {
			// background-color: red;
			display: flex;
			height: 60px;
			align-items: center;
			color: rgba(178, 178, 178, 1);
			margin: 0px auto;
			width: 90%;
			border-bottom: 1px solid #979797;

			.inp {
				flex: 1;
				text-align: right;
				height: 40px;
				text-indent: 20px;
				color: #3C4951;
			}
		}

		// .item {
		// 	display: flex;
		// 	height: 80px;
		// 	flex-direction: column;
		// 	justify-content: space-around;
		// 	color: rgba(178, 178, 178, 1);
		// 	margin: 0 auto;
		// 	width: 90%;

		// 	.inp {
		// background-color:#F7F7F7
		// 		border-radius: 6px;
		// 		height: 40px;
		// 		text-indent: 20px;
		// 		color: #3C4951;
		// 	}
		// }
	}
</style>