|
@@ -31,7 +31,7 @@ func (this *LoginController) PwdLogin() {
|
31
|
31
|
}
|
32
|
32
|
|
33
|
33
|
if url := service.GetAppURLWithAppType(appType); len(url) == 0 {
|
34
|
|
- appType = 1
|
|
34
|
+ appType = 0
|
35
|
35
|
returnURL = ""
|
36
|
36
|
}
|
37
|
37
|
utils.TraceLog("login token: %v", token)
|
|
@@ -62,7 +62,7 @@ func (this *LoginController) CodeLogin() {
|
62
|
62
|
appType, _ := this.GetInt("app_type")
|
63
|
63
|
|
64
|
64
|
if url := service.GetAppURLWithAppType(appType); len(url) == 0 {
|
65
|
|
- appType = 1
|
|
65
|
+ appType = 0
|
66
|
66
|
returnURL = ""
|
67
|
67
|
}
|
68
|
68
|
utils.TraceLog("login token: %v", token)
|
|
@@ -102,8 +102,10 @@ func (this *LoginController) CodeLogin() {
|
102
|
102
|
func (this *LoginController) PwdLoginSubmit() {
|
103
|
103
|
appType, _ := this.GetInt("app_type")
|
104
|
104
|
|
|
105
|
+ utils.TraceLog("login app_type=%v", appType)
|
105
|
106
|
if url := service.GetAppURLWithAppType(appType); len(url) == 0 {
|
106
|
|
- appType = 1
|
|
107
|
+ utils.TraceLog("login app_type not exist")
|
|
108
|
+ appType = 0
|
107
|
109
|
}
|
108
|
110
|
mobile := this.GetString("mobile")
|
109
|
111
|
password := this.GetString("password")
|
|
@@ -158,7 +160,7 @@ func (this *LoginController) PwdLoginSubmit() {
|
158
|
160
|
func (this *LoginController) CodeLoginSubmit() {
|
159
|
161
|
appType, _ := this.GetInt("app_type")
|
160
|
162
|
if url := service.GetAppURLWithAppType(appType); len(url) == 0 {
|
161
|
|
- appType = 1
|
|
163
|
+ appType = 0
|
162
|
164
|
}
|
163
|
165
|
mobile := this.GetString("mobile")
|
164
|
166
|
code := this.GetString("code")
|
|
@@ -261,6 +263,7 @@ func (this *LoginController) getRedirectURL(app_type int, mobile string, returnU
|
261
|
263
|
url := this.appendTokenParamToReturnURL(returnURL, token)
|
262
|
264
|
return url, nil, admin
|
263
|
265
|
}
|
|
266
|
+ utils.TraceLog("login redirect url: app_type=%v", app_type)
|
264
|
267
|
// 普通管理员用户
|
265
|
268
|
// 如果有登录记录,则前往最近登录记录中的应用
|
266
|
269
|
lastLoginLog, getLastLoginLogErr := service.GetAdminUserLastLoginLog(admin.Id, app_type)
|