|
@@ -22,7 +22,6 @@ type NewLoginApiController struct {
|
22
|
22
|
}
|
23
|
23
|
|
24
|
24
|
func (this *NewLoginApiController) GetLogin() {
|
25
|
|
-
|
26
|
25
|
token_cookie := this.Ctx.GetCookie("token_cookie")
|
27
|
26
|
if len(token_cookie) == 0 {
|
28
|
27
|
this.ServeSuccessJSON(map[string]interface{}{
|
|
@@ -316,6 +315,7 @@ func (this *NewLoginApiController) LoginByCs() {
|
316
|
315
|
"city": org.City,
|
317
|
316
|
"district": org.District,
|
318
|
317
|
"address": org.Address,
|
|
318
|
+ "creator": org.Creator,
|
319
|
319
|
},
|
320
|
320
|
"subscibe": map[string]interface{}{
|
321
|
321
|
"id": subscibe.ID,
|
|
@@ -487,6 +487,7 @@ func (this *NewLoginApiController) LoginByCs() {
|
487
|
487
|
"city": org.City,
|
488
|
488
|
"district": org.District,
|
489
|
489
|
"address": org.Address,
|
|
490
|
+ "creator": org.Creator,
|
490
|
491
|
},
|
491
|
492
|
"subscibe": map[string]interface{}{
|
492
|
493
|
"id": subscibe.ID,
|
|
@@ -511,6 +512,8 @@ func (this *NewLoginApiController) LoginByCs() {
|
511
|
512
|
func (this *NewLoginApiController) GetCode() {
|
512
|
513
|
mobile := this.GetString("phone")
|
513
|
514
|
aespass := this.GetString("aespass")
|
|
515
|
+ types, _ := this.GetInt("type", 0)
|
|
516
|
+
|
514
|
517
|
utils.TraceLog("mobile:%v aespass:%v", mobile, aespass)
|
515
|
518
|
if utils.CellPhoneRegexp().MatchString(mobile) == false {
|
516
|
519
|
this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeMobileFormat)
|
|
@@ -518,11 +521,13 @@ func (this *NewLoginApiController) GetCode() {
|
518
|
521
|
return
|
519
|
522
|
}
|
520
|
523
|
|
521
|
|
- adminUser, _ := service.GetValidAdminUserByMobileReturnErr(mobile)
|
522
|
|
- if adminUser != nil {
|
523
|
|
- this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeRegisterExist)
|
524
|
|
- this.ServeJSON()
|
525
|
|
- return
|
|
524
|
+ if types == 1 {
|
|
525
|
+ adminUser, _ := service.GetValidAdminUserByMobileReturnErr(mobile)
|
|
526
|
+ if adminUser != nil {
|
|
527
|
+ this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeRegisterExist)
|
|
528
|
+ this.ServeJSON()
|
|
529
|
+ return
|
|
530
|
+ }
|
526
|
531
|
}
|
527
|
532
|
//this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
|
528
|
533
|
// "msg": "短信发送成功,有效期为10分钟",
|