|
@@ -82,15 +82,16 @@ func Save(context *admin.Context) (interface{}, error) {
|
|
|
if param.Password != "" {
|
|
|
password = string(admin.Passworder.Hash([]byte(param.Password)))
|
|
|
}
|
|
|
- if param.LoginType == "2" { //点击发送手机验证码
|
|
|
- phoneExist, _ := thisModel.GetByPhone(param.Phone)
|
|
|
- if phoneExist.Id > 0 {
|
|
|
- if phoneExist.Id != param.Id {
|
|
|
- return nil, errors.New("手机号已绑定其他账号")
|
|
|
- } else {
|
|
|
- return nil, errors.New("手机号与原手机号一致")
|
|
|
- }
|
|
|
+ phoneExist, _ := thisModel.GetByPhone(param.Phone)
|
|
|
+ if phoneExist.Id > 0 {
|
|
|
+ if phoneExist.Id != param.Id {
|
|
|
+ return nil, errors.New("手机号已绑定其他账号")
|
|
|
+ } else {
|
|
|
+ return nil, errors.New("手机号与原手机号一致")
|
|
|
}
|
|
|
+ }
|
|
|
+ if param.LoginType == "2" { //点击发送手机验证码
|
|
|
+
|
|
|
if SendPhoneIdentCode(context, param.Phone) {
|
|
|
return map[string]interface{}{"status": 3}, nil
|
|
|
} else {
|