소스 검색

修改手机登录/注册

neo 1 년 전
부모
커밋
c7104068fb
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      nodes/login/controllers/usr.lua

+ 2 - 2
nodes/login/controllers/usr.lua

@@ -148,7 +148,7 @@ function root.usr_register_by_phone(msg)
148
     -- 账号信息
148
     -- 账号信息
149
     local accountObj = accountModule.new(account)
149
     local accountObj = accountModule.new(account)
150
     -- 已注册
150
     -- 已注册
151
-    if accountObj:get_data_from_db() then
151
+    if not is_empty(accountObj:get_data_from_db()) then
152
         -- return code.USR.ALREADY_REGISTER
152
         -- return code.USR.ALREADY_REGISTER
153
         return root.usr_login_by_phone(msg)
153
         return root.usr_login_by_phone(msg)
154
     end
154
     end
@@ -180,7 +180,7 @@ function root.usr_login_by_phone(msg)
180
     end
180
     end
181
 
181
 
182
     local accountObj = accountModule.new(account)
182
     local accountObj = accountModule.new(account)
183
-    if not accountObj:get_data_from_db() then
183
+    if is_empty(accountObj:get_data_from_db()) then
184
         return code.USR.NOT_EXIST_USER
184
         return code.USR.NOT_EXIST_USER
185
     end
185
     end
186
 
186