From e374eed8970a84cae6e1f5ea71864474a4d4e7e3 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Fri, 28 Mar 2025 14:10:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 495 ++++++++++++++++++++++++++------------------------- js/public.js | 19 +- 2 files changed, 257 insertions(+), 257 deletions(-) diff --git a/index.html b/index.html index 1915e7e..ad923cc 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ 黔送固定资产管理系统 + content="layuimini基于layui的轻量级前端后台管理框架,最简洁、易用的后台框架模板,面向所有层次的前后端程序,只需提供一个接口就直接初始化整个框架,无需复杂操作。"> @@ -28,269 +28,270 @@ -
+
-
- +
+ -
- -
-
+
+ +
+
- - + + - - + + +
    + +
  • +
  • -
--> - -
    - -
  • - -
  • -
  • - -
  • -
  • - -
  • - -
  • - -
  • -
-
-
- - -
-
- - -
-
-
- - -
- - -
- -
- -
-
    -
  • -
-
-
  • -
  • -
  • - -
  • -
    -
    -
    -
    -
    - +
  • + +
  • +
  • + +
  • + +
  • + +
  • +
    - - - - - + + + + + /* var options = { + iniUrl: "api/init.json", // 初始化接口 + clearUrl: "api/clear.json", // 缓存清理接口 + urlHashLocation: true, // 是否打开hash定位 + bgColorDefault: false, // 主题默认配置 + multiModule: true, // 是否开启多模块 + menuChildOpen: false, // 是否默认展开菜单 + loadingTime: 0, // 初始化加载时间 + pageAnim: true, // iframe窗口动画 + maxTabNum: 20, // 最大的tab打开数量 + }; + miniAdmin.render(options); */ + + // 百度统计代码,只统计指定域名 + miniTongji.render({ + specific: true, + domains: [ + '99php.cn', + 'layuimini.99php.cn', + 'layuimini-onepage.99php.cn', + ], + }); + + $('.login-out').on("click", function () { + layer.msg('退出登录成功', function () { + window.location = 'page/login-3.html'; + }); + }); + }); + + // 初始化页面 + function initPage(miniAdmin){ + var options = { + iniUrl: "api/init.json", // 初始化接口 + clearUrl: "api/clear.json", // 缓存清理接口 + urlHashLocation: true, // 是否打开hash定位 + bgColorDefault: false, // 主题默认配置 + multiModule: true, // 是否开启多模块 + menuChildOpen: false, // 是否默认展开菜单 + loadingTime: 0, // 初始化加载时间 + pageAnim: true, // iframe窗口动画 + maxTabNum: 20, // 最大的tab打开数量 + }; + miniAdmin.render(options); + } + + function login(miniAdmin) { + // 登录获取token + let login_url = dataUrl + 'login/userLogin' + const params = { + // "username": 'sa', + // "password": 'ebbd6ea34bbab2b0813afcf59c8c9556', + "username": 'bns', + "password": '1769fb2837e10e9d22c1c25add76355a', + } + /* const params = { + "username": 'fgs-check-001', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', + } */ + /* const params = { + "username": 'fgs-check-002', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', + } */ + /* const params = { + "username": 'fgs-check-003', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', + } */ + /* const params = { + "username": 'xgzx-check-001', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', + } */ + /* const params = { + "username": 'xgzx-check-002', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', + } */ + /* const params = { + "username": 'xgzx-check-003', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', + } */ + /* const params = { + "username": 'jj-check-001', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', + } */ + /* const params = { + "username": 'jj-check-002', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', + } */ + /* const params = { + "username": 'jj-check-003', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', + } */ + // alert(params.username); + ajaxRequest(login_url, "POST", params, true, function () { + }, function (result) { + console.log(result); + if (result.code === 200) { + sessionStorage.setItem('gz-token', result.token); + sessionStorage.setItem('us', JSON.stringify(result.user)); + initPage(miniAdmin); + } else if (result.code === 500) { + // layer.msg(result.msg, { icon: 2 }); + } + }, function (xhr, status, error) { + errorFn(xhr, status, error) + }, null); + } + - \ No newline at end of file + diff --git a/js/public.js b/js/public.js index 89fab0b..dcee8f3 100644 --- a/js/public.js +++ b/js/public.js @@ -1,18 +1,17 @@ -const dataUrl = 'http://localhost:21520/'; // 数据请求路径--安全工器具 -const dataUrlDevice = 'http://localhost:21521/'; // 数据请求路径-工器具 -const dataUrlCar = 'http://localhost:21522/'; // 数据请求路径-车辆 +// const dataUrl = 'http://localhost:21520/aqd_screen/'; // 数据请求路径--安全工器具 +// const dataUrlDevice = 'http://localhost:21521/'; // 数据请求路径-工器具 +// const dataUrlCar = 'http://localhost:21522/gz_car/'; // 数据请求路径-车辆 // const dataUrl = 'http://192.168.0.50:21995/'; // 数据请求路径-亮 +// const fileUrl = 'http://127.0.0.1:21995/statics'; // 文件路径 +// const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 +// const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 -const fileUrl = 'http://127.0.0.1:21995/statics'; // 文件路径 +const dataUrl = 'http://192.168.0.16:21520/gz-aqgqj/'; // 数据请求路径 +const fileUrl = 'http://192.168.0.16:21520/gz-aqgqj/statics'; // 文件路径 const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 -/* const dataUrl = 'http://192.168.0.14:21520/'; // 数据请求路径 -const fileUrl = 'http://192.168.0.14:21520/statics'; // 文件路径 -const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 -const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 */ - /* 请求 */ function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, contentType) { $.ajax({ @@ -193,7 +192,7 @@ function getUrlParam(key) { // 预览文件 function commonViewFile(params) { let path = fileUrl + params + '?auth=' + sessionStorage.getItem("gz-token"); - // path = fileUrl + params + // path = fileUrl + params console.log(path); let encodePath = encodeURIComponent(useBase64.encode64(path)); window.open(viewFileUrl + encodePath + '&token=' + generateToken());