Pārlūkot izejas kodu

商品详情增加商品资质显示

zhengjinyi 3 gadi atpakaļ
vecāks
revīzija
27f18e99b7

+ 2 - 1
src/main/resources/static/css/product/detail.pc.css

@@ -161,7 +161,8 @@ li{list-style:none;}
 .productInfo .tabCon td:nth-of-type(1){width:20%;color:#93979F}
 .productInfo .tabCon td:nth-of-type(2){width:80%;color:#4A4F58}
 .productInfo .comment{color:#93979F;padding:40px 0;margin-right: 30px; position: relative}
-
+.productInfo .product-qualificationImg{width: 100%;height: auto;}
+.productInfo .product-qualificationImg image{width: 100%;height: auto;display: block;}
 .wrap>.rgt{float:right;width:284px}
 .wrap>.rgt .hd{height:40px;line-height:40px;padding:0 16px;font-size:16px;color:#e15616;font-weight:bold;background:#ffe6dc}
 .shopBox{margin-bottom:16px;background:#FFF}

+ 6 - 0
src/main/resources/static/js/product/detail.js

@@ -37,6 +37,7 @@ var productDetail = new Vue({
         isNoneDisabled: false,
         isServiceInfo: false,
         isTrainingMethod: false,
+        isQualificationImg: false,
         productTypeName: "",
         beautyActFlag: '',
         trainingMethodText: '',
@@ -192,6 +193,11 @@ var productDetail = new Vue({
                     if (product.productDetail.orderInfo != '' && product.productDetail.serviceInfo != '') {
                         _self.isServiceInfo = true;
                     }
+                    if(product.qualificationImg){//商品资质
+                        _self.isQualificationImg = true
+                    }else{
+                        _self.isQualificationImg = false
+                    }
                     if (product.commodityType == 2 && product.trainingMethod) {
                         _self.isTrainingMethod = true;
                         _self.trainingMethodText = product.trainingMethod == 1 ? '线上培训' : '线下培训';

+ 8 - 0
src/main/resources/templates/product/detail.html

@@ -1,3 +1,4 @@
+
 <!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 ">
@@ -457,6 +458,7 @@
                 <span :class="tabsIndex == 2 ? 'on' : ''" v-if="isServiceInfo && !isNoneDisabled" @click="detailsClicktab(2)">服务项目</span>
                 <span :class="tabsIndex == 3 ? 'on' : ''" v-if="isTrainingMethod" @click="detailsClicktab(3)">培训方案</span>
                 <span v-if="archiveId !== 0" :class="tabsIndex == 4 ? 'on' : ''" @click="detailsClicktab(4)">相关资料</span>
+                <span :class="tabsIndex == 5 ? 'on' : ''" v-if="isQualificationImg" @click="detailsClicktab(5)">商品资质</span>
                 <!--<span>评价</span>-->
             </div>
             <div class="tabCon">
@@ -583,6 +585,11 @@
                         </div>
                     </div>
                 </div>
+                <div class="item" v-if="tabsIndex == 5">
+                    <div class="product-qualificationImg">
+                        <img :src="product.qualificationImg" alt="">
+                    </div>
+                </div>
                 <!--                <div class="item">-->
                 <!--                <div style="text-align: left;margin: 10px 0">-->
                 <!--                        <span>商品评分:</span>-->
@@ -595,6 +602,7 @@
                 <!--                    </div>-->
                 <!--                    <p class="comment">该商品暂无评价!</p>-->
                 <!--                </div>-->
+
             </div>
         </div>
         <div v-if="isPC" class="rgt">