<!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>采美365网-商品详情</title>
    <template th:replace="components/headLink"></template>
    <link th:href="@{/css/product/detail.h5.css(v=${version})}" media="screen and (max-width:768px)" rel="stylesheet" type="text/css">
    <link th:href="@{/css/product/detail.pc.css(v=${version})}" media="screen and (min-width:768px)" rel="stylesheet" type="text/css">
</head>
<body>
<!-- 引用头部 -->
<template th:replace="components/header"></template>

<!-- 商品详情 -->
<div id="productDetail">
    <div class="wrap">
        <div class="productBox clear">
            <div class="imageBox" id="imgShown">
                <div v-if="isPC" class="bigImage">
                    <img :src="images[0]">
                    <span class="mask"></span>
                </div>
                <div id="swiperImage" class="smallImage swiper-container">
                    <ul class="swiper-wrapper clear">
                        <li class="swiper-slide mfc" v-for="img in images">
                            <img :src="img">
                        </li>
                    </ul>
                    <div class="swiper-pagination mfc"></div>
                </div>
                <div v-if="isPC" class="zoomImage">
                    <div class="zoom">
                        <img :src="images[0]">
                    </div>
                </div>
            </div>
            <div class="detailBox" th:object="${product}">
                <div class="crumbs">
                    <span>所属分类：</span>
                    <a th:href="@{'/product/list.html?category=' + *{bigTypeId} + '-0-0'}" th:text="*{bigTypeText}"></a>
                    <span>&gt;</span>
                    <a th:href="@{'/product/list.html?category=' + *{bigTypeId} + '-' + *{smallTypeId} + '-0'}" th:text="*{smallTypeText}"></a>
                    <span>&gt;</span>
                    <a th:href="@{'/product/list.html?category=' + *{bigTypeId} + '-' + *{smallTypeId} + '-' + *{tinyTypeId}}" th:text="*{tinyTypeText}"></a>
                </div>
                <h1 class="title" th:text="*{name}">商品名称</h1>
                <p class="tags">
                    <span th:each="tag: *{tagList}" th:text="${tag}"></span>
                </p>
                <div class="detail">
                    <p class="row"><span class="l">价格</span><i>：</i>
                    <template v-if="userId && userId>0">
                        <em v-if="priceFlag==1">未公开价格</em>
                        <template v-else>
                            <template v-if="priceFlag==2 && userIdentity!=2">
                                <em>价格仅会员可见</em>
                                <a v-if="priceFlag==2 && userIdentity!=2" href="javascript:void(0)" class="btn">去升级会员查看价格</a>
                            </template>
                            <em v-else class="price" v-text="'￥'+parseFloat(price).toFixed(2)"></em>
                        </template>
                    </template>
                    <template v-else>
                        <em class="price"><i class="icon mIcon" th:each="i:${#numbers.sequence(1,5)}">
                                <i th:if="*{pricegrade}>=${i} or ${i}==1" class="icon mIcon on"></i>
                        </i></em>
                    </template>
                    </p>
                    <p class="row"><span class="l">品牌</span><i>：</i><em th:text="*{brandName}"></em></p>
                    <p class="row"><span class="l">包装规格</span><i>：</i><em th:text="*{unit}"></em></p>
                    <p class="row"><span class="l">商品编码</span><i>：</i><em th:text="*{productCode}"></em></p>
                    <p class="row"><span class="l">库存</span><i>：</i><em th:text="*{stock}"></em></p>
                    <p class="row"><span class="l">起批量</span><i>：</i><em th:text="*{minBuyNumber}"></em></p>
                    <p class="row"><span class="l">采购量</span><i>：</i>
                        <span class="number">
                            <em class="sub">-</em>
                            <input type="number" th:value="*{minBuyNumber}">
                            <em class="add">+</em>
                        </span>
                        <input type="hidden" th:value="*{step}">
                    </p>
                    <hr>
                    <p class="row"><span class="l">服务</span><i>：</i>
                        <em class="ser">无忧退货</em>
                        <em class="ser">急速退款</em>
                        <em class="ser">正品保证</em>
                    </p>
                    <a href="javascript:void(0);" class="btn">登录查看价格</a>
                    <span class="icon mIcon flag"></span>
                </div>
                <div class="btnBox">
                    <a href="javascript:void(0);" class="cart icon">加入购物车</a>
                    <a href="javascript:void(0);" class="buy">立即购买</a>
                </div>
                <div class="concatBox">
                    <img src="/img/common/concat.png">
                </div>
            </div>
        </div>

        <div class="recommendBox">
            <div class="hd">相关推荐</div>
            <div id="productRecommend" class="swiper-container">
                <ul class="swiper-wrapper" v-cloak>
                    <li class="swiper-slide" v-for="p in recommends">
                        <div class="item">
                            <a class="image" :href="'/product/detail.html?id='+p.pid" target="_blank">
                                <img :src="p.image" :alt="p.name">
                                <span v-html="p.name"></span>
                            </a>
                        </div>
                    </li>
                </ul>
                <div v-show="recommendPage>1" class="swiper-pagination mfc"><span v-if="isPC" v-for="i in recommendPage"></span></div>
            </div>
        </div>
    </div>
    <div class="wrap clear">
        <div v-if="!isPC" class="mShopBox">
            <a th:href="@{'/shop/home.html?sid=' + ${product.shopId}}">
                <span class="name"><em th:text="${product.shopTitle}"></em><i class="mIcon shop"></i></span>
                <span>经营范围：<em th:text="${product.businessScope}"></em></span>
                <span>所在地区：<em th:text="${product.shopAddress}"></em></span>
                <span>满意度：<em><i th:each="i:${#numbers.sequence(1,5)}" class="mIcon heart"></i></em></span>
            </a>
        </div>
        <div class="productInfo">
            <div class="tabTit">
                <span class="on">产品介绍</span>
                <span>相关参数</span>
                <span>服务项目</span>
                <span>评价</span>
            </div>
            <div class="tabCon">
                <div class="item">
                    <div th:utext="${product.detailInfo}"></div>
                    <div th:utext="${product.orderInfo}"></div>
                </div>
                <div class="item">
                    <table>
                        <tr v-for="pa in parameters">
                            <td v-text="pa.paramsName"></td>
                            <td v-text="pa.paramsContent"></td>
                        </tr>
                    </table>
                </div>
                <div class="item">
                    <div class="item" th:utext="${product.serviceInfo}"></div>
                </div>
                <div class="item">
                    <p class="comment">该商品暂无评价!</p>
                </div>
            </div>
        </div>
        <div v-if="isPC" class="rgt">
            <div class="shopBox">
                <div class="hd">供应商信息</div>
                <div class="bd">
                    <div class="name"><span th:text="${product.shopTitle}"></span><i class="icon shop"></i></div>
                    <div class="tit">经营范围：</div>
                    <div class="con" th:text="${product.businessScope}"></div>
                    <div class="tit">所在地区：</div>
                    <div class="con" th:text="${product.shopAddress}"></div>
                    <div class="tit">满意度：<i th:each="i:${#numbers.sequence(1,5)}" class="icon heart"></i></div>
                    <a th:href="@{'/shop/home.html?sid=' + ${product.shopId}}" class="btn">查看主页</a>
                </div>
            </div>
            <div class="contact">
                <div class="hd">联系方式</div>
                <div class="bd">
                    <div>采美客服（转接供应商）</div>
                    <div>电话：</div>
                    <div>0755-22907771</div>
                    <div>153-3885-1365</div>
                </div>
            </div>
        </div>
    </div>
</div>

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