<template>
	<view>
		<!--template/supplier/supplier.wxml-->
		<template name="supplier_premium">
			<view :class="supplierTemplate.theme==2?'pdlr20':''"  v-if="about.is_open_supply_chain==1&&supplierTemplate&&supplierTemplate.state==0&&supplierList.products.length>0">
				<!-- 供应商产品 -->
				<view class="mt20  r10" :style="'background:' + supplierTemplate.backgroundColor">
					<navigator class="head" hover-class="none" :url="'/product/list/list?categoryId=1&title=' + (supplierTemplate.titleType==1?supplierTemplate.titleCon:supplierTemplate.titleSubtitle) + '&supplier=' + supplierTemplate.contentId + '' + web">
						<view class="titleNav pdlr20 dflex" v-if="supplierTemplate.titleType==1">{{supplierTemplate.titleCon}}
							<image src="/static/pages/images/more.png" class="more"></image>
						</view>
						<image lazy-load="true" v-if="supplierTemplate.titleType==2" :src="supplierTemplate.titleCon + '?x-oss-process=style/w750-auto'"
						 mode="widthFix" class="imgtit"></image>
					</navigator>
					<view :class="supplierTemplate.theme==2?'':'pdlr20'">
						<goods-list :pageList="supplierList" :about="about" :merchant="web"></goods-list>
					</view>

					<!-- <view class="jingxuan dflex pdlr20 {{supplierTemplate.lineNumber == 3 ? 'tabconTh' : ''}}">
        <block wx:for="{{supplierList}}" wx:key="index">
          <navigator url="/product/detail/detail?id={{item.id}}{{merchant.type==5?web:url}}" hover-class="none"
            class="li">
            <image lazy-load="true" src="{{item.pic + '?x-oss-process=style/w210'}}" mode="aspectFit"></image>
            <view class="name">{{item.title}}</view>
            <view class="price">
              ￥<text>{{about.show_membership_price==1&&item.actualPrice<item.salePrice?item.actualPrice:item.salePrice}}</text>
              <text class="vip"
                wx:if="{{about.show_membership_price==1&&item.membersPrice<item.salePrice}}">会员：{{item.membersPrice}}</text>
              <text class="del" wx:else>￥{{item.marketPrice}}</text>
            </view>
          </navigator>
        </block>
      </view> -->
				</view>
			</view>
		</template>
	</view>
</template>

<script>
	import goodsList from "../../components/goodsList/goodsList";

	export default {
		data() {
			return {};
		},

		components: {
			goodsList
		},
		props: {
			supplierTemplate: Object, //供应商配置
			web: String, //路由跳转
			about: Object, //参数配置
			supplierList: Object //{backgroundColor:背景颜色,displayStyle: 样式模板,lineNumber:每行几个,products:产品列表}
		},
		methods: {}
	};
</script>
<style>
	@import "./supplier.css";
</style>
