<template>
<view class="box">
	<view style="height: 20rpx;"></view>
 <view class="line" v-for="(item,index) in list">
	 <view class="linetop">
		 <view class="name">{{item.CustomerName}}</view>
		 <view class="amount">￥{{item.BonusMoney}}</view>
	 </view>
	 <view class="lineCOnt">
		 <view class="lineline">
		 	<view class="lineContLeft">
				 <image src="../../static/timg/icon_dianhua.png" mode="" class="lineContLeftImg"></image>
				 <view class="lineContLeftMs">{{item.MobilePhone}}</view>
		 	</view>
		 </view>
		<view class="lineline">
			<view class="lineContLeft">
				 <image src="../../static/timg/icon_danhao.png" mode="" class="lineContLeftImg"></image>
				 <view class="lineContLeftMs">{{item.Code}}</view>
			</view>
			<view class="lineTIme">{{item.BillDate}}</view>
		</view>
	 </view>
 </view>
 <nodata v-if="list.length==0"></nodata>
</view>
</template>

<script>
	import nodata from '../../components/nodata/nodata.vue'
	export default {
		components: {
			nodata
		},
		
		data() {
			return {
				list:'',
				themeColor:'',
				userInfo:'',
				page:1,
				limit:20,
			}
		},
		onLoad(opt) {
			this.themeColor = uni.getStorageSync("themeColor");
			this.userInfo = uni.getStorageSync("userInfo");
			this.getList()
		},
		onShow() {
			
		},
		methods: {
			getList(){
				uni.showLoading({
					title: '加载中'
				})
				this.$http('opencarInfoOwner/listBonusPage', {
				    page:this.page,limit:this.limit,
				}, 'GET').then(res => {
					uni.hideLoading();
					//this.list = res.data.Items
					var data=res.data.Items;
					this.list=this.list.concat(data);
					//console.log('list+=', this.queryShopList);
				
				})
			}
			
		},
		onReachBottom(){
			this.page++;
			this.getList()
			//console.log("shanglas")
		},
		onPullDownRefresh(){
		    this.page=1;
			this.list=[];
			this.getList();
			setTimeout(() => {
					uni.stopPullDownRefresh(); // 关闭下拉刷新 
			}, 2000);
		}
	}
</script>

<style scoped lang="less">
.box {
	width: 100vw;
	min-height: 100vh;
	background: #F4F5F7;
}
.lineContLeftImg{
	width: 30rpx;
	height: 30rpx;
	margin-right: 10rpx;
}
.line{
	width: 702rpx;
	background: #FFFFFF;
	border-radius: 10rpx;
	margin-bottom: 20rpx;
	margin-left: 24rpx;
}
.linetop{
	display: flex;
	justify-content: space-between;
	font-size: 30rpx;
	padding: 20rpx;
	padding-bottom: 0;
}
.lineline{
	display: flex;
	justify-content: space-between;
	padding: 20rpx;
	font-weight: 400;
	color: #999999;
	font-size: 24rpx;
	line-height: 30rpx;
}
.lineContLeft{
	display: flex;
}
.name{
	font-weight: 500;
	color: #3C3C3C;
}
.amount{
	color: #FF0000;
}
</style>
