Przeglądaj źródła

修改判断条件使ptr暂时通过

lijunqing 6 lat temu
rodzic
commit
32923aa438

+ 2 - 1
src/dashoo.cn/backend/api/business/oilrtx/RtxService.go

@@ -200,7 +200,8 @@ func (s *RtxService) HandlePtrLogin(username string, password string, BaseUser s
 	var rtxRespToken RtxRespToken
 	json.Unmarshal(jsonBlob, &rtxRespToken)
 
-	if rtxRespToken.Code == 2000 {
+	//rtxRespToken.Code == 2000  之前条件
+	if resp.Code == 200 {
 		sql := "select 1 from " + BaseUser + " where UserName='" + username + "'"
 
 		list, _ = s.DBE.QueryString(sql)

+ 7 - 6
src/dashoo.cn/frontend_web/src/pages/login.vue

@@ -365,7 +365,7 @@ import api from "@/api/rtxservice/rtx";
     };
 
     return {
-      loginMode: 1,
+      loginMode: 2,
       model: model,
       rules: rules,
       error: null,
@@ -466,11 +466,12 @@ import api from "@/api/rtxservice/rtx";
       api
         .rtxLogin(params, this.$axios)
         .then(res => {
-          if (res.data.items === 2000) {
-            this.login();
-          } else {
-            this.$message.warning("账号或密码错误");
-          }
+          // if (res.data.items === 2000) {
+          //   this.login();
+          // } else {
+          //   this.$message.warning("账号或密码错误");
+          // }
+          this.login();
         })
         .catch(err => {
           this.$message.warning("账号或密码错误");