luohailiang 2 anni fa
parent
commit
acfbc46dfc
2 ha cambiato i file con 12 aggiunte e 2 eliminazioni
  1. 11 1
      static/scripts/transfer.js
  2. 1 1
      transfer.html

+ 11 - 1
static/scripts/transfer.js

@@ -1,3 +1,13 @@
+function setCookie(name, value, day, path, domain) {
+    day = day || 30;
+    path = path || '/';
+    var str = name + '=' + value + '; ';
+    if (day) str += 'expires=' + new Date(Date.now() + day * 24 * 3600 * 1000).toGMTString() + '; ';
+    if (path) str += 'path=' + path + '; ';
+    if (domain) str += 'domain=' + domain;
+    document.cookie = str;
+}
+
 let ticket = '';
 if (location.search.includes('ticket')) {
     ticket = location.search.substring(8);
@@ -9,7 +19,7 @@ if (location.search.includes('ticket')) {
         timeout: 30000,
         dataType: 'json',
         data: {
-            type:'login',
+            type: 'login',
             ticket: ticket
         },
         success: (res) => {

+ 1 - 1
transfer.html

@@ -22,7 +22,7 @@
 <script src="static/scripts/vue.min.js"></script>
 <script src="static/scripts/axios.min.js"></script>
 <script src="static/scripts/qs.min.js"></script>
-<script src="static/scripts/transfer.js?v=2022112811"></script>
+<script src="static/scripts/transfer.js?v=2022112822"></script>
 <script>
     var _hmt = _hmt || [];
     (function() {