From a3236b51b5691b8c47f4ebaf1d885314a4bab3bd Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期二, 13 八月 2024 11:17:18 +0800
Subject: [PATCH] 拼箱功能开发

---
 HTML/js/public.js |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/HTML/js/public.js b/HTML/js/public.js
index c184102..59bbbe0 100644
--- a/HTML/js/public.js
+++ b/HTML/js/public.js
@@ -13,7 +13,7 @@
 {
   sendData(IP + "/Basis/GetFunSettingByNo?funSetNo="+"Fun013", {}, 'get', function (res) {
     console.log(res.data.SetValue)
-    if (res.code == 200) { //鎴愬姛 
+    if (res.code == 0) { //鎴愬姛 
       if(res.data.IsEnable == 'NO')
       {
           pageCnt = parseInt(res.data.SetValue);
@@ -38,8 +38,15 @@
   if (url!=IP+"/WeatherForecast/Login") {
     if (!$.cookie('token')) {
       callbackFun("鐧诲綍浜轰俊鎭凡澶辨晥");
+      try{
+        parent.window.location.href = '/views/Login.html';
+      }
+      catch(error){
+        window.location.href = '/views/Login.html';
+      }
+      return;
     }
-    if(isExpired = isTokenExpired($.cookie('token'))){
+    if(isTokenExpired($.cookie('token'))){
       try{
         parent.window.location.href = '/views/Login.html';
       }
@@ -203,9 +210,9 @@
   var bodyHeight = $("#body").outerHeight();
   var topHeight = $("#top").outerHeight();
   var centerHeight = $("#center").outerHeight();
-//   console.log(bodyHeight);
-//   console.log(topHeight);
-//   console.log(centerHeight);
+  console.log(bodyHeight);
+  console.log(topHeight);
+  console.log(centerHeight);
 
   var hh = bodyHeight - topHeight-centerHeight - 26 ;//6鏄痓ody涓婂唴杈硅窛 
   return hh;
@@ -268,7 +275,7 @@
 function GetIsSetColW()
 {
   sendData(IP + "/Basis/GetFunSettingByNo?funSetNo="+"Fun014", {}, 'get', function (res) {
-    if (res.code == 200) { //鎴愬姛 
+    if (res.code == 0) { //鎴愬姛 
       if(res.data.IsEnable == 'NO')
       {
         isSetColW=true;
@@ -361,7 +368,7 @@
 //鍒嗛〉鏍煎紡鍖�
 var FnParseData = function (res) {
   return {
-    "code": res.code == 200 ? 0 : res.code, // 瑙f瀽鎺ュ彛鐘舵��
+    "code": res.code == 0 ? 0 : res.code, // 瑙f瀽鎺ュ彛鐘舵��
     "msg": res.msg, // 瑙f瀽鎻愮ず鏂囨湰
     "count": res.data.Total, // 瑙f瀽鏁版嵁闀垮害
     "data": res.data.Items // 瑙f瀽鏁版嵁鍒楄〃

--
Gitblit v1.8.0