Commit bacfd89c authored by anxixi's avatar anxixi

活动列表置顶

parent 38d0452a
......@@ -157,6 +157,10 @@
</div>
</div>
<div style="bottom:100px;" class="hendtop" @click="handleScrollTop" v-if="positions">
<i style="font-size: 24px;color: #9197B4;" class="iconfont icon-dingbu"></i>
</div>
<el-dialog :visible.sync="vueQrVisible" width="360px" :close-on-click-moda="false" center>
<div style="text-align: center;margin: 0 20px;">
<img :src="activityContact.contactImg" alt="" style="width: 140px;height: 140px;margin: 15px;padding: 5px;border: 1px solid #E8E8E8;">
......@@ -211,6 +215,7 @@
indexActivitylist:[],
getHotCitylist:[],
eventdataIds:[],
positions:false,
eventdata:{channelPic:'../../assets/img/activity01.png'},
userInfo:this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null,
}
......@@ -219,6 +224,18 @@
pageScreen,signupbar,expertVisible,VueQRCodeComponent
},
methods:{
menu(){
let scroll = document.documentElement.scrollTop || document.body.scrollTop;
if(scroll>380){
this.positions = true;
}else{
this.positions = false;
}
},
//点击返回顶部
handleScrollTop(){
window.scrollTo(0, 0);
},
//二维码
isVueQrVisible(data){
this.vueQrVisible = data;
......@@ -564,12 +581,14 @@
},
beforeDestroy() { // 在组件生命周期结束的时候销毁。、
globalMsg.$off('loginsuccess');
window.removeEventListener('scroll', this.menu);
},
mounted() {
globalMsg.$on("loginsuccess",(data)=>{
this.userInfo = this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null;
this.resourcesdata();
});
window.addEventListener('scroll', this.menu);
this.getdataGroupAllLists();
this.getHotCity();
this.resourcesdata();
......@@ -927,4 +946,18 @@
}
}
}
.hendtop{
position: fixed;
right: 40px;
z-index: 99;
border: 1px solid #F2F2F2;
background:#FFFFFF;
box-shadow:0px 2px 8px 0px rgba(0,0,0,0.1);
border-radius: 50%;
width: 50px;
height: 50px;
text-align: center;
line-height: 50px;
cursor: pointer;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment