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

页面修改

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