chao 4 gadi atpakaļ
vecāks
revīzija
9e17deae46

+ 1 - 1
src/main/resources/static/css/base/base.pc.css

@@ -252,7 +252,7 @@ header{box-shadow: 0 2px 10px #ebecef;}
 /* 咨询,回到顶部 */
 #scrollTop{display:none;position:fixed;right:50%;margin-right:-700px;width:88px;z-index:9999;bottom:120px;}
 #scrollTop .item{width:100%;background-color:#fff;box-sizing:border-box;text-align:center;box-shadow:0 2px 4px rgb(254,246,243);border-radius:2px;margin-bottom:10px;font-size:12px;position:relative}
-#scrollTop .item>span{display:block;width:100%;box-sizing:border-box;position:relative;cursor:pointer;}
+#scrollTop .item>span{display:block;width:100%;box-sizing:border-box;position:relative;cursor:pointer;white-space:pre-wrap;word-break:break-all;}
 #scrollTop .item>span:hover{color:#E15616;}
 #scrollTop .item .phone{padding:4px 16px 4px 48px;line-height:16px;}
 #scrollTop .item .phone:before{width:32px;height:32px;background-position:0 -254px;position:absolute;top:4px;left:16px}

+ 10 - 1
src/main/resources/static/js/article/common.js

@@ -50,12 +50,21 @@ var articleSide = new Vue({
         },
     },
     mounted: function () {
+        var _self = this;
         this.typeId = $("#typeId").val()*1;
         this.labelId = $("#labelId").val()*1;
         this.getLabels();
         if (isPC) {
-            this.getRecommend(this.typeId, 1);
             this.getAds();
+            this.getRecommend(this.typeId, 1);
+            //换一批15秒请求一次
+            setInterval(function(){
+                if (_self.recommend.hasNextPage) {
+                    _self.getRecommend(_self.typeId, _self.recommend.nextPage);
+                } else {
+                    _self.getRecommend(_self.typeId, 1);
+                }
+            },15000);
         }
         if (this.labelId>0) {
             // 添加一个标签点击量