chao 9 mesi fa
parent
commit
4bb330d3bd
2 ha cambiato i file con 6 aggiunte e 5 eliminazioni
  1. 2 2
      public/index.html
  2. 4 3
      src/view/login.js

+ 2 - 2
public/index.html

@@ -28,10 +28,10 @@
     } else if (window.location.hostname.indexOf('cocorobo.hk') > -1) {
       document.domain = 'cocorobo.hk'
     } else {
-      document.domain = 'cocorobo.cn'
+      // document.domain = 'cocorobo.cn'
     }
   </script>
-  <title>React App</title>
+  <title>CocoRobo Login</title>
 </head>
 
 <body>

+ 4 - 3
src/view/login.js

@@ -48,14 +48,15 @@ function Login(props) {
         }, 100);
         let aa = window.location.hostname.indexOf('cocorobo.cn') > -1||window.location.hostname.indexOf('localhost') > -1
         let params = {
+            geetest_challenge: "",
+            geetest_validate: "",
+            geetest_seccode: "",
             loginUsername: email.trim(),
             // loginPassword: passworld.trim(),
             loginPassword: aa ? window.btoa(passworld.trim()) : passworld.trim(),
-            geetest_challenge: "",
-            geetest_validate: "",
-            geetest_seccode: ""
         }
         axios.defaults.withCredentials = true;
+        // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
         axios.post(`${config.api}api/user`, qs.stringify(params)).then(res => {
             clearInterval(progressTimer)
             setProgressValue(100)