<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="https://www.thymeleaf.org ">
<head>
    <title th:text="'采美365网-'+${supplier.name}">采美365网-供应商首页</title>
    <template th:replace="components/head-link"></template>
    <link th:href="@{/css/supplier/index.css(v=${version})}" rel="stylesheet" type="text/css">
</head>
<body>
<!-- 引用头部 -->
<template th:replace="components/header"></template>

<!-- 供应商首页 -->
<div id="supplierHome">
    <div class="supplierTit">
        <!--首页图片轮播-->
        <div id="supplierBanner" class="swiper-container">
            <ul class="swiper-wrapper">
                <li class="swiper-slide mfc" v-for="imgUrl in supplierBanner">
                    <img :src="imgUrl">
                </li>
            </ul>
            <div class="swiper-pagination mfc"><span v-if="isPC" v-for="i in supplierBanner.length"></span></div>
            <a class="swiper-button-prev" href="javascript:void(0)"></a>
            <a class="swiper-button-next" href="javascript:void(0)"></a>
        </div>
        <div class="title">
            <img th:src="${supplier.logo}">
            <h1 th:text="${supplier.name}"></h1>
            <a href="javascript:void(0);"><i class="icon mIcon shop"><em class="tips">点击查看授权牌照</em></i></a>
        </div>
        <div class="search">
            <input class="keyword" v-model.trim="params.keyword" type="text" placeholder="请输入商品名称（商铺内商品）">
            <a class="searchBtn icon mIcon" href="javascript:void(0);" @click="supplierSearch()" @keyup="keyupSearch()"></a>
        </div>
    </div>

    <div class="supplierInfo">
        <div class="tabTit">
            <span class="on">产品展示</span>
            <span>公司介绍</span>
            <a v-if="!isPC" class="showSearch" href="javascript:void(0);">商铺内搜索</a>
        </div>
        <div class="tabCon">
            <div class="item productBox">
                <div class="part">
                    <div class="title">主推商品</div>
                    <!--主推商品列表-->
                    <ul class="productList clear mfw">
                        <li class="productItem mfc" v-for="p in mainProducts">
                            <div class="item">
                                <a class="image" :href="'/product-'+p.id+'.html'" target="_blank">
                                    <img :src="p.image" :alt="p.name">
                                    <span v-if="p.actType==1||p.actType==2" :class="p.actType==1?'icon mIcon hot':'icon mIcon new'"></span>
                                </a>
                                <a class="name" :href="'/product-'+p.id+'.html'" target="_blank">
                                    <span v-html="p.name"></span>
                                </a>
                                <div class="price mfhc">
                                    <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                        <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                        <template v-if="p.priceFlag==1">
                                            <em>￥价格未公开</em>
                                            <div class="btnBox">
                                                <a href="javascript:void(0)" class="btn cat">价格未公开，请联系 0755-22907771</a>
                                            </div>
                                        </template>
                                        <template v-else>
                                            <template v-if="p.priceFlag==0 || p.userIdentity==2 || (p.userIdentity==3 && p.supplierId==GLOBAL_SHOP_ID)">
                                                <em class="p" v-text="'￥'+parseFloat(p.price).toFixed(2)"></em>
                                                <span class="listTag" v-if="p.actStatus==1">{{p.promotions.name}}</span>
                                            </template>
                                            <template v-else-if="p.priceFlag==2 && p.userIdentity!=2">
                                                <em>￥会员可见</em>
                                                <div class="btnBox">
                                                    <a href="/upgrade.html" class="btn">升级会员查看价格</a>
                                                </div>
                                            </template>
                                            <template v-else>
                                                <em>￥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
                                            </template>
                                        </template>
                                    </template>
                                    <template v-else>
                                        <em>￥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
                                        <div class="btnBox"><a href="javascript:void(0)" class="btn add toLogin">登录查看价格</a></div>
                                    </template>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="part">
                    <div class="title" id="supProduct">供应商产品</div>
                    <!--主推商品列表-->
                    <ul class="productList clear mfw">
                        <li class="productItem mfc" v-for="p in productLists">
                            <div class="item">
                                <a class="image" :href="'/product-'+p.id+'.html'" target="_blank">
                                    <img :src="p.image" :alt="p.name">
                                    <span v-if="p.actType==1||p.actType==2" :class="p.actType==1?'icon mIcon hot':'icon mIcon new'"></span>
                                </a>
                                <a class="name" :href="'/product-'+p.id+'.html'" target="_blank">
                                    <span v-html="p.name"></span>
                                </a>
                                <div class="price mfhc">
                                    <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                        <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                        <template v-if="p.priceFlag==1">
                                            <em>￥价格未公开</em>
                                            <div class="btnBox">
                                                <a href="javascript:void(0)" class="btn cat">价格未公开，请联系 0755-22907771</a>
                                            </div>
                                        </template>
                                        <template v-else>
                                            <template v-if="p.priceFlag==0 || p.userIdentity==2 || (p.userIdentity==3 && p.supplierId==GLOBAL_SHOP_ID)">
                                                <em class="p" v-text="'￥'+parseFloat(p.price).toFixed(2)"></em>
                                                <span class="listTag" v-if="p.actStatus==1">{{p.promotions.name}}</span>
                                            </template>
                                            <template v-else-if="p.priceFlag==2 && p.userIdentity!=2">
                                                <em>￥会员可见</em>
                                                <div class="btnBox">
                                                    <a href="/upgrade.html" class="btn">升级会员查看价格</a>
                                                </div>
                                            </template>
                                            <template v-else>
                                                <em>￥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
                                            </template>
                                        </template>
                                    </template>
                                    <template v-else>
                                        <em>￥<i :class="'icon mIcon i'+p.priceGrade"></i></em>
                                        <div class="btnBox"><a href="javascript:void(0)" class="btn add toLogin">登录查看价格</a></div>
                                    </template>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="item infoBox">
                <div class="part">
                    <div class="title">公司基本信息</div>
                    <p><span class="l">公司</span>：<span th:text="${supplier.name}"></span></p>
                    <p><span class="l">满意度</span>：<span><i v-for="i in 5" class="icon mIcon heart"></i></span></p>
                    <p><span class="l">经营范围</span>：<span><em class="tag" th:each="bus: ${supplier.businessScopeArr}" th:text="${bus}"></em></span></p>
                </div>
                <div class="part">
                    <div class="title">公司介绍</div>
                    <div class="cont" th:utext="${supplier.info}"></div>
                </div>
                <div class="part">
                    <div class="title">主打系列产品说明</div>
                    <div class="cont" th:utext="${supplier.productDesc}"></div>
                </div>
                <div class="part">
                    <div class="title">营业执照</div>
                    <div class="photo">
                        <a th:href="${supplier.businessLicense}" target="_blank">
                            <img th:src="${supplier.businessLicense}">
                        </a>
                    </div>
                </div>
                <div class="part">
                    <div class="title">公司资质</div>
                    <div class="photo">
                        <a th:href="${supplier.taxCertificate}" target="_blank">
                            <img th:src="${supplier.taxCertificate}">
                        </a>
                    </div>
                </div>
                <div class="part" th:if="not${#strings.isEmpty(supplier.certificate)}">
                    <div class="title">授权牌照</div>
                    <div class="photo">
                        <a th:href="${supplier.certificate}" target="_blank">
                            <img th:src="${supplier.certificate}">
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>

<!-- 引入底部 -->
<template th:replace="components/footer"></template>
<template th:replace="components/foot-link"></template>
<script charset="utf-8" type="text/javascript" th:src="@{/js/supplier/index.js(v=${version})}"></script>
</body>
</html>
