|
|
@@ -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: {
|