Bladeren bron

Merge remote-tracking branch 'origin/developerB' into developerB

zhengjinyi 4 jaren geleden
bovenliggende
commit
65be88800c

+ 5 - 2
src/main/java/com/caimei/www/service/page/impl/SupplierServiceImpl.java

@@ -6,6 +6,7 @@ import com.caimei.www.service.page.SupplierService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
 
@@ -32,8 +33,10 @@ public class SupplierServiceImpl implements SupplierService {
     @Override
     public SupplierDetail getSupplierById(Integer supplierId) {
         SupplierDetail supplier = supplierDao.getSupplierById(supplierId);
-        String[] businessScope = supplier.getBusinessScope().split("/");
-        supplier.setBusinessScopeArr(businessScope);
+        if (!StringUtils.isEmpty(supplier.getBusinessScope())) {
+            String[] businessScope = supplier.getBusinessScope().split("/");
+            supplier.setBusinessScopeArr(businessScope);
+        }
         return supplier;
     }
 

+ 0 - 1
src/main/resources/static/css/product/detail.h5.css

@@ -21,7 +21,6 @@ li{list-style:none}
 .productBox .detailBox .row>em.p{font-weight:bold;}
 .productBox .detailBox .row>em.ser{color:#93979F;display:inline-block;margin-right:4vw}
 .productBox .detailBox .row>em.ser:before{content:'\2713';display:inline-block;width:3.4vw;height:3.4vw;text-align:center;line-height:3.4vw;font-size:3.4vw;background:#E15616;border-radius:1.7vw;color:#FFF;margin-right:1.4vw}
-.productBox .detailBox .price{height:21vw}
 .productBox .detailBox .price .icon{display:inline-block;font-size:0;height:5vw;line-height:5vw;vertical-align:text-bottom;}
 .productBox .detailBox .price .icon:before{width:11vw;height:5vw;}
 .productBox .detailBox .price .icon.i0:before{background-position:0 -23.2vw}

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

@@ -36,7 +36,7 @@ li{list-style:none;}
 .productBox .detailBox .price{height:24px}
 .productBox .detailBox .price .rmb{font-weight:bold;}
 .productBox .detailBox .price .icon{display:inline-block;font-size:0;height:24px;line-height:24px;vertical-align:text-top;}
-.productBox .detailBox .price .icon:before{width:80px;height:24px;}
+.productBox .detailBox .price .icon:before{width:80px;height:24px;margin-top:-4px;}
 .productBox .detailBox .price .icon.i0:before{background-position:-295px -140px}
 .productBox .detailBox .price .icon.i1:before{background-position:-295px -140px}
 .productBox .detailBox .price .icon.i2:before{background-position:-295px -174px}

+ 0 - 1
src/main/resources/static/css/supplier-center/setting/password.css

@@ -17,7 +17,6 @@ li{list-style:none}
     .container{width: 100%;min-height:485px;box-sizing: border-box;padding: 16px 236px;background-color: #FFF;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);}
     .formLine p{color: #627386}
     input::placeholder{color: #9aa5b5;}
-    .formLine .showPwd{right: 8px}
 }
 
 /**

+ 1 - 1
src/main/resources/static/css/supplier-center/shop/goods.css

@@ -21,7 +21,7 @@ li{list-style: none}
   .goods-main .goods-table ul li:nth-child(3),.goods-main .goods-table ul li:nth-child(4){width: 20%}
   .goods-main .goods-table ul li:last-child{width: 23%;position: relative}
   .tbody ul li{height: 96px;font-size: 12px;}
-  .tbody ul{overflow: hidden;padding: 0 20px;position: relative;}
+  .tbody ul{padding: 0 20px;position: relative;}
   .tbodyle ul li:nth-child(2){width: 25%;}
   .tbody ul li:nth-child(3),.goods-main .goods-table ul li:nth-child(3){ width: 16%}
   .tbody ul li:last-child{width: 20%}

+ 1 - 1
src/main/resources/static/css/user-center/setting/password.css

@@ -15,7 +15,7 @@ li{list-style:none}
     .right-header .header-tabs{width: 168px;height: 38px;background-color: #f0f3f7;border-radius: 2px 0px 0px 2px;;line-height: 38px;font-size: 14px;text-align: center;color: #627386;float: left;cursor: pointer;}
     .right-header .header-tabs.current{background-color: #e15616;color: #FFFFFF;}
     .container{width: 100%;min-height:485px;box-sizing: border-box;padding: 16px 236px;background-color: #FFF;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);}
-
+    input::placeholder{color: #9aa5b5}
 }
 
 /**

+ 1 - 1
src/main/resources/static/css/user-center/setting/phone.css

@@ -16,7 +16,7 @@ li{list-style:none}
     .container{width: 100%;min-height:510px;box-sizing: border-box;padding:0 236px;background-color: #FFF;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);}
     .container .title{width: 100%;line-height: 36px;font-size: 14px;color: #22272E;text-align: center;}
     .container .title span{color: #f94b4b;}
-
+    input::placeholder{color: #9aa5b5}
 }
 
 /**

+ 1 - 1
src/main/resources/static/js/supplier-center/setting/information.js

@@ -374,7 +374,7 @@ jqMultipleShow("click", ".navList", ".tab", ".con");
             }else{
                 CAIMEI.Alert(response.msg, '确定', false);
             }
-        })
+        });
      $('.navLayout').find('.navList').removeClass("on").find('.con').hide().find('a').removeClass("on");
      $('.navLayout').find('.navList').eq(2).addClass("on").find('.con').show().find('a').eq(0).addClass("on");
     }

+ 2 - 2
src/main/resources/static/js/supplier-center/setting/password.js

@@ -217,7 +217,7 @@ var passwordPage = new Vue({
     },
     mounted: function () {
         var _self = this;
-       $('.navLayout').find('.navList').removeClass("on").find('.con').hide().find('a').removeClass("on");
-       $('.navLayout').find('.navList').eq(3).addClass("on").find('.con').show().find('a').eq(0).addClass("on");
+        $('.navLayout').find('.navList').removeClass("on").find('.con').hide().find('a').removeClass("on");
+        $('.navLayout').find('.navList').eq(3).addClass("on").find('.con').show().find('a').eq(0).addClass("on");
     }
 });

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

@@ -872,7 +872,7 @@ var releaseContainer = new Vue({
             SupplierApi.AddSupplierReleaseProduct(_this.releaseParams,function(response){
                 if(response.code == 0){
                     CAIMEI.dialog('提交成功,等待审核',true,function () {
-                        location.href = '/supplier/myProduct.html';
+                        location.href = '/supplier/goods.html';
                         if(CAIMEI.Storage.getItem('adProductPeview')){
                             CAIMEI.Storage.removeItem('adProductPeview');
                         }

+ 1 - 1
src/main/resources/templates/index.html

@@ -75,7 +75,7 @@
                                             </div>
                                         </template>
                                         <template v-else>
-                                            <template v-if="p.priceFlag==0 || p.userIdentity==2 || (p.userIdentity==3 && p.supplierId==GLOBAL_SHOP_ID)">
+                                            <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>

+ 5 - 5
src/main/resources/templates/product/detail.html

@@ -50,7 +50,7 @@
                     <span th:each="tag: *{tagList}" th:text="${tag}"></span>
                 </p>
                 <div class="detail">
-                    <div class="row"><span class="l">采美价</span><i>:</i>
+                    <div class="row price"><span class="l">采美价</span><i>:</i>
                         <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                             <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                             <em v-if="priceObj.priceFlag==1">¥价格未公开</em>
@@ -61,9 +61,9 @@
                                 </em>
                                 <em v-else class="p" v-text="'¥'+parseFloat(priceObj.price).toFixed(2)"></em>
                             </template>
-                            <em v-else>¥<i :class="'icon mIcon i'+priceObj.priceGrade"></i></em>
+                            <em v-else>¥<i th:attr="class=${'icon mIcon i'+product.priceGrade}"></i></em>
                         </template>
-                        <em v-else>¥<i :class="'icon mIcon i'+priceObj.priceGrade"></i></em>
+                        <em v-else>¥<i th:attr="class=${'icon mIcon i'+product.priceGrade}"></i></em>
                     </div>
                     <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0 && priceObj.normalPrice>0 && (priceObj.priceFlag==0 || (priceObj.priceFlag==2 && priceObj.userIdentity==2) || (priceObj.userIdentity==3 && priceObj.supplierId==GLOBAL_SHOP_ID))">
                         <div class="row"> <span class="l">市场价</span><i>:</i>
@@ -129,12 +129,12 @@
                             </div>
                         </template>
                     </div>
-                    <div class="row"><span class="l">品牌</span><i>:</i><em th:text="*{brandName}"></em></div>
+                    <div th:if="not${#strings.isEmpty(product.brandName)}" class="row"><span class="l">品牌</span><i>:</i><em th:text="*{brandName}"></em></div>
                     <div class="row"><span class="l">包装规格</span><i>:</i><em th:text="*{unit}"></em></div>
                     <div class="row"><span class="l">商品编码</span><i>:</i><em th:text="*{productCode}"></em></div>
                     <div class="row"><span class="l">库存</span><i>:</i><em th:text="*{stock}"></em></div>
                     <div class="row"><span class="l">起批量</span><i>:</i><em th:text="*{minBuyNumber}"></em></div>
-                    <div class="row"><span class="l">采购量</span><i>:</i>
+                    <div v-show="GLOBAL_USER_ID && GLOBAL_USER_ID>0" class="row"><span class="l">采购量</span><i>:</i>
                         <span class="number">
                             <em class="sub" @click="numberSub()">-</em>
                             <input type="number" :value="number" v-model="number" maxlength='6' @change="numberChange()">

+ 8 - 2
src/main/resources/templates/supplier/index.html

@@ -43,7 +43,7 @@
         </div>
         <div class="tabCon">
             <div class="item productBox">
-                <div class="part">
+                <div v-if="mainProducts.length>0" class="part">
                     <div class="title">主推商品</div>
                     <!--主推商品列表-->
                     <ul class="productList clear mfw">
@@ -96,7 +96,7 @@
                 <div class="part">
                     <div class="title" id="supProduct">供应商产品</div>
                     <!--主推商品列表-->
-                    <ul class="productList clear mfw">
+                    <ul v-if="productLists.length>0" class="productList clear mfw">
                         <li class="productItem mfc" v-for="p in productLists">
                             <div class="item">
                                 <a class="image" :href="'/product-'+p.id+'.html'">
@@ -142,6 +142,12 @@
                             </div>
                         </li>
                     </ul>
+                    <div v-else class="empty">
+                        <img src="/img/common/empty.png">
+                        <div class="msg">
+                            <p>该供应商暂未发布商品,去<a href="/">商城</a>,逛逛吧~</p>
+                        </div>
+                    </div>
                 </div>
             </div>
             <div class="item infoBox">