
<style lang="less">
	.green_price {
		height: 400rpx;
		.tips {
			color: rgba(35, 35, 40, 0.5);
		}
		.price {
			font-size: 80rpx;
			color: rgba(35, 35, 40, 1);
		}
	}
	.count_box {
		border-radius: 20rpx;
		padding: 30rpx 20rpx;
		justify-content: space-between;
		.item {
			margin-bottom: 40rpx;
			width: 322rpx;
			.icon_bg {
				width: 70rpx;
				height: 70rpx;
				border-radius: 50%;
				color: #fff;
				margin-right: 20rpx;
				background: linear-gradient(-90deg, rgb(235, 158, 132), rgb(211, 108, 89));
			}
		}
	}
</style>
<template>
	<view class="padding-30">
		<view class="green_price flex flex-center flex-column">
			<text class="tips">今日绿色积分指导价</text>
			<text class="price font46 f-b">{{ greenPrice }}</text>
		</view>
		<view class="count_box bg-w flex flex-wrap">
			<view class="item flex flex-align-center">
				<view class="icon_bg flex flex-center">
					<text class="zyhs zyhs-xiaohui"></text>
				</view>
				<view>
					<text class="font30 color-b9">昨日销毁</text>
					<view class="font42">
						{{ intergralStats.destroyedYesterday }}
					</view>
				</view>
			</view>
			<view class="item flex flex-align-center">
				<view class="icon_bg flex flex-center">
					<text class="zyhs zyhs-zonglan"></text>
				</view>
				<view>
					<text class="font30 color-b9">总销毁</text>
					<view class="font42">
						{{ intergralStats.totalDestroyed }}
					</view>
				</view>
			</view>
			<view class="item flex flex-align-center">
				<view class="icon_bg flex flex-center">
					<text class="zyhs zyhs-daishifang"></text>
				</view>
				<view>
					<text class="font30 color-b9">待释放</text>
					<view class="font42">
						{{ intergralStats.waitRelease }}
					</view>
				</view>
			</view>
			<view class="item flex flex-align-center">
				<view class="icon_bg flex flex-center">
					<text class="zyhs zyhs-qiandai"></text>
				</view>
				<view>
					<text class="font30 color-b9">总释放</text>
					<view class="font42">
						{{ intergralStats.totalRelease }}
					</view>
				</view>
			</view>
			<view class="item flex flex-align-center flex-1">
				<view class="icon_bg flex flex-center">
					<text class="zyhs zyhs-lieri"></text>
				</view>
				<view>
					<text class="font30 color-b9">今日释放</text>
					<view class="font42">
						{{ intergralStats.toDay }}
					</view>
				</view>
			</view>
			<view class="item flex flex-align-center flex-1">
				<view class="icon_bg flex flex-center">
					<text class="zyhs zyhs-dashang"></text>
				</view>
				<view>
					<text class="font30 color-b9">发行总量</text>
					<view class="font42">
						{{ intergralStats.totalIssued }}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import url from '@/common/http/url.js';
	export default {
		data() {
			return {
				greenPrice: 0,
				intergralStats: {}
			};
		},
		onLoad() {
			this.getGreenPrice();
			this.getIntegralStats();
		},
		methods: {
			getGreenPrice () {
				this.$http("GET", url.user.getGreenPrice).then(res=>{
					let { code, data } = res;
					if (code == 200) {
						this.greenPrice = data;
					}
				})
			},
			getIntegralStats () {
				this.$http("GET", url.asset.getIntergralStats).then(({ code, data}) => {
					if (code == 200) this.intergralStats = data;
				})
			}
		}
	}
</script>

