<template>
	<view>
		<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20"
			:style="'background-color: '+theme.bg+';color: '+theme.text">
			<!-- 下拉刷新 -->
			<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
			</custom-refresher>

			<myNav slot="top" :title="i18n.fastBuy.title2"></myNav>
			<!-- 身体 -->
			<view class="width-750 padding-w-30 padding-t-32 padding-b-40">
				<view v-for="(item,index) in list" class="box" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
					<view class="padding-w-30 height-74 flex align-center font-24">
						<text>{{i18n.fastBuy.text12}}：</text>
						<text class="numbold-font">{{item.createtime}}</text>
					</view>
					<view class="height-1 width-100b" style="background: rgba(191,195,199,0.3);"></view>
					<view class="height-105 flex padding-w-30">
						<view class="height-105 flex-1 flex direction-column padding-c-16 justify-between">
							<text class="font-24 color-C3C3C3">{{i18n.fastBuy.text13}}</text>
							<text class="font-24 numbold-font">{{item.num}}</text>
						</view>
						<view class="height-105 flex-1 flex direction-column align-end padding-c-16 justify-between">
							<text class="font-24 color-C3C3C3">{{i18n.fastBuy.text14}}</text>
							<text class="font-24 numbold-font">{{item.symbol}}{{item.price}}</text>
						</view>
					</view>
				</view>
			</view>

		</z-paging>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				theme: '',
			}
		},
		computed: {
			i18n() {
				return this.$t('message');
			}
		},
		onShow() {
			if (uni.getStorageSync("theme") == "dark") {
				this.theme = this.$store.state.darkTheme
			} else {
				this.theme = this.$store.state.lightTheme
			}
		},
		methods: {
			queryList(pageNo, pageSize) {
				setTimeout(() => {
					this.post('/Marketpay/order_list', {
						page: pageNo,
						page_num: pageSize
					}).then(res => {
						if (res.code == 1) {
							console.log(res)
							this.$refs.paging.complete(res.data.data);
						}
					})
				}, 500)
			},
		}
	}
</script>

<style lang="scss">
	.box {
		width: 690rpx;
		height: 180rpx;
		// background: #FFFFFF;
		box-shadow: 0rpx 4rpx 4rpx rgba(205, 206, 219, 0.2);
		opacity: 1;
		border-radius: 20rpx;
		margin-bottom: 20rpx;
	}
</style>
