<template>
	<view>
		<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20"
		:style="'background-color: '+theme.bg+';color: '+theme.text">
			<myNav slot="top" :title="i18n.licai.text24"></myNav>
			
			<view  class="listBox" v-for="(item,index) in list" :key="index"
			:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
				<view class="flex-1 height-100b padding-c-20 padding-w-24 flex direction-column justify-between" style="border-radius: 40rpx 0 0 40rpx;">
					<view class="height-50 flex align-center">
						<text class="font-26">{{i18n.licai.text25}}：<span class="color-3C2E33">{{item.name}}</span></text>
					</view>
					<view class="height-50 flex align-center">
						<text class="font-26">{{i18n.licai.text14}}：<span class="color-3C2E33">{{item.num}} {{item.curr_name}}</span></text>
					</view>
					<view class="height-50 flex align-center">
						<text class="font-26">{{i18n.licai.text13}}：<span class="color-3C2E33">{{item.rixi}}%</span></text>
					</view>
					<view class="height-50 flex align-center">
						<text class="font-26">{{i18n.licai.text22}}：<span class="color-3C2E33">{{item.rixi}}% * {{item.day}} = {{item.rixi*item.day}}%</span></text>
					</view>
					<view class="height-50 flex align-center">
						<text class="font-26">{{i18n.licai.text26}}：
							<span v-if="item.status==0" class="color-999999">{{i18n.licai.text27}}</span>
							<span v-if="item.status==1" class="color-0165EE">{{i18n.licai.text28}}</span>
						</text>
					</view>
					<view class="height-50 flex align-center">
						<text class="font-26">{{i18n.licai.text29}}：<span class="">{{item.addtime}}</span></text>
					</view>
				</view>
				
				<view class="height-320 width-4 radiu-10" style="background-color: rgba(191, 195, 199, 0.2);"></view>
				
				<view @click="router.push('/pages/index/money/details?id='+item.id)" class="width-104 height-100b flex align-center justify-center padding-w-30">
					<text class="font-26 line-height-50 text-center">{{i18n.licai.text30}}</text>
				</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) {
				this.post('/product/product_user').then(res => {
					if (res.code == 1) {
						console.log('数据', res)
						this.$refs.paging.complete(res.data);
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	.listBox {
		width: 670rpx;
		height: 360rpx;
		// background: #FAFAFA;
		box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12, 21, 238, 0.2);
		border-radius: 10rpx;
		margin: 16rpx auto;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
</style>
