<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.lockUp.title2"></myNav>
			<!-- 身体 -->
			<view class="width-750 padding-t-24 padding-w-30 padding-b-40">
				<!-- 单一列表 -->
				<view @click="router.push('/pages/index/lockUpDetails?id='+item.id)" v-for="(item,index) in list"
					class="listbox"
					:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
					<view class="flex-1 height-100b flex direction-column justify-between">
						<text class="font-24 color-C3C3C3">{{i18n.lockUp.text9}}</text>
						<text class="font-26 numbold-font">{{item.num}} APT</text>
					</view>
					<view class="flex-1 height-100b flex direction-column align-center justify-between">
						<text class="font-24 color-C3C3C3">{{i18n.lockUp.text2}}</text>
						<text class="font-26 weight-bold">{{item.day}}{{i18n.lockUp.text4}}</text>
					</view>
					<view class="flex-1 height-100b flex direction-column align-end justify-between">
						<text class="font-24 color-C3C3C3">{{i18n.lockUp.text10}}</text>
						<text class="font-26 numbold-font">{{item.add_time}}</text>
					</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('/index/zhiya_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">
	.listbox {
		width: 690rpx;
		height: 117rpx;
		// background: #FFFFFF;
		box-shadow: 0rpx 4rpx 4rpx rgba(205, 206, 219, 0.2);
		border-radius: 20rpx;
		padding: 22rpx;
		display: flex;
		margin-bottom: 30rpx;
	}
</style>
