<template>
	<view class="b-GroupBuy" @tap="Details">
		<!-- 时间 -->
		<view class="b-GroupBuy-Date">
			{{data['date']}}
		</view>
		<!-- 单子数量 -->
		<view class="b-GroupBuy-Quantity">
			共{{data['order_num']}}单
		</view>
		<view class="b-GroupBuy-Amount">
			￥{{RetainDecimalPoint(data['total_mount'])}}
			<text class="icon iconfont icon-youjiantou"></text>
		</view>
	</view>
</template>

<script>
	import mixin from '@/static/js/mixin.js'
	export default {
		name: "b-GroupBuy",
		mixins: [mixin],
		props: {
			data: {
				type: Object,
				default: -1
			}
		},
		data() {
			return {

			};
		},
		methods: {
			Details() {
				// 时间戳格式
				let t = new Date(this['data']['date']).getTime() / 1000;
				uni.navigateTo({
					url: `/b_client/AccountDetails/AccountDetails?date=${this['data']['date']}`
				})
			}
		}
	}
</script>

<style lang="scss">
	.b-GroupBuy {
		position: relative;
		margin-bottom: 40rpx;

		&-Date {
			color: #666666;
			font-size: 22rpx;
			line-height: 60rpx;
		}

		&-Quantity {
			line-height: 60rpx;
			font-size: 24rpx;
		}

		&-Amount {
			position: absolute;
			right: 0;
			top: 50%;
			transform: translateY(-50%);
			line-height: 60rpx;
			font-size: 24rpx;

			.icon {
				font-size: 30rpx !important;
				margin-left: 20rpx !important;
			}
		}
	}
</style>
