Browse Source

2024/6/17

28169 7 months ago
parent
commit
ba99d44253

+ 6 - 4
controllers/mobile_api_controllers/login_api_controller.go View File

@@ -1,10 +1,6 @@
1 1
 package mobile_api_controllers
2 2
 
3 3
 import (
4
-	"XT_New/enums"
5
-	"XT_New/models"
6
-	"XT_New/service"
7
-	"XT_New/utils"
8 4
 	"encoding/json"
9 5
 	"fmt"
10 6
 	"io/ioutil"
@@ -12,6 +8,11 @@ import (
12 8
 	"net/url"
13 9
 	"strconv"
14 10
 
11
+	"XT_New/enums"
12
+	"XT_New/models"
13
+	"XT_New/service"
14
+	"XT_New/utils"
15
+
15 16
 	"github.com/astaxie/beego"
16 17
 )
17 18
 
@@ -23,6 +24,7 @@ type LoginAPIController struct {
23 24
 // @param mobile:string
24 25
 // @param password:string
25 26
 func (this *LoginAPIController) LoginByPwd() {
27
+
26 28
 	mobile := this.GetString("mobile")
27 29
 	pwd := this.GetString("password")
28 30
 	//var mobile = "15089497668"

+ 8 - 7
controllers/new_mobile_api_controllers/new_login_api_controller.go View File

@@ -1,20 +1,21 @@
1 1
 package new_mobile_api_controllers
2 2
 
3 3
 import (
4
-	"XT_New/controllers/mobile_api_controllers"
5
-	"XT_New/enums"
6
-	"XT_New/models"
7
-	"XT_New/service"
8
-	"XT_New/utils"
9 4
 	"encoding/json"
10 5
 	"fmt"
11
-	"github.com/astaxie/beego"
12 6
 	"io/ioutil"
13 7
 	"net/http"
14 8
 	"net/url"
15 9
 	"strconv"
16 10
 	"strings"
17 11
 	"time"
12
+
13
+	"XT_New/controllers/mobile_api_controllers"
14
+	"XT_New/enums"
15
+	"XT_New/models"
16
+	"XT_New/service"
17
+	"XT_New/utils"
18
+	"github.com/astaxie/beego"
18 19
 )
19 20
 
20 21
 type NewLoginApiController struct {
@@ -22,8 +23,8 @@ type NewLoginApiController struct {
22 23
 }
23 24
 
24 25
 func (this *NewLoginApiController) GetLogin() {
25
-	token_cookie := this.Ctx.GetCookie("token_cookie")
26 26
 
27
+	token_cookie := this.Ctx.GetCookie("token_cookie")
27 28
 	if len(token_cookie) == 0 {
28 29
 		this.ServeSuccessJSON(map[string]interface{}{
29 30
 			"isLogin": false,