浏览代码

修改bug

yjp 1 年之前
父节点
当前提交
14847572ac
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      convenient/domain/auth/user/api.go

+ 4 - 4
convenient/domain/auth/user/api.go

@@ -198,12 +198,12 @@ func (simple *Simple) Bind(binder *binding.Binder) {
 				}
 
 				if strutils.IsStringNotEmpty(phone) {
-					encryptedPassword, err := encoding.AESEncrypt(phone, simple.AESKey)
+					encryptedPhone, err := encoding.AESEncrypt(phone, simple.AESKey)
 					if err != nil {
 						return false, errors.New(err.Error())
 					}
 
-					conditions.Equal(ColumnPhone, encryptedPassword)
+					conditions.Equal(ColumnPhone, encryptedPhone)
 				}
 
 				return true, nil
@@ -214,12 +214,12 @@ func (simple *Simple) Bind(binder *binding.Binder) {
 				}
 
 				if strutils.IsStringNotEmpty(email) {
-					encryptedPassword, err := encoding.AESEncrypt(email, simple.AESKey)
+					encryptedEmail, err := encoding.AESEncrypt(email, simple.AESKey)
 					if err != nil {
 						return false, errors.New(err.Error())
 					}
 
-					conditions.Equal(ColumnEmail, encryptedPassword)
+					conditions.Equal(ColumnEmail, encryptedEmail)
 				}
 
 				return true, nil