Commit 6ee74389 authored by 黄奎's avatar 黄奎

页面修改

parent 5c64e301
......@@ -3,24 +3,27 @@
padding-top: 30px !important;
padding-bottom: 30px !important;
}
.goBackTop{
width:56px;
height:56px;
border-radius:50%;
background-color:#027be3;
position:fixed;
right:20px;
bottom:20px;
.goBackTop {
width: 56px;
height: 56px;
border-radius: 50%;
background-color: #027be3;
position: fixed;
right: 20px;
bottom: 20px;
color: #fff;
text-align:center;
text-align: center;
line-height: 56px;
z-index:999;
opacity:0;
transition:opacity 2s linear;
z-index: 999;
opacity: 0;
transition: opacity 2s linear;
}
.showGoback{
opacity:100;
.showGoback {
opacity: 100;
}
</style>
<template>
<q-layout view="hHh lpr fFf">
......@@ -67,7 +70,7 @@
RB_Group_Id: 0,
//当天
ToDay: "",
isShowTop:false
isShowTop: false
};
},
created() {
......@@ -78,7 +81,7 @@
})
},
mounted() {
window.addEventListener('scroll',this.getScrollHeight,false);
window.addEventListener('scroll', this.getScrollHeight, false);
//判断是不是同一天
if (localStorage.ToDay) {
if (localStorage.ToDay != this.ToDay) {
......@@ -98,8 +101,7 @@
if (localStorage.groupinfo) {
var jObj = JSON.parse(window.localStorage.getItem('groupinfo'));
this.RB_Group_Id = jObj.GroupId;
if (localStorage.site) {
} else {
if (localStorage.site) {} else {
this.getSite();
}
this.getConfigData();
......@@ -121,20 +123,20 @@
},
methods: {
//点击回到顶部
hangleGoUp(){
hangleGoUp() {
let nowTop = document.body.scrollTop || document.documentElement.scrollTop; // 获取当前滚动条位置
if (nowTop > 0) {
window.requestAnimationFrame(this.hangleGoUp);
window.scrollTo (0,nowTop - (nowTop/5));
window.scrollTo(0, nowTop - (nowTop / 5));
}
},
//监测滚动条位置
getScrollHeight(){
getScrollHeight() {
let nowTop = document.body.scrollTop || document.documentElement.scrollTop; // 获取当前滚动条位置
if(nowTop>200){
this.isShowTop=true;
}else{
this.isShowTop=false;
if (nowTop > 200) {
this.isShowTop = true;
} else {
this.isShowTop = false;
}
},
......@@ -142,16 +144,19 @@
this.headType = t;
},
getSite() {
this.apipost(
"b2b_get_site", {},
res => {
if (res.data.resultCode == 1) {
var jsonData = JSON.stringify(res.data.data);
window.localStorage.setItem("site", jsonData);
}
},
err => {}
);
if (this.RB_Group_Id > 0) {
this.apipost(
"b2b_get_site", {},
res => {
if (res.data.resultCode == 1) {
var jsonData = JSON.stringify(res.data.data);
window.localStorage.setItem("site", jsonData);
}
},
err => {}
);
}
},
//获取集团数据
getGroupData() {
......
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