xuzhiheng 4 years ago
parent
commit
ed8c57f738
1 changed files with 7 additions and 5 deletions
  1. 7 5
      static/templates/login.html

+ 7 - 5
static/templates/login.html

@@ -4,6 +4,7 @@
     <head>
         <meta charset="UTF-8">
         <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+        <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
         <title>接口服务平台后台管理系统</title>
     </head>
     <style>
@@ -51,7 +52,7 @@
                     }
                 })
             }
-            
+            console.log(md5(appid+"1610611965"+key))
             $("#projectListBtn").on("click", function(){
                 var param = {
                     "app_id": appid,
@@ -61,12 +62,13 @@
                 };
                 var url = "/sfis/api/v1/projectList";
                 var rType = "post";
-                // var token = $.md5(appid+new Date().getTime() / 1000+key);
-                var token = "6f6d4434cc424a44360ce1b27939500e";
+                var now = new Date().getTime();
+                var token = md5(appid+Math.round(now/1000)+key);
+                // var token = "6f6d4434cc424a44360ce1b27939500e";
                 console.log(token)
                 var hearders = {
-                    // "timestamp": ""+Math.round(new Date().getTime()/1000),
-                    "timestamp": "1610610260",
+                    "timestamp": ""+Math.round(now/1000),
+                    // "timestamp": "1610610260",
                     "token": token
                 }
                 submit(param,rType,url,hearders);