XMLWAN 3 gadus atpakaļ
vecāks
revīzija
b27967cbbb

+ 11 - 0
controllers/xcx_mobile_api_controller.go/xcx_api_controller.go Parādīt failu

@@ -95,10 +95,16 @@ func (this *XcxApiController) GetUserRegister() {
95 95
 			if err == nil {
96 96
 				this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
97 97
 				return
98
+			} else {
99
+				this.ServeSuccessJSON(map[string]interface{}{
100
+					"is_bind": false,
101
+					"msg":     "绑定失败",
102
+				})
98 103
 			}
99 104
 			this.ServeSuccessJSON(map[string]interface{}{
100 105
 				"role": role,
101 106
 			})
107
+
102 108
 		} else if errcode == nil {
103 109
 			mobilePatient, _ := service.GetMobilePatient(id_card_no)
104 110
 			this.ServeSuccessJSON(map[string]interface{}{
@@ -177,6 +183,11 @@ func (this *XcxApiController) GetLoginInfor() {
177 183
 					"is_bind": true,
178 184
 					"info":    info,
179 185
 				})
186
+			} else if err != nil {
187
+				this.ServeSuccessJSON(map[string]interface{}{
188
+					"is_bind": false,
189
+					"info":    info,
190
+				})
180 191
 			}
181 192
 
182 193
 		} else {