<template>
	<view class="jy-pay-use pr">
		<!-- 先付后用 -->
		<view class="container-open" v-if="0">
			<image :src="minePayUse" mode="aspectFill"></image>
			<view><span>先用后付</span><span class="success">开通成功</span></view>
		</view>

		<view class="container-close" v-else>
			<image :src="minePayUse" mode="aspectFill"></image>
			<view><span>先用后付</span><span class="success">开通成功</span></view>
			<text class="reel">购买卷轴用户可享用</text>
			<view class="edit-box">
				<uni-section title="当前可用额度（元）">
					<template v-slot:right>
						<view class="df"><text>3000</text>/<text>3000</text></view>
					</template>
				</uni-section>
			</view>
		</view>

		<!-- 底部的关闭服务 -->
		<view class="footer plr30" @click="serverOC" :style="{ bottom: bottomSafeAreaHeight() }">
			<view class="btn lg bar black">{{ minePayUse ? "关闭服务" : "开启服务" }}</view>
		</view>
	</view>


</template>
<script setup>
	import {
		ref
	} from 'vue'
	import minePayUse from '@/static/mine-pay-use.png'
	import {
		screenHeight,
		bottomSafeAreaHeight
	} from '@/components/public/Mixins.js'

	const PayUse = ref(false)
	// 我是关闭服务
	const serverOC = () => {
		console.log('====================================');
		console.log('关闭服务');
		console.log('====================================');
	}
</script>
<style lang="scss" scoped>
	.jy-pay-use {
		background-color: #ffffff;

		.container-open {
			//全屏居中
			width: 100%;
			height: 100%;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;

			image {
				width: 160rpx;
				height: 160rpx;
				margin-bottom: 20rpx;
			}

			.success {
				color: #37B111;
			}
		}

		.container-close {
			//全屏居中
			width: 100%;
			height: 100%;
			display: flex;
			justify-content: flex-start;
			align-items: center;
			flex-direction: column;

			image {
				width: 160rpx;
				height: 160rpx;
			}

			.success {
				color: #37B111;
			}

			.reel {
				color: #999999;
				font-size: 28rpx;
				margin: 4rpx 0 46rpx 0;
			}

			.edit-box {
				width: 100%;
			}

			image {
				width: 160rpx;
				height: 160rpx;
			}

			.success {
				color: #37B111;
			}
		}

		.jy-pay-use-close {
			//左右居中
			width: 100%;
			display: flex;
			justify-content: center;
		}
	}
</style>