Pārlūkot izejas kodu

wesmiler 更新第5期升级

wesmiler 5 gadi atpakaļ
vecāks
revīzija
563fd64797

+ 6 - 1
.gitignore

@@ -9,4 +9,9 @@
 /public/logs
 /public/themes/default/*.zip
 /public/themes/default/*.gz
-/*.zip
+/*.zip
+/vendor/*.gz
+/public/*.gz
+/public/*.zip
+/*.gz
+/vendor/*.zip

+ 1 - 1
public/themes/default/weixin/match/index.html

@@ -14,7 +14,7 @@
     <div :class="'box'+(!hasFollow? ' has' : '')">
         <div id="recommends" class="recommend-box">
             <div class="tips" v-if="tipsArr.length>0" :style="'width:'+(tips.width)+'px;right: '+tips.left+'%;'">
-                <a href="/weixin/member/complain"><span v-html="tips.content"></span></a>
+                <a href="/weixin/member/complain"><span></span></a>
             </div>
             <div class="join"><a href="/weixin/activity/book?id=15">我要推荐</a></div>
             <div v-if="total<=0" class="empty recommends"><span>暂无数据</span></div>

+ 19 - 9
public/themes/default/weixin/public/assets/js/match.js

@@ -67,6 +67,7 @@ var app = new Vue({
         tipsLoadTimerId: null,
         loadedCount: 0,
         slideIndex: 0,
+        locaded: false,
         tipsArr: [],
         tips: {
             content: '',
@@ -102,7 +103,7 @@ var app = new Vue({
         var _this = this;
         _this.initData();
 
-        //_this.initSwiper()
+        _this.initSwiper()
 
         // 懒加载
         this.lazyload();
@@ -217,21 +218,29 @@ var app = new Vue({
                 }
 
                 clearInterval(_this.tipsTimerId)
-                _this.tips.content = '提示:用户<em>'+data.user_nickname+'</em>因被举报核实已拉黑,点击查看'
-                var strs = _this.tips.content? _this.tips.content.split('') : [];
+                var width = 280;
+                var left = -100;
+                var content = '提示:用户<em>'+data.user_nickname+'</em>因被举报核实已拉黑,点击查看'
+                // _this.tips.content = '提示:用户<em>'+data.user_nickname+'</em>因被举报核实已拉黑,点击查看'
+                var strs = content? content.split('') : [];
                 if(strs.length>9){
-                    _this.tips.width = (strs.length-9)*13.5
+                    width = (strs.length-9)*13.5
                 }
+                $(".tips").css({width:width+'px'});
+                $(".tips a span").html(content);
                 _this.tipsTimerId = setInterval(function(){
-                   if(_this.tips.left>=100){
-                       _this.tips.left = -100;
-                       _this.tips.content = '';
+                   if(left>=100){
+                       left = -100;
+                       content = '';
                        index = index+1>=num? 0 : index+1;
+                       $(".tips").css({right:left+'%'});
+                       $(".tips a span ").html(content);
                        _this.initTips(index)
                        return false;
                    }
 
-                    _this.tips.left += 0.25;
+                    left += 0.25;
+                    $(".tips").css({right:left+'%'});
                 }, 20);
             }
 
@@ -421,6 +430,7 @@ var app = new Vue({
         initSwiper: function(){
             var _this = this;
             if(_this.rSwiper != null && _this.dataList.length>0){
+                //return false;
                 _this.rSwiper.destroy(true);
             }
 
@@ -434,7 +444,7 @@ var app = new Vue({
                     freeModeSticky:true,
                     freeMode: false,
                     observer: true,//修改swiper自己或子元素时,自动初始化swiper
-                    observeParents: true,//修改swiper的父元素时,自动初始化swiper
+                    observeParents: false,//修改swiper的父元素时,自动初始化swiper
                     direction: 'vertical',
                     slidesPerView: 'auto',
                     on: {