tsg-web/public/index.html

111 lines
3.8 KiB
HTML

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<meta charset="GB2312">
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="stylesheet" href="%PUBLIC_URL%/Cesium/Widgets/widgets.css">
<script type="text/javascript" src="%PUBLIC_URL%/Cesium/Cesium.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/popmotion.xl.min.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/imouplayer.js"></script>
<script src="%PUBLIC_URL%/h5Player/h5player.min.js"></script>
<title>檀树岗水库现代化运行管理矩阵平台</title>
<style>
.lf{
float:left;
}
.rf{
float:right;
}
.clearFloat:after{
content:"";
display:block;
clear:both;
}
</style>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script>
const getParams = () => {
let loc = window.location.href;
if(loc.indexOf("send") !== -1 || loc.indexOf("plan") !== -1 || loc.indexOf("prePlatform") !== -1){
return null
}else{
let n1=loc.length;
let n2=loc.indexOf('=');
let str=n2>0?loc.slice(n2+1,n1):"";
return str
}
};
let urlAddress = "";
if(getParams()){
localStorage.setItem('ADCD6', getParams().substring(0,6));
if(getParams().indexOf("420529")!==-1){
urlAddress = "wufeng";
}else if(getParams().indexOf("422822")!==-1){
urlAddress = "jianshi";
}
console.log("@@@@index.html urlAddress",urlAddress);
localStorage.setItem('address',urlAddress);
}
//从省平台地址栏带县级行政编码访问
const myParams = {
countycode:localStorage.getItem('ADCD6') + '000000',
"key": "extent",
};
// fetch("service2/shzh/warn/configuration/findByCountycode?_="+Date.now(), {
// method: "POST",//请求方法
// body: JSON.stringify(myParams),
// // @ts-ignore
// headers: {//配置请求头
// "Content-type": "application/json",
// "Authorization": localStorage.getItem('access_token'),
// },}).then(res => {
// return res.json();
// }).then(result => {
// if (result.code === 200) {
// console.log("index.html 103++++",result.data.records[0].val);
// localStorage.setItem('extent', result.data.records[0].val);
// }
// });
</script>
</body>
</html>