From c3f8bae626cb555db6d55077eaa59d10fd6e07ee Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期四, 14 十一月 2024 12:09:56 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/~qirong/qyspzw-ui

---
 public/ddlogin.js           |    0 
 src/views/dingdingLogin.vue |    6 
 .eslintrc.js                |    1 
 src/utils/request.ts        |    4 
 index.html                  |  394 ++++++++++++++++++++++++------------------------
 .prettierrc.cjs             |   10 +
 src/permission.ts           |   12 
 7 files changed, 217 insertions(+), 210 deletions(-)

diff --git a/.eslintrc.js b/.eslintrc.js
index a1b32e3..96eadce 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -19,6 +19,7 @@
   },
   plugins: ['vue', '@typescript-eslint'],
   rules: {
+    "vue/comment-directive": "off",
     'vue/multi-word-component-names': 'off',
     '@typescript-eslint/no-empty-function': 'off',
     '@typescript-eslint/no-explicit-any': 'off',
diff --git a/.prettierrc.cjs b/.prettierrc.cjs
index 61d2d92..2e04c1a 100644
--- a/.prettierrc.cjs
+++ b/.prettierrc.cjs
@@ -42,5 +42,13 @@
   // 鐒惰�屽湪 Linux 鍜� Unix 涓彧浣跨敤绠�鍗曠殑鎹㈣鍒嗛殧绗� (LF)銆�
   // 瀵瑰簲鐨勬帶鍒跺瓧绗︿负 "\n" (LF) 鍜� "\r\n"(CRLF)銆俛uto鎰忎负淇濇寔鐜版湁鐨勮灏�
   // 鎹㈣绗︿娇鐢� lf 缁撳熬鏄� 鍙�夊��"<auto|lf|crlf|cr>"
-  endOfLine: 'auto'
+  endOfLine: 'auto',
+  overrides: [
+    {
+      "files": "*.html",
+      "options": {
+        "parser": "html"
+      }
+    }
+  ]
 };
diff --git a/index.html b/index.html
index 5f091a8..ee6177e 100644
--- a/index.html
+++ b/index.html
@@ -1,221 +1,217 @@
 <!DOCTYPE html>
 <html>
-
-<head>
-  <meta charset="utf-8" />
-  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
-  <meta name="renderer" content="webkit" />
-  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
-  <link rel="icon" href="/favicon.ico" />
-  <title>璺ㄧ綉鏂囦欢鍚屾绯荤粺</title>
-  <!--[if lt IE 11
-      ]><script>
-        window.location.href='/html/ie.html';
-      </script><!
-    [endif]-->
-  <style>
-    html,
-    body,
-    #app {
-      height: 100%;
-      margin: 0px;
-      padding: 0px;
-    }
-
-    .chromeframe {
-      margin: 0.2em 0;
-      background: #ccc;
-      color: #000;
-      padding: 0.2em 0;
-    }
-
-    #loader-wrapper {
-      position: fixed;
-      top: 0;
-      left: 0;
-      width: 100%;
-      height: 100%;
-      z-index: 999999;
-    }
-
-    #loader {
-      display: block;
-      position: relative;
-      left: 50%;
-      top: 50%;
-      width: 150px;
-      height: 150px;
-      margin: -75px 0 0 -75px;
-      border-radius: 50%;
-      border: 3px solid transparent;
-      border-top-color: #FFF;
-      -webkit-animation: spin 2s linear infinite;
-      -ms-animation: spin 2s linear infinite;
-      -moz-animation: spin 2s linear infinite;
-      -o-animation: spin 2s linear infinite;
-      animation: spin 2s linear infinite;
-      z-index: 1001;
-    }
-
-    #loader:before {
-      content: "";
-      position: absolute;
-      top: 5px;
-      left: 5px;
-      right: 5px;
-      bottom: 5px;
-      border-radius: 50%;
-      border: 3px solid transparent;
-      border-top-color: #FFF;
-      -webkit-animation: spin 3s linear infinite;
-      -moz-animation: spin 3s linear infinite;
-      -o-animation: spin 3s linear infinite;
-      -ms-animation: spin 3s linear infinite;
-      animation: spin 3s linear infinite;
-    }
-
-    #loader:after {
-      content: "";
-      position: absolute;
-      top: 15px;
-      left: 15px;
-      right: 15px;
-      bottom: 15px;
-      border-radius: 50%;
-      border: 3px solid transparent;
-      border-top-color: #FFF;
-      -moz-animation: spin 1.5s linear infinite;
-      -o-animation: spin 1.5s linear infinite;
-      -ms-animation: spin 1.5s linear infinite;
-      -webkit-animation: spin 1.5s linear infinite;
-      animation: spin 1.5s linear infinite;
-    }
-
-
-    @-webkit-keyframes spin {
-      0% {
-        -webkit-transform: rotate(0deg);
-        -ms-transform: rotate(0deg);
-        transform: rotate(0deg);
+  <head>
+    <meta charset="utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+    <meta name="renderer" content="webkit" />
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
+    <link rel="icon" href="/favicon.ico" />
+    <title>璺ㄧ綉鏂囦欢鍚屾绯荤粺</title>
+    <!--[if lt IE 11
+        ]><script>
+          window.location.href='/html/ie.html';
+        </script><!
+      [endif]-->
+    <style>
+      html,
+      body,
+      #app {
+        height: 100%;
+        margin: 0px;
+        padding: 0px;
       }
 
-      100% {
-        -webkit-transform: rotate(360deg);
-        -ms-transform: rotate(360deg);
-        transform: rotate(360deg);
-      }
-    }
-
-    @keyframes spin {
-      0% {
-        -webkit-transform: rotate(0deg);
-        -ms-transform: rotate(0deg);
-        transform: rotate(0deg);
+      .chromeframe {
+        margin: 0.2em 0;
+        background: #ccc;
+        color: #000;
+        padding: 0.2em 0;
       }
 
-      100% {
-        -webkit-transform: rotate(360deg);
-        -ms-transform: rotate(360deg);
-        transform: rotate(360deg);
+      #loader-wrapper {
+        position: fixed;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        z-index: 999999;
       }
-    }
+
+      #loader {
+        display: block;
+        position: relative;
+        left: 50%;
+        top: 50%;
+        width: 150px;
+        height: 150px;
+        margin: -75px 0 0 -75px;
+        border-radius: 50%;
+        border: 3px solid transparent;
+        border-top-color: #FFF;
+        -webkit-animation: spin 2s linear infinite;
+        -ms-animation: spin 2s linear infinite;
+        -moz-animation: spin 2s linear infinite;
+        -o-animation: spin 2s linear infinite;
+        animation: spin 2s linear infinite;
+        z-index: 1001;
+      }
+
+      #loader:before {
+        content: "";
+        position: absolute;
+        top: 5px;
+        left: 5px;
+        right: 5px;
+        bottom: 5px;
+        border-radius: 50%;
+        border: 3px solid transparent;
+        border-top-color: #FFF;
+        -webkit-animation: spin 3s linear infinite;
+        -moz-animation: spin 3s linear infinite;
+        -o-animation: spin 3s linear infinite;
+        -ms-animation: spin 3s linear infinite;
+        animation: spin 3s linear infinite;
+      }
+
+      #loader:after {
+        content: "";
+        position: absolute;
+        top: 15px;
+        left: 15px;
+        right: 15px;
+        bottom: 15px;
+        border-radius: 50%;
+        border: 3px solid transparent;
+        border-top-color: #FFF;
+        -moz-animation: spin 1.5s linear infinite;
+        -o-animation: spin 1.5s linear infinite;
+        -ms-animation: spin 1.5s linear infinite;
+        -webkit-animation: spin 1.5s linear infinite;
+        animation: spin 1.5s linear infinite;
+      }
 
 
-    #loader-wrapper .loader-section {
-      position: fixed;
-      top: 0;
-      width: 51%;
-      height: 100%;
-      background: #23b385;
-      z-index: 1000;
-      -webkit-transform: translateX(0);
-      -ms-transform: translateX(0);
-      transform: translateX(0);
-    }
+      @-webkit-keyframes spin {
+        0% {
+          -webkit-transform: rotate(0deg);
+          -ms-transform: rotate(0deg);
+          transform: rotate(0deg);
+        }
 
-    #loader-wrapper .loader-section.section-left {
-      left: 0;
-    }
+        100% {
+          -webkit-transform: rotate(360deg);
+          -ms-transform: rotate(360deg);
+          transform: rotate(360deg);
+        }
+      }
 
-    #loader-wrapper .loader-section.section-right {
-      right: 0;
-    }
+      @keyframes spin {
+        0% {
+          -webkit-transform: rotate(0deg);
+          -ms-transform: rotate(0deg);
+          transform: rotate(0deg);
+        }
+
+        100% {
+          -webkit-transform: rotate(360deg);
+          -ms-transform: rotate(360deg);
+          transform: rotate(360deg);
+        }
+      }
 
 
-    .loaded #loader-wrapper .loader-section.section-left {
-      -webkit-transform: translateX(-100%);
-      -ms-transform: translateX(-100%);
-      transform: translateX(-100%);
-      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-    }
+      #loader-wrapper .loader-section {
+        position: fixed;
+        top: 0;
+        width: 51%;
+        height: 100%;
+        background: #23b385;
+        z-index: 1000;
+        -webkit-transform: translateX(0);
+        -ms-transform: translateX(0);
+        transform: translateX(0);
+      }
 
-    .loaded #loader-wrapper .loader-section.section-right {
-      -webkit-transform: translateX(100%);
-      -ms-transform: translateX(100%);
-      transform: translateX(100%);
-      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-    }
+      #loader-wrapper .loader-section.section-left {
+        left: 0;
+      }
 
-    .loaded #loader {
-      opacity: 0;
-      -webkit-transition: all 0.3s ease-out;
-      transition: all 0.3s ease-out;
-    }
+      #loader-wrapper .loader-section.section-right {
+        right: 0;
+      }
 
-    .loaded #loader-wrapper {
-      visibility: hidden;
-      -webkit-transform: translateY(-100%);
-      -ms-transform: translateY(-100%);
-      transform: translateY(-100%);
-      -webkit-transition: all 0.3s 1s ease-out;
-      transition: all 0.3s 1s ease-out;
-    }
 
-    .no-js #loader-wrapper {
-      display: none;
-    }
+      .loaded #loader-wrapper .loader-section.section-left {
+        -webkit-transform: translateX(-100%);
+        -ms-transform: translateX(-100%);
+        transform: translateX(-100%);
+        -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+      }
 
-    .no-js h1 {
-      color: #222222;
-    }
+      .loaded #loader-wrapper .loader-section.section-right {
+        -webkit-transform: translateX(100%);
+        -ms-transform: translateX(100%);
+        transform: translateX(100%);
+        -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+      }
 
-    #loader-wrapper .load_title {
-      font-family: 'Open Sans';
-      color: #FFF;
-      font-size: 19px;
-      width: 100%;
-      text-align: center;
-      z-index: 9999999999999;
-      position: absolute;
-      top: 60%;
-      opacity: 1;
-      line-height: 30px;
-    }
+      .loaded #loader {
+        opacity: 0;
+        -webkit-transition: all 0.3s ease-out;
+        transition: all 0.3s ease-out;
+      }
 
-    #loader-wrapper .load_title span {
-      font-weight: normal;
-      font-style: italic;
-      font-size: 13px;
-      color: #FFF;
-      opacity: 0.5;
-    }
-  </style>
-</head>
-<script src="./src/assets/ddlogin.js"></script>
-<!-- <script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script> -->
+      .loaded #loader-wrapper {
+        visibility: hidden;
+        -webkit-transform: translateY(-100%);
+        -ms-transform: translateY(-100%);
+        transform: translateY(-100%);
+        -webkit-transition: all 0.3s 1s ease-out;
+        transition: all 0.3s 1s ease-out;
+      }
 
-<body>
-  <div id="app">
-    <div id="loader-wrapper">
-      <div id="loader"></div>
-      <div class="loader-section section-left"></div>
-      <div class="loader-section section-right"></div>
-      <div class="load_title">姝e湪鍔犺浇鏂囦欢绯荤粺璧勬簮锛岃绋嶅悗</div>
+      .no-js #loader-wrapper {
+        display: none;
+      }
+
+      .no-js h1 {
+        color: #222222;
+      }
+
+      #loader-wrapper .load_title {
+        font-family: 'Open Sans';
+        color: #FFF;
+        font-size: 19px;
+        width: 100%;
+        text-align: center;
+        z-index: 9999999999999;
+        position: absolute;
+        top: 60%;
+        opacity: 1;
+        line-height: 30px;
+      }
+
+      #loader-wrapper .load_title span {
+        font-weight: normal;
+        font-style: italic;
+        font-size: 13px;
+        color: #FFF;
+        opacity: 0.5;
+      }
+    </style>
+  </head>
+  <body>
+    <div id="app">
+      <div id="loader-wrapper">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">姝e湪鍔犺浇鏂囦欢绯荤粺璧勬簮锛岃绋嶅悗</div>
+      </div>
     </div>
-  </div>
-  <script type="module" src="/src/main.ts"></script>
-</body>
-
-</html>
\ No newline at end of file
+    <script type="module" src="/src/main.ts"></script>
+  </body>
+  <script src="public/ddlogin.js"></script>
+</html>
diff --git a/src/assets/ddlogin.js b/public/ddlogin.js
similarity index 100%
rename from src/assets/ddlogin.js
rename to public/ddlogin.js
diff --git a/src/permission.ts b/src/permission.ts
index 45b0146..6c4934b 100644
--- a/src/permission.ts
+++ b/src/permission.ts
@@ -52,7 +52,7 @@
     }
   } else {
     // 娌℃湁token
-    console.log("娌℃湁token");
+    console.log('娌℃湁token');
     if (whiteList.indexOf(to.path) !== -1) {
       // 鍦ㄥ厤鐧诲綍鐧藉悕鍗曪紝鐩存帴杩涘叆
       next();
@@ -67,14 +67,14 @@
   NProgress.done();
 });
 
-const judge = (token: string) => {
+const judge = (token: string | null) => {
   if (token) {
-    var data = JSON.parse(token)
+    const data = JSON.parse(token);
     if (data != null) {
       if (data.expirse != null && new Date().getTime() - data.expirse < 60 * 60 * 1000) {
-        return true
+        return true;
       }
     }
   }
-  return false
-}
\ No newline at end of file
+  return false;
+};
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 55f7498..79b82f4 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -47,6 +47,7 @@
     }
     // get璇锋眰鏄犲皠params鍙傛暟
     if (config.method === 'get' && config.params) {
+      console.log(config.params, '璇锋眰鍙傛暟');
       let url = config.url + '?' + tansParams(config.params);
       url = url.slice(0, -1);
       config.params = {};
@@ -78,6 +79,7 @@
     }
     // 褰撳紑鍚弬鏁板姞瀵�
     if (isEncrypt && (config.method === 'post' || config.method === 'put' || config.method === 'get')) {
+      console.log('寮�鍚簡鍙傛暟鍔犲瘑');
       // 鐢熸垚涓�涓� AES 瀵嗛挜
       const aesKey = generateAesKey();
       config.headers['encrypt-key'] = encrypt(encryptBase64(aesKey));
@@ -90,7 +92,7 @@
     return config;
   },
   (error: any) => {
-    console.log(error);
+    console.log(error, 'wcs');
     return Promise.reject(error);
   }
 );
diff --git a/src/views/dingdingLogin.vue b/src/views/dingdingLogin.vue
index e2f1c3c..6c39461 100644
--- a/src/views/dingdingLogin.vue
+++ b/src/views/dingdingLogin.vue
@@ -26,7 +26,7 @@
         setToken(JSON.stringify(data));
         window.location.href = '/index';
       } else {
-        ElMessage({ message: '鐧诲綍澶辫触', type: 'error' });
+        ElMessage({ message: '鏃犳潈璁块棶', type: 'error' });
         setTimeout(() => {
           window.location.href = '/login';
         }, 3000);
@@ -47,7 +47,7 @@
   } else {
     var mode = 'openid corpid';
     window.location.href =
-      'https://login.dingtalk.com/oauth2/auth?redirect_uri=http://127.0.0.1:81/login&response_type=code&client_id=dingl5dxahaj3uzfug66&scope=' +
+      'https://login.dingtalk.com/oauth2/auth?redirect_uri=http://171.221.173.53:8801/login&response_type=code&client_id=dingl5dxahaj3uzfug66&scope=' +
       encodeURIComponent(mode) +
       '&state=dddd&prompt=consent';
     // // STEP3锛氬湪闇�瑕佺殑鏃跺�欙紝璋冪敤 window.DTFrameLogin 鏂规硶鏋勯�犵櫥褰曚簩缁寸爜锛屽苟澶勭悊鐧诲綍鎴愬姛鎴栧け璐ョ殑鍥炶皟銆�
@@ -93,4 +93,4 @@
   // width: 300px;
   // height: 300px;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0