<template>
	<view class="">
		<view class="head">
			<view class="money">
				总资产（元）
				<view class="" style="margin-top: 35rpx;font-size: 35rpx;">
					￥ {{money.toLocaleString('zh-CN' ||0)}}
				</view>
			</view>
		</view>
		<view class="cont" v-if='show'>
			<view class="tit">
				订单明细
			</view>
			<view class="card" v-for="(item,index) in orderList" :key='index'>
				<view class="card-top">
					<view class="">
						{{item.create_time}}
					</view>
					<view class="" style="color: #6A92EB;">
						交易成功
					</view>
				</view>
				<view class="card-bottom" style="margin-top: 30rpx;">
					<view class="order_detail">
						<view class="content" style="display: flex;justify-content: space-between;">
							<view class="" v-if="item.order_info" style="display: flex;align-items: center;">
								<u--image :showLoading="true" width="70rpx" height="70rpx"
									:src="item.order_info.image"></u--image>
								<view class="" style="margin-left: 20rpx;">
									{{item.order_info.store_name}}
								</view>
							</view>

							<view class="">
								￥{{item.order_money}}
							</view>
						</view>
					</view>
					<view class="">
						订单编号:{{item.order_no}}
					</view>
				</view>
			</view>
			<view class="" v-if='orderList.length==0'>
				<u-empty icon="/static/newWork/index/empty.png" iconSize='200' width='300' height="300" marginTop='50'
					textColor='#BFD7FF' text="没有更多了~"></u-empty>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getFirstOrderLog,
	} from "@/api/newTask.js"
	export default {
		data() {
			return {
				orderList: [],
				flag: false,
				status: "",
				page_no: 0,
				page_size: 20,
				money: "",
				show: true,
				list: [],
			}
		},
		methods: {
			async getFirstOrderLogList() {

				let res = await getFirstOrderLog()
				this.orderList = res.data.lists

			}
		},
		onLoad(option) {
			this.getFirstOrderLogList()
			this.money = Number(option.money)
		}

	}
</script>

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

	.head {
		width: 750rpx;
		background-color: #2B63E3;
		height: 200rpx;
		position: relative;

		.money {
			width: 670rpx;
			background-color: rgba(255, 255, 255, .2);
			box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
			height: 220rpx;
			margin: 0 auto;
			border-radius: 20rpx;
			position: absolute;
			left: 50%;
			top: 100%;
			transform: translate(-50%, -50%);
			backdrop-filter: blur(50rpx);
			color: white;
			padding: 20rpx;

		}
	}

	.cont {
		// width: 690rpx;
		margin: 120rpx auto;
		padding: 20rpx;

		.tit {
			position: relative;
			padding-left: 20rpx;
			font-size: 30rpx;
			color: #1A1A1A;
			font-weight: bold;

		}

		.tit::before {
			content: "";
			position: absolute;
			top: 50%;
			transform: translateY(-50%);
			left: 0;
			width: 6rpx;
			/* 左边框的宽度 */
			height: 25rpx;
			border-radius: 20rpx;
			background-color: #2B63E3;
		}

		.card {
			background-color: #fff;
			padding: 20rpx;
			border-radius: 20rpx;
			margin-top: 20rpx;
			box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);

			.card-top {
				display: flex;
				justify-content: space-between;
			}
		}
	}

	.content {
		width: 100%;
		padding: 20rpx;
		background-color: #F5F5F5;
		height: 80rpx;
		align-items: center;
		margin: 10rpx 0;
	}
</style>