28169 7 ay önce
ebeveyn
işleme
ba99d44253

+ 6 - 4
controllers/mobile_api_controllers/login_api_controller.go Dosyayı Görüntüle

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

+ 8 - 7
controllers/new_mobile_api_controllers/new_login_api_controller.go Dosyayı Görüntüle

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