<template>
	<u-mask :show="show">
		<view class="warp">
			<view class="rect" @tap.stop>
				<view class="cq_one">
					<view style="font-size: 40rpx;font-weight: bold;">智能搜索优惠券</view>
					<view class="u-m-t-10">
						<u-icon name="search" color="#fff" size="26" class="u-m-r-10"></u-icon>
						猜你想找以下商品
					</view>
					<view class="sanjiao u-m-t-10"></view>
				</view>
				<view class="cq_two">
					<view class="u-flex cq_two_top">
						<view class="uni-product-list">
							<view class="uni-product" v-for="(product,index) in productList" :key="index" @tap="onClick(product)">
								<view class="xiabufen u-m-l-10">
									<view class="u-flex" style="align-items: center;">
										<view class="uni-product-title">
										{{product.title}}
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
					<view class="cq_two_bottom">
						<u-button shape="circle" type="primary" style="height: 60rpx;line-height: 60rpx;font-size: 25rpx;"
						@click="dump('/other/chaquan-list/chaquan-list')">搜索</u-button>
					</view>
				</view>
				<view class="u-m-t-50" style="text-align: center;">
					<u-icon name="close-circle" color="#fff" size="45" @click="close"></u-icon>
				</view>
			</view>
		</view>
	</u-mask>
</template>

<script>
	import {dumpUrl} from '@/common/util.js'
	export default {
		data() {
			return {
				current: 0,
				show: true,
				productList: [
					{
						image: 'https://gd2.alicdn.com/imgextra/i2/4065419919/O1CN010QvQFi2N8xCB2XPcg_!!4065419919.jpg',
						pingtai:'../../static/modelone/pt_tm.png',
						title: '秋装衬衫女2020新款设计款拼接雪纺长袖修身褶皱设计短款显瘦上衣',
						xiaoliang:568,
						favourPrice: 385,
						yuanjia:658,
						fan: 15.36,
						quan:2.35,
						
					}
				],
				renderImage: true,
			};
		},
		props: {
			// 导航栏高度，单位px，非rpx
			tplName: {
				type: String,
				default: ''
			}
		},
		methods: {
			close(){
				this.show = false;
			},
			dump(url) {
				dumpUrl(url);
			}
		}
	}
</script>

<style>
	.warp {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100%;
	}
	.rect{
		width: 78%;
	}
	.cq_one{
		margin: 0 auto;
		text-align: center;
		padding: 40rpx 0 15rpx 0;
		color: #fff;
		border-top-left-radius: 20rpx;
		border-top-right-radius: 20rpx;
		background: url(../static/tan.jpg) no-repeat;
		background-size: 100% 100%;
	}
	.sanjiao{
		width:0;
		height:0;
		border-right:10px solid transparent;
		border-left:10px solid transparent;
		border-bottom:10px solid #fff;
		margin: 0 auto;
	}
	.cq_two{
		margin-top: -20rpx;
		padding: 15rpx;
		border-radius: 20rpx;
		background: #fff;
	}
	.uni-product-list {
	    display: flex;
	    width: 100%;
	    flex-wrap: wrap;
	    flex-direction: row;
	}
	
	.uni-product {
	    padding: 20upx 14upx;
	    display: flex;
		font-size: 22rpx;
	}
	
	.image-view {
	    height: 150upx;
	    width: 150upx;
	}
	
	.uni-product-image {
	    height: 100%;
	    width: 100%;
		border-radius: 15upx;
	}
	
	.uni-product-title {
	    width: 100%;
		margin:30rpx 0;
	    word-break: break-all;
	    display: -webkit-box;
	    overflow: hidden;
		line-height:2;
		font-size: 26rpx;
	}
	
	.uni-product-price {
		padding:10rpx;
		margin-top:10upx;
	    font-size: 28upx;
		line-height:1.5;
	    justify-content: space-between;
	}
	
	.uni-product-price-original {
	    color: #e80080;
		font-weight: bold;
	}
	
	.uni-product-price-favour {
	    color: #888888;
		text-decoration:line-through;
		font-size: 22rpx;
	}
	
	.xiabufen{
		padding-bottom: 10upx;
		border-top:none;
		border-bottom-left-radius: 15upx;
		border-bottom-right-radius: 15upx;
	}
	.quan_fan .quan{
		padding: 5rpx 10rpx;
		border-radius: 5rpx;
		background:#fb6769;
		color: #fff;
	}
	.quan_fan .quan view{
		padding: 0 8rpx;
		background: #fff;
		color: #fb6769;
		border-radius: 5rpx;
		font-size: 20rpx;
	}
	.quan_fan .fan{
		color: #ff2146;
		background: #fae9ee;
		padding: 5rpx 10rpx;
		border-radius: 5rpx;
	}
	.cq_two_bottom button{
		background: linear-gradient(to right,#ff6942,#ff1d4f);
	}
</style>
