Ver Fonte

Merge remote-tracking branch 'remotes/origin/developer' into developerA

Aslee há 3 anos atrás
pai
commit
907cef98ca

+ 9 - 0
src/main/java/com/caimei/www/controller/RedirectController.java

@@ -85,6 +85,15 @@ public class RedirectController {
         return "redirect:/page-"+id+".html";
     }
 
+    /**
+     * 文章搜索
+     * /info/search.shtml?kw=
+     */
+    @GetMapping("/info/search.shtml")
+    public String toArticleSearch(@RequestParam("kw") String keyword) {
+        return "redirect:/info/search-1.html?keyword=" + keyword;
+    }
+
     /**
      * 产品仪器
      */

+ 2 - 0
src/main/java/com/caimei/www/pojo/page/ProductDetail.java

@@ -26,7 +26,9 @@ public class ProductDetail extends ProductList {
 	private String[] tagList;
 	private String remarks;
 	/** 详情 */
+	private Integer productDetailChose;
 	private String detailInfo;
+	private String commonDetailInfo;
 	private String orderInfo;
 	private String serviceInfo;
 	/** 品牌 */

+ 2 - 0
src/main/resources/mapper/ProductMapper.xml

@@ -22,8 +22,10 @@
 			p.trainingMethod,
 			p.trainingType,
 			p.trainingFee,
+			p.productDetail as productDetailChose,
 
 			d.detailInfo as detailInfo,
+			d.commonDetailInfo as commonDetailInfo,
 			d.orderInfo as orderInfo,
 			d.serviceInfo as serviceInfo,
 

+ 2 - 2
src/main/resources/static/css/encyclopedia/contact.css

@@ -7,8 +7,8 @@
 .page-title .title .line::after{content:"";display:inline-block;width:16px;height:2px;background:#ffffff;opacity:0.72}
 .page-title .subtitle{margin-top:8px;font-size:12px;color:#ffffff;opacity:0.6;text-transform: uppercase;}
 .page-title .subtitle span{display:inline-block;width:38px;height:1px;background:#ffffff;vertical-align:middle;margin-right:8px}
-.contact{position:relative;height:630px}
-.contact .content{height:713px;padding:40px 55px;background:#ffffff;border-radius:2px;-webkit-transform:translateY(-80px);-ms-transform:translateY(-80px);transform:translateY(-80px);-webkit-box-shadow:0 0 16px rgba(0,0,0,0.1);box-shadow:0 0 16px rgba(0,0,0,0.1);-webkit-box-sizing:border-box;box-sizing:border-box}
+.contact{position:relative;height:590px}
+.contact .content{height:670px;padding:40px 55px;background:#ffffff;border-radius:2px;-webkit-transform:translateY(-80px);-ms-transform:translateY(-80px);transform:translateY(-80px);-webkit-box-shadow:0 0 16px rgba(0,0,0,0.1);box-shadow:0 0 16px rgba(0,0,0,0.1);-webkit-box-sizing:border-box;box-sizing:border-box}
 .contact .content h2{font-size:18px;font-weight:bold}
 .contact .content p{margin-top:24px;font-size:14px;color:#93979f;text-align:justify;line-height:24px}
 .contact .content .address{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:60px 0 50px}

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

@@ -162,5 +162,4 @@ li{list-style:none}
     .product-screen-btn{width: 100%;height: 11.2vw;float: left;margin-top: 4vw;}
     .product-screen-btn .sub-button{width: 64vw;height: 11.2vw;margin: 0 auto;line-height: 11.2vw;background-color: #E15621;text-align: center;font-size: 3.4ve;color: #FFFFFF;}
 
-}
-
+}

+ 6 - 12
src/main/resources/static/js/encyclopedia/common.js

@@ -320,23 +320,17 @@ function makeFloorList(options) {
 
 
 function activeNavbar(selector) {
-    var baseHref = window.location.href;
-    navbarIndex = localStorage.getItem('navbarIndex') || 0;
+    var pathname = window.location.pathname.replace(/(-\d+){0,}(.html$)/g, '') + '.html';
     selector = $(selector);
-    selector.each(function (index, el) {
+    selector.each(function(index, el){
         $(el).removeClass('active');
-
-        if ($(el).find('a').length > 0) {
+        if($(el).find('a').length > 0){
             var href = $(el).find('a').attr('href');
-            href = href.split('?')[0].split('#')[0];
-
-            if (baseHref.indexOf(href) > -1) {
-                navbarIndex = index;
-                localStorage.setItem('navbarIndex', navbarIndex);
+            if(pathname.endsWith(href)){
+                $(el).addClass('active');
             }
         }
-    });
-    selector.eq(navbarIndex).addClass('active');
+    })
 }
 
 /**

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

@@ -60,6 +60,7 @@ var productDetail = new Vue({
         productCouponList: [],						// 优惠券弹窗列表
         collectionType:false,                       // 商品收藏状态
         supportingList:[],
+        productDetailChose:2,
         defaultSupportingList:[],
         isShowSupportingList:false,
         isShowMoreButton:false,
@@ -174,6 +175,7 @@ var productDetail = new Vue({
                     _self.productTypeName = product.typeName;
                     _self.recommendType = product.recommendType ? product.recommendType : 0;
                     _self.archiveId = product.archiveId; // 保存资料列表id
+                    _self.productDetailChose = product.productDetailChose; // 同资质机构显示商品详情
                     if (product.userLike && product.userLike == 1) {// 商品收藏
                         _self.collectionType = true
                     } else {

+ 6 - 6
src/main/resources/static/js/product/list.js

@@ -179,8 +179,8 @@ var productList = new Vue({
         },
         choiceBrandHref: function (brand, index) {// PC端跳转链接
             window.location.href =  '/product/list.html?keyword=' + encodeURIComponent(this.params.keyword) +
-                                    '&bpn=' + brand.id + '&pro=' + this.params.promotionFlag +
-                                    '&newg='+ this.params.newFlag;
+                '&bpn=' + brand.id + '&pro=' + this.params.promotionFlag +
+                '&newg='+ this.params.newFlag;
         },
         choiceBrandAllHref:function(){// PC全部品牌跳转链接
             window.location.href =  '/product/list.html?keyword=' + encodeURIComponent(this.params.keyword) +
@@ -234,13 +234,13 @@ var productList = new Vue({
         hanldCheckedActiviHref(){// 选择促销商品选项跳转链接(PC专用)
             var promotionFlag = this.isActiviChecked ? 0 : 1;
             window.location.href = '/product/list.html?keyword='+encodeURIComponent(this.params.keyword)+
-                                   '&bpn='+this.hrefBrandId+ '&pro='+promotionFlag+'&newg='+ this.params.newFlag;
+                '&bpn='+this.hrefBrandId+ '&pro='+promotionFlag+'&newg='+ this.params.newFlag;
         },
         hanldCheckedNewsHref(){// 选择新品选项跳转链接(PC专用)
             var newFlag = this.isNewsChecked ? 0 : 1;
             window.location.href = '/product/list.html?keyword='+encodeURIComponent(this.params.keyword)+
-                                   '&bpn='+this.hrefBrandId+ '&pro=' + this.params.promotionFlag +
-                                   '&newg='+newFlag;
+                '&bpn='+this.hrefBrandId+ '&pro=' + this.params.promotionFlag +
+                '&newg='+newFlag;
         },
         showIsProductScreen:function(){//
             this.isProductScreen = true;
@@ -254,7 +254,7 @@ var productList = new Vue({
     },
     created: function () {
         if(isPC){
-            this.params.size = getUrlParam("pageSize") ? getUrlParam("pageSize") * 1 : 20;
+            this.params.size = getUrlParam("pageSize") ? getUrlParam("pageSize") * 1 : 24;
             this.params.num = getUrlParam("pageNum") ? getUrlParam("pageNum") * 1 : 1;
             this.hrefBrandId = getUrlParam("bpn") ? getUrlParam("bpn") : null; //bpn 品牌链接参数
             this.params.promotionFlag = getUrlParam("pro") ? getUrlParam("pro")*1 : 0; // pro 促销商品链接参数

+ 1 - 1
src/main/resources/static/js/supplier-center/shop/release.js

@@ -160,7 +160,7 @@ var releaseContainer = new Vue({
                     _this.releaseParams.productCode = data.productCode;
                     _this.releaseParams.normalPrice = data.normalPrice;
                     _this.releaseParams.price = data.price;
-                    _this.releaseParams.includedTax = data.includedTax == '' ? 1 : data.includedTax;
+                    _this.releaseParams.includedTax = data.includedTax;
                     _this.releaseParams.invoiceType = data.invoiceType;
                     _this.releaseParams.taxPoint = data.supplierTaxPoint;
                     _this.releaseParams.costPrice = data.costPrice;

+ 1 - 1
src/main/resources/templates/article/components/article-header.html

@@ -13,7 +13,7 @@
                 <a class="home" href="/" target="_blank">商城</a>
                 <a th:each="type: *{articleType}" th:text="${type.name}" th:href="'/info/center-'+${type.id}+'-1.html'" th:class="${typeId==type.id}?'typeBtn current':'typeBtn'" th:typeId="${type.id}"></a>
                 <a class="typeBtn" href="/document/beauty-archive.html" target="_blank">美业资料</a>
-                <a class="typeBtn" href="/encyclopedia/product.html" target="_blank">采美百科</a>
+                <!-- <a class="typeBtn" href="/encyclopedia/product.html" target="_blank">采美百科</a> -->
             </div>
         </div>
         <!--搜索-->

+ 2 - 4
src/main/resources/templates/encyclopedia/contact.html

@@ -26,11 +26,9 @@
 </div>
 <div class="contact container">
     <div class="content">
-        <h2>深圳市采美网络信息有限公司</h2>
+        <h2>深圳采美百科</h2>
         <p>
-            采美365网,是一家集美业仪器、产品采购交易和信息咨询为一体的一站式B2B服务平台,另设有针对C端的线上商城。
-            平台集合了各类美业资源及多方优质供应商,不仅能满足生活美容院、高级医美会所、医疗美容机构对产品、光电仪器、易耗品的采购需求,还能提供专业的产品信息咨询服务,包括仪器对比、配套信息,仪器查找、项目合作洽谈,
-            专业高端药妆产品采购,高端SPA产品采购,正品仪器采购,涵盖生美、医美等专业线产品。
+            采美百科,专注于美业领域知识的创建与分享,拥有海量的专业美业产品、仪器等知识,为大众提供专业、科学、实用的健康科普知识,让大众对美业仪器、产品不在迷茫。
         </p>
         <div class="address">
             <div class="col">

+ 12 - 7
src/main/resources/templates/product/detail.html

@@ -455,17 +455,22 @@
             </div>
             <div class="tabCon">
                 <div class="item" v-if="tabsIndex == 0">
-                    <template v-if="GLOBAL_USER_ID>0 && ( GLOBAL_USER_IDENTITY === 2 || GLOBAL_USER_IDENTITY === 3)">
-                        <template v-if="isNoneDisabled">
-                            <p>暂无商品信息</p>
+                    <template v-if="isNoneDisabled">
+                        <p>暂无商品信息</p>
+                    </template>
+                    <template v-else>
+                        <template v-if="productDetailChose == 1">
+                            <div th:utext="${product.detailInfo}"></div>
                         </template>
                         <template v-else>
-                            <div th:utext="${product.detailInfo}"></div>
+                            <template v-if="GLOBAL_USER_ID>0 && ( GLOBAL_USER_IDENTITY === 2 || GLOBAL_USER_IDENTITY === 3)">
+                                <div th:utext="${product.detailInfo}"></div>
+                            </template>
+                            <template v-else-if="GLOBAL_USER_ID == 0 || GLOBAL_USER_ID>0 && ( GLOBAL_USER_IDENTITY === 4)">
+                                <div th:utext="*{#strings.isEmpty(product.commonDetailInfo)}? '若要查看更多产品信息,请注册机构会员,如有疑问请联系客服。' : *{product.commonDetailInfo}"></div>
+                            </template>
                         </template>
                     </template>
-                    <template v-else>
-                        <p style="text-align: left;">若要查看更多产品信息,请注册机构会员,如有疑问请联系客服。</p>
-                    </template>
                 </div>
                 <div class="item" v-if="tabsIndex == 1">
                     <table>

+ 3 - 3
src/main/resources/templates/product/instruelist.html

@@ -113,21 +113,21 @@
                             @click="toSortList('sales',0)"><span>销量</span></li>
                             <li v-else-if="params.sortField == 'sales' && params.sortType == 0" class="up"
                             @click="toSortList('sales',1)"><span>销量</span></li>
-                            <li v-else @click="toSortList('sales',0)"><span>销量</span></li>
+                            <li v-else @click="toSortList('sales',1)"><span>销量</span></li>
                         </template>
                         <template>
                              <li v-if="params.sortField == 'favorite' && params.sortType == 1" class="down"
                             @click="toSortList('favorite',0)"><span>人气</span></li>
                             <li v-else-if="params.sortField == 'favorite' && params.sortType == 0" class="up"
                             @click="toSortList('favorite',1)"><span>人气</span></li>
-                            <li v-else @click="toSortList('favorite',0)"><span>人气</span></li>
+                            <li v-else @click="toSortList('favorite',1)"><span>人气</span></li>
                         </template>
                         <template>
                              <li v-if="params.sortField == 'price' && params.sortType == 1" class="down"
                             @click="toSortList('price',0)"><span>价格</span></li>
                             <li v-else-if="params.sortField == 'price' && params.sortType == 0" class="up"
                             @click="toSortList('price',1)"><span>价格</span></li>
-                            <li v-else @click="toSortList('price',0)"><span>价格</span></li>
+                            <li v-else @click="toSortList('price',1)"><span>价格</span></li>
                         </template>
                         <template v-if="!isPC">
                             <li class="screen" @click="showIsProductScreen">

+ 3 - 3
src/main/resources/templates/product/list.html

@@ -90,21 +90,21 @@
                             @click="toSortList('sales',0)"><span>销量</span></li>
                         <li v-else-if="params.sortField == 'sales' && params.sortType == 0" class="up"
                             @click="toSortList('sales',1)"><span>销量</span></li>
-                        <li v-else @click="toSortList('sales',0)"><span>销量</span></li>
+                        <li v-else @click="toSortList('sales',1)"><span>销量</span></li>
                     </template>
                     <template>
                         <li v-if="params.sortField == 'favorite' && params.sortType == 1" class="down"
                             @click="toSortList('favorite',0)"><span>人气</span></li>
                         <li v-else-if="params.sortField == 'favorite' && params.sortType == 0" class="up"
                             @click="toSortList('favorite',1)"><span>人气</span></li>
-                        <li v-else @click="toSortList('favorite',0)"><span>人气</span></li>
+                        <li v-else @click="toSortList('favorite',1)"><span>人气</span></li>
                     </template>
                     <template>
                         <li v-if="params.sortField == 'price' && params.sortType == 1" class="down"
                             @click="toSortList('price',0)"><span>价格</span></li>
                         <li v-else-if="params.sortField == 'price' && params.sortType == 0" class="up"
                             @click="toSortList('price',1)"><span>价格</span></li>
-                        <li v-else @click="toSortList('price',0)"><span>价格</span></li>
+                        <li v-else @click="toSortList('price',1)"><span>价格</span></li>
                     </template>
                     <template v-if="!isPC">
                         <li class="screen" @click="showIsProductScreen">