Commit 09034193 authored by 朱建丰's avatar 朱建丰

二次鉴权

parent e7142040
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
separator-class="el-icon-arrow-right" separator-class="el-icon-arrow-right"
> >
<el-breadcrumb-item <el-breadcrumb-item
><a href="https://szzf.qingtian.gov.cn:18080" ><a href="https://szzf.qingtian.gov.cn:18080" target="_parent"
>首页</a >首页</a
></el-breadcrumb-item ></el-breadcrumb-item
> >
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
// 埋点初始化代码 // 埋点初始化代码
(function (w, d, s, q, i) { (function (w, d, s, q, i) {
w[q] = w[q] || []; w[q] = w[q] || [];
var f = d.getElementsByTagName(s)[0], j = d.createElement(s); var f = d.getElementsByTagName(s)[0],
j = d.createElement(s);
j.async = true; j.async = true;
j.id = 'beacon-aplus'; j.id = 'beacon-aplus';
j.src = 'https://alidt.alicdn.com/alilog/mlog/aplus_cloud.js'; j.src = 'https://alidt.alicdn.com/alilog/mlog/aplus_cloud.js';
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
})(window, document, 'script', 'aplus_queue'); })(window, document, 'script', 'aplus_queue');
//适配pad //适配pad
var view_timer = null; var view_timer = null;
function viewPort(userAgent, pageWidth) { function viewPort(userAgent, pageWidth) {
var oView = document.getElementById('viewport'); var oView = document.getElementById('viewport');
if (oView) { if (oView) {
...@@ -48,7 +50,7 @@ ...@@ -48,7 +50,7 @@
pageWidth = 1440; pageWidth = 1440;
} }
var screen_w = parseInt(window.screen.width), var screen_w = parseInt(window.screen.width),
screen_h =parseInt(window.screen.height), screen_h = parseInt(window.screen.height),
scale = screen_w / pageWidth; scale = screen_w / pageWidth;
if (/Android (\d+\.\d+)/.test(userAgent)) { if (/Android (\d+\.\d+)/.test(userAgent)) {
var creat_meta = document.createElement('meta'); var creat_meta = document.createElement('meta');
...@@ -56,7 +58,9 @@ ...@@ -56,7 +58,9 @@
creat_meta.id = 'viewport'; creat_meta.id = 'viewport';
var version = parseFloat(RegExp.$1); var version = parseFloat(RegExp.$1);
if (version > 2.3) { if (version > 2.3) {
creat_meta.content = 'width=' + pageWidth + ', initial-scale = ' + scale + ',user-scalable=1, minimum-scale = ' + scale + ', maximum-scale = ' + scale + ', target-densitydpi=device-dpi'; creat_meta.content = 'width=' + pageWidth + ', initial-scale = ' + scale +
',user-scalable=1, minimum-scale = ' + scale + ', maximum-scale = ' + scale +
', target-densitydpi=device-dpi';
} else { } else {
creat_meta.content = '"width=' + pageWidth + ', target-densitydpi=device-dpi'; creat_meta.content = '"width=' + pageWidth + ', target-densitydpi=device-dpi';
} }
...@@ -65,12 +69,14 @@ ...@@ -65,12 +69,14 @@
var creat_meta = document.createElement('meta'); var creat_meta = document.createElement('meta');
creat_meta.name = 'viewport'; creat_meta.name = 'viewport';
creat_meta.id = 'viewport'; creat_meta.id = 'viewport';
if (window.orientation == '-90' || window.orientation == '90') {//判断移动设备横屏竖屏 if (window.orientation == '-90' || window.orientation == '90') { //判断移动设备横屏竖屏
scale = window.screen.height / pageWidth; scale = window.screen.height / pageWidth;
creat_meta.content = 'width=' + pageWidth + ', initial-scale = ' + scale*screen_w/screen_h + ' ,minimum-scale = ' + scale*screen_w/screen_h + ', maximum-scale = ' + scale*screen_w/screen_h + ', user-scalable=no, target-densitydpi=device-dpi'; creat_meta.content = 'width=' + pageWidth + ', initial-scale = ' + scale * screen_w / screen_h +
} ' ,minimum-scale = ' + scale * screen_w / screen_h + ', maximum-scale = ' + scale * screen_w / screen_h +
else { ', user-scalable=no, target-densitydpi=device-dpi';
creat_meta.content = 'width=' + pageWidth + ', initial-scale = ' + scale + ' ,minimum-scale = ' + scale + ', maximum-scale = ' + scale + ', user-scalable=no, target-densitydpi=device-dpi'; } else {
creat_meta.content = 'width=' + pageWidth + ', initial-scale = ' + scale + ' ,minimum-scale = ' + scale +
', maximum-scale = ' + scale + ', user-scalable=no, target-densitydpi=device-dpi';
} }
document.head.appendChild(creat_meta); document.head.appendChild(creat_meta);
} }
...@@ -82,13 +88,45 @@ ...@@ -82,13 +88,45 @@
viewPort(navigator.userAgent); viewPort(navigator.userAgent);
}, 500); }, 500);
} }
// window.addEventListener("message", function (e) { window.addEventListener('message', async function (e, d) {
// console.log(e);
// // let accessToken = e; if (e.data && e.data.accessToken) {
// let user = await fetch(
// `https://lsszzf.lishui.gov.cn:18082/common/login/getuserinfo.php`
// ); var token = e.data.accessToken;
// }); var url =
'https://portal.lishui.gov.cn:18080/api_2021/public/index.php/index/MicroPortalLogin/getUserInfoByAccessToken?token=' +token;
var user = await fetch(url);
var contentType = user.headers.get('Content-Type');
console.log(contentType);
console.log("return user");
console.log(user.json());
console.log("finishing");
} else {
window.location.replace("./#err");
}
// var data = JSON.parse(e.data);
// alert(data);
// var accessToken = data.accessToken;
// alert(accessToken);
//alert(e.data)
// let data = JSON.parse(e.data);
// let accessToken = data.accessToken;
})
</script> </script>
</html> </html>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
separator-class="el-icon-arrow-right" separator-class="el-icon-arrow-right"
> >
<el-breadcrumb-item <el-breadcrumb-item
><a href="https://szzf.qingtian.gov.cn:18080" ><a href="https://szzf.qingtian.gov.cn:18080" target="_parent"
>首页</a >首页</a
></el-breadcrumb-item ></el-breadcrumb-item
> >
......
...@@ -821,6 +821,7 @@ export default { ...@@ -821,6 +821,7 @@ export default {
showTit: false, showTit: false,
}; };
}, },
mounted() { mounted() {
let _this = this; let _this = this;
this.initGzbgChart(); this.initGzbgChart();
...@@ -830,6 +831,7 @@ export default { ...@@ -830,6 +831,7 @@ export default {
this.initGzbgChart5(); this.initGzbgChart5();
this.initGzbgChart6(); this.initGzbgChart6();
this.initGzbgChart7(); this.initGzbgChart7();
window.parent.postMessage(document.body.scrollHeight, '*');
window.onresize = () => { window.onresize = () => {
return (() => { return (() => {
_this.initGzbgChart(); _this.initGzbgChart();
...@@ -839,6 +841,7 @@ export default { ...@@ -839,6 +841,7 @@ export default {
_this.initGzbgChart5(); _this.initGzbgChart5();
_this.initGzbgChart6(); _this.initGzbgChart6();
_this.initGzbgChart7(); _this.initGzbgChart7();
window.parent.postMessage(document.body.scrollHeight, '*');
})(); })();
}; };
window.addEventListener("resize", function (e) { window.addEventListener("resize", function (e) {
......
...@@ -345,16 +345,23 @@ export default { ...@@ -345,16 +345,23 @@ export default {
}; };
}, },
mounted() { mounted() {
window.parent.postMessage(document.body.scrollHeight, '*');
window.onresize = () => {
return (() => {
window.parent.postMessage(document.body.scrollHeight, '*');
})();
};
window.addEventListener("resize", function (e) { window.addEventListener("resize", function (e) {
window.parent.postMessage(document.body.scrollHeight, '*'); window.parent.postMessage(document.body.scrollHeight, '*');
}); });
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ecology { .ecology {
width: 1300px; // width: 1300px;
width: calc(100% - 40px);
margin: 0px auto; margin: 0px auto;
padding: 20px; padding: 20px;
// background: #666 // background: #666
......
...@@ -694,6 +694,12 @@ export default { ...@@ -694,6 +694,12 @@ export default {
this.init_line_1(); this.init_line_1();
this.init_bar_2(); this.init_bar_2();
this.init_bar_1(); this.init_bar_1();
window.parent.postMessage(document.body.scrollHeight, '*');
window.onresize = () => {
return (() => {
window.parent.postMessage(document.body.scrollHeight, '*');
})();
};
window.addEventListener("resize", function (e) { window.addEventListener("resize", function (e) {
window.parent.postMessage(document.body.scrollHeight, '*'); window.parent.postMessage(document.body.scrollHeight, '*');
}); });
...@@ -1051,7 +1057,8 @@ export default { ...@@ -1051,7 +1057,8 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
.epidemic { .epidemic {
// background: #666; // background: #666;
width: 1300px; // width: 1300px;
width: calc(100% - 40px);
margin: 0px auto; margin: 0px auto;
padding: 20px padding: 20px
} }
......
...@@ -225,6 +225,13 @@ export default { ...@@ -225,6 +225,13 @@ export default {
this.initCharts2(); this.initCharts2();
this.initCharts3(); this.initCharts3();
this.initCharts4(); this.initCharts4();
window.parent.postMessage(document.body.scrollHeight, '*');
window.onresize = () => {
return (() => {
window.parent.postMessage(document.body.scrollHeight, '*');
})();
};
window.addEventListener("resize", function (e) { window.addEventListener("resize", function (e) {
window.parent.postMessage(document.body.scrollHeight, '*'); window.parent.postMessage(document.body.scrollHeight, '*');
}); });
......
...@@ -163,6 +163,7 @@ export default { ...@@ -163,6 +163,7 @@ export default {
let _this = this; let _this = this;
this.initChart1(); this.initChart1();
this.initChart2(); this.initChart2();
window.parent.postMessage(document.body.scrollHeight, '*');
window.addEventListener("resize", function (e) { window.addEventListener("resize", function (e) {
window.parent.postMessage(document.body.scrollHeight, '*'); window.parent.postMessage(document.body.scrollHeight, '*');
}); });
......
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