Selaa lähdekoodia

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

zhengjinyi 2 vuotta sitten
vanhempi
commit
9ca0e4e859

+ 2 - 0
src/main/java/com/caimei/www/controller/unlimited/ArticleController.java

@@ -137,12 +137,14 @@ public class ArticleController extends BaseController {
         List<BaseLink> data = articleService.getArticleLabels().getData();
         List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
         List<Article> articles=articleService.getInfoById(id);
+        String relatedLabels = articleService.relatedLabel(id);
         model.addAttribute("articles",articles);
         model.addAttribute("ads", Ads);
         model.addAttribute("labels",data);
         model.addAttribute("article", article);
         model.addAttribute("articleType", typeList);
         model.addAttribute("articleId", id);
+        model.addAttribute("relatedLabels", relatedLabels);
         model.addAttribute("typeId", (article!=null ? article.getTypeId() : 0));
         model.addAttribute("labelId", 0);
         return ARTICLE_DETAIL_PATH;

+ 2 - 0
src/main/java/com/caimei/www/mapper/ArticleDao.java

@@ -102,6 +102,8 @@ public interface ArticleDao {
 
     List<Article> getArticleRelatedLimit(@Param("id")Integer id, @Param("labels")String[] strings);
 
+    String relatedLabel(@Param("id")Integer id);
+
     void insertRecord(@Param("IP") String IP, @Param("referer") String referer,
                       @Param("accessSource") String accessSource,@Param("accessTime") String accessTime,@Param("pageType") String pageType);
 }

+ 2 - 0
src/main/java/com/caimei/www/service/page/ArticleService.java

@@ -74,6 +74,8 @@ public interface ArticleService {
     JsonModel articlePv(Integer id);
 
     List<Article> getInfoById(Integer id);
+
+    String relatedLabel(Integer id);
     /**
      * 访问来源
      * @param IP

+ 9 - 0
src/main/java/com/caimei/www/service/page/impl/ArticleServiceImpl.java

@@ -192,6 +192,15 @@ public class ArticleServiceImpl implements ArticleService {
         return relateds;
     }
 
+    @Override
+    public String relatedLabel(Integer id) {
+        String articles = articleDao.relatedLabel(id);
+        if (!StringUtils.isEmpty(articles)) {
+            articles = articles.replaceAll("##", ",");
+        }
+        return articles;
+    }
+
     /**
      * 访问来源
      *

+ 3 - 1
src/main/resources/mapper/ArticleMapper.xml

@@ -171,7 +171,9 @@
 		order by a.pubdate desc
 		limit 3
 	</select>
-
+	<select id="relatedLabel" resultType="java.lang.String">
+		SELECT relatedLabels FROM info WHERE id=#{id}
+	</select>
 	<insert id="insertRecord">
 		INSERT INTO cm_behavior_record_ref (IP, referer, accessSource, accessTime,pageType)
 		VALUES(#{IP}, #{referer}, #{accessSource}, #{accessTime},#{pageType})

+ 1 - 1
src/main/resources/static/css/encyclopedia/about.css

@@ -4,7 +4,7 @@
     .bk-banner .bk-container{height:214px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative;z-index:20}
     .bk-banner .bk-container .bk-title{font-size:32px;color:#fff;font-weight:bold}
     .bk-banner .bk-container .bk-subtitle{font-size:20px;color:#fff;margin-top:8px;text-transform:uppercase}
-    .bk-about{position:relative;padding:56px 40px;background:#fff;-webkit-transform:translateY(-166px);-ms-transform:translateY(-166px);transform:translateY(-166px);z-index:30}
+    .bk-about{position:relative;padding:56px 40px;background:#fff;-webkit-transform:translateY(-80px);-ms-transform:translateY(-80px);transform:translateY(-80px);z-index:30}
     .bk-about h2{font-size:14px;color:#333;margin-bottom:24px;margin-top:40px}
     .bk-about h2:first-child{margin-top:0}
     .bk-about p{font-size:14px;color:#333;line-height:26px;text-align:justify;margin-top: 16px;}

+ 1 - 0
src/main/resources/static/css/supplier-center/encyclopedia/edit.css

@@ -87,3 +87,4 @@
 .bk-agreement .bk-content p span{color:#22272E}
 .bk-agreement .bk-control{padding:40px 0;text-align:center}
 .bk-agreement .bk-control button{font-size:16px;color:#fff;width:295px;height:50px;background:#E15616;border-radius:4px;cursor:pointer}
+.bk-agreement .bk-control .bk-link {margin-top: 10px;}

+ 0 - 0
src/main/resources/static/img/encyclopedia/assets/h5-bg-desc.png.jpg → src/main/resources/static/img/encyclopedia/assets/h5-bg-desc.jpg


+ 0 - 0
src/main/resources/static/img/encyclopedia/assets/pc-bg-desc.png.jpg → src/main/resources/static/img/encyclopedia/assets/pc-bg-desc.jpg


+ 1 - 1
src/main/resources/static/js/supplier-center/encyclopedia/edit.js

@@ -458,7 +458,7 @@ const edit = new Vue({
         },
         //
         getInfoNamePlaceHolder(index){
-            const text = ['中文名', '别名', '英文名']
+            const text = ['中文名', '别名', '英文名', '尺寸']
             return text[index]
         },
         // 新增信息栏

+ 5 - 1
src/main/resources/templates/supplier-center/encyclopedia/edit.html

@@ -94,6 +94,7 @@
                                     <content-edit
                                             v-model="item.dictionaryContent"
                                             :reference-list="formData.referenceList"
+                                            :placeholder="item.placeholder"
                                             @reference-edit="handleReferenceEdit"
                                             @toolbar="handleToolbarClick">
                                     </content-edit>
@@ -324,7 +325,10 @@
                         缺失会导致读者对词条内容的错误认识。
                     </p>
                 </div>
-                <div class="bk-control"><button @click="showAgreement=false">我已阅读并知晓</button></div>
+                <div class="bk-control">
+                    <button @click="showAgreement=false">我已阅读并知晓</button>
+                    <div class="bk-link"><a href="#">《采美百科用户服务协议》</a></div>
+                </div>
             </div>
         </div>
     </template>