1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="stylesheet" href="https://iot.usky.cn/YtIoT/view/efireAnalysis/layui/css/layui.css" />
- <title>Document</title>
- <style>
- .layui-layer-title {
- background: #081A32 !important;
- color: #fff !important;
- border-bottom: 1px solid #1E9FFF !important;
- }
-
- .layui-layer {
- background: #072442 !important;
- color: #fff;
- }
-
- .layui-layer-ico {
- border-radius: 50%;
- }
-
- .layui-layer-btn .layui-layer-btn0 {
- font-size: 0.2rem;
- }
- </style>
- </head>
- <body>
- <script src="https://iot.usky.cn/YtIoT/view/efireAnalysis/layui/layui.js"></script>
- <script src="js/jquery.js"></script>
- <script>
- $(document).ready(function() {
- getReportState({
- "queryJson": '{"V_LOGINNAME": "admin"}'
- });
- });
- function getReportState(params = {}) {
- $.ajax({
- type: "POST",
- url: "https://iot.usky.cn/YtIoT/iot/userstate/getUserStateList",
- data: params,
- success: function(data) {
- var result = eval('(' + data + ')');
- var getState = result.RESULT[0].STATE
- console.log('getState')
- console.log(getState);
- if (getState != 3 && result.success) {
- layui.use('layer', function() {
- var layer = layui.layer;
- layer.open({
- icon: 7,
- title: '提示信息',
- closeBtn: false,
- btn: ['确定', '取消'],
- content: '您有报告未读,请查看!',
- yes: function(index, layero) { //yes对应第一个按钮“确定”
- if (getState == 0) {
- window.location.href = "../waterIndex.html";
- } else if (getState == 1) {
- window.location.href = "../waterIndex.html";
- } else if (getState == 2) {
- window.location.href = "../eleFireIndex.html";
- }
- },
- btn2: function(index, layero) { //该操作对应的是“取消”按钮
- layer.close(index)
- return false;
- },
- });
- });
- }
- },
- error: function() {
- console.log("发生错误")
- // alert("发生错误");
- },
- complete: function() {
- // console.log("ajax请求完事,最终操作在这里完成")
- }
- });
- }
- </script>
- </body>
- </html>
|