<template>
	<view>
		<view class="uni-product-list">
			<view class="uni-product" v-for="(product,index) in productList" :key="index">
				<view class="image-view">
					<image v-if="renderImage" class="uni-product-image" :src="product.image"></image>
				</view>
				<view class="xiabufen">
					<view class="uni-product-price u-m-t-20">
						<view class="uni-product-price-original">
							<text>{{product.jifen}}</text>积分+<text>{{product.favourPrice}}</text>元
						</view>
					</view>
					<view class="uni-product-price">
						<text class="uni-product-price-favour">剩余{{product.xiaoliang}}</text>
					</view>
					<view class="u-m-t-20" style="text-align: center;">
						<view class="buttom"  @click="dump('/pages/jifenproduct/jifenproduct')">兑换</view>
					</view>

				</view>
			</view>
		</view>
		<u-loadmore :status="status" style="margin: 30upx 0;"/>
	</view>
</template>

<script>
	import {dumpUrl} from '@/common/util.js'
	export default {
		components: {
			
		},
		data(){
			return{
				xiadan2:false,
				productList: [
					{
						image: 'https://gd2.alicdn.com/imgextra/i2/4065419919/O1CN010QvQFi2N8xCB2XPcg_!!4065419919.jpg',
						pingtai:'../../../static/modelone/pt_tm.png',
						title: '秋装衬衫女2020新款设计款拼接雪纺长袖修身褶皱设计短款显瘦上衣',
						xiaoliang:568,
						favourPrice: 0,
						jifen:2000
					},
					{
						image: 'https://gd2.alicdn.com/imgextra/i3/1705527408/O1CN013NT7V724auglAR2Va_!!1705527408.jpg',
						pingtai:'../../../static/modelone/pt_tb.png',
						title: '酒红色回门羽绒棉服工装派克服女2020新款冬加厚加绒chic棉衣外套',
						xiaoliang: 784,
						favourPrice: 385,
						jifen:356
					},
					{
						image: 'https://gd2.alicdn.com/imgextra/i1/428737731/O1CN01aibsRJ26yqZQcxh12_!!428737731.jpg',
						pingtai:'../../../static/modelone/pt_pdd.png',
						title: '蕾丝拼接短袖T恤女夏季2020年新款女装韩版宽松打底衫',
						xiaoliang: 784,
						favourPrice: 385,
						jifen:120
					},
					{
						image: 'https://gd2.alicdn.com/imgextra/i4/2190215769/O1CN01liaY491sUFXNudPVU_!!2190215769.jpg',
						pingtai:'../../../static/modelone/pt_jd.png',
						title: 'JMSHOP 清潭洞欧尼 高级中长款西装大衣冬季新款灰色毛呢外套女',
						xiaoliang: 784,
						favourPrice: 385,
						jifen:200
					},
					{
						image: 'https://gd2.alicdn.com/imgextra/i2/4065419919/O1CN010QvQFi2N8xCB2XPcg_!!4065419919.jpg',
						pingtai:'../../../static/modelone/pt_tb.png',
						title: '秋装衬衫女2020新款设计款拼接雪纺长袖修身褶皱设计短款显瘦上衣',
						xiaoliang:568,
						favourPrice: 385,
						jifen:268
					},
					{
						image: 'https://gd2.alicdn.com/imgextra/i3/1705527408/O1CN013NT7V724auglAR2Va_!!1705527408.jpg',
						pingtai:'../../../static/modelone/pt_pdd.png',
						title: '酒红色回门羽绒棉服工装派克服女2020新款冬加厚加绒chic棉衣外套',
						xiaoliang: 784,
						favourPrice: 385,
						jifen:200
					},
					{
						image: 'https://gd2.alicdn.com/imgextra/i1/428737731/O1CN01aibsRJ26yqZQcxh12_!!428737731.jpg',
						pingtai:'../../../static/modelone/pt_tm.png',
						title: '蕾丝拼接短袖T恤女夏季2020年新款女装韩版宽松打底衫',
						xiaoliang: 784,
						favourPrice: 385,
						jifen:200
					},
					{
						image: 'https://gd2.alicdn.com/imgextra/i4/2190215769/O1CN01liaY491sUFXNudPVU_!!2190215769.jpg',
						pingtai:'../../../static/modelone/pt_tb.png',
						title: 'JMSHOP 清潭洞欧尼 高级中长款西装大衣冬季新款灰色毛呢外套女',
						xiaoliang: 784,
						favourPrice: 385,
						jifen:200
					}
				],
				renderImage: true,
				status: 'loadmore',
				iconType: 'flower',
				loadText: {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '实在没有了'
				}
			}
		},
		onReachBottom() {
			if(this.page >= 1) return ;
			this.status = 'loading';
			this.page = ++ this.page;
			setTimeout(() => {
				this.list += 10;
				if(this.page >= 1) this.status = 'nomore';
				else this.status = 'loading';
			}, 2000)
		},
		methods: {
			dump(url) {
				dumpUrl(url);
			}
		}
	}
</script>

<style>
	/* product */
	.uni-product-list {
	    display: flex;
	    width: 100%;
	    flex-wrap: wrap;
	    flex-direction: row;
	}
	
	.uni-product {
	    padding: 30upx 0 0 24upx;
	    display: flex;
	    flex-direction: column;
		cursor: pointer;
	}
	
	.image-view {
	    height: 340upx;
	    width: 340upx;
	}
	
	.uni-product-image {
	    height: 100%;
	    width: 100%;
		border-top-left-radius: 15upx;
		border-top-right-radius: 15upx;
	}
	
	.uni-product-title {
	    width: 298upx;
		padding: 10upx 0 0 10rpx;
	    word-break: break-all;
	    display: -webkit-box;
	    overflow: hidden;
		line-height:2;
	    text-overflow: ellipsis;
	    -webkit-box-orient: vertical;
	    -webkit-line-clamp: 1;
	}
	
	.uni-product-price {
		padding:0 10rpx 10rpx;
	    font-size: 28upx;
		line-height:1.5;
	    display: flex;
		justify-content: space-between;
		align-items: center;
	}
	
	.uni-product-price-original text{
	    color: #894608;
		font-size: 40rpx;
	}
	
	.uni-product-price-favour {
	    color: #888888;
	    margin-left: 10upx;
		font-size: 25rpx;
	}
	
	.xiabufen{
		padding-bottom: 10upx;
		border: 1px solid #eee;
		border-top:none;
		border-bottom-left-radius: 15upx;
		border-bottom-right-radius: 15upx;
		background: #fff;
	}
	.product-shijian{
		display: inline-block;
		margin-top: 15rpx;
		margin-left: 10upx;
		font-size: 21rpx;
		color: #999;
	}
	
		.u-m-t-20 .buttom{
			width: 95%;
			margin: 0 auto;
			line-height: 70rpx;
			color: #fff;
			background: linear-gradient(to right,#e57204,#b45e0e);
			border-radius: 10px;
		}
	
	
	
</style>
