Browse Source

修复登录/注册

neo 1 year ago
parent
commit
49af0b94a6
1 changed files with 8 additions and 8 deletions
  1. 8 8
      nodes/login/controllers/usr.lua

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

@@ -39,7 +39,7 @@ local function l_uuid_register(msg)
39
     -- 直接进行登陆
39
     -- 直接进行登陆
40
     msg.uid = uid
40
     msg.uid = uid
41
     msg.password = moduleData:hget(uid, "password")
41
     msg.password = moduleData:hget(uid, "password")
42
-    local errCode, ret = root.login(msg)
42
+    local errCode, ret = root.usr_login(msg)
43
     if code.is_ok(errCode) then
43
     if code.is_ok(errCode) then
44
         ret.uid = msg.uid
44
         ret.uid = msg.uid
45
         ret.password = msg.password
45
         ret.password = msg.password
@@ -67,7 +67,7 @@ function root.usr_register(msg)
67
 
67
 
68
     msg.uid = uid
68
     msg.uid = uid
69
     msg.password = moduleData:hget_int(uid, "user", "password")
69
     msg.password = moduleData:hget_int(uid, "user", "password")
70
-    errCode, ret = root.login(msg)
70
+    errCode, ret = root.usr_login(msg)
71
     if code.is_ok(errCode) then
71
     if code.is_ok(errCode) then
72
         ret.uid = msg.uid
72
         ret.uid = msg.uid
73
         ret.password = msg.password
73
         ret.password = msg.password
@@ -81,7 +81,7 @@ end
81
 
81
 
82
 -- 快速登陆
82
 -- 快速登陆
83
 function root.usr_login(msg)
83
 function root.usr_login(msg)
84
-    log.info("login msg[%s]", tostring(msg))
84
+    log.info("usr_login msg[%s]", tostring(msg))
85
     local uid = msg.uid
85
     local uid = msg.uid
86
     if is_empty(uid) or is_empty(msg.password) then
86
     if is_empty(uid) or is_empty(msg.password) then
87
         return code.PARAMTER_ERROR
87
         return code.PARAMTER_ERROR
@@ -133,7 +133,7 @@ function root.usr_login(msg)
133
         password = password
133
         password = password
134
     }
134
     }
135
 
135
 
136
-    log.info("login uid[%d] ret[%s]", tostring(uid), tostring(ret))
136
+    log.info("usr_login uid[%d] ret[%s]", tostring(uid), tostring(ret))
137
     return code.OK, ret
137
     return code.OK, ret
138
 end
138
 end
139
 
139
 
@@ -150,7 +150,7 @@ function root.usr_register_by_phone(msg)
150
     -- 已注册
150
     -- 已注册
151
     if accountObj:get_data_from_db() then
151
     if accountObj:get_data_from_db() then
152
         -- return code.USR.ALREADY_REGISTER
152
         -- return code.USR.ALREADY_REGISTER
153
-        return root.loginByPhone(msg)
153
+        return root.usr_login_by_phone(msg)
154
     end
154
     end
155
     local uid = util_global:gen_user_id()
155
     local uid = util_global:gen_user_id()
156
     -- 注册账号
156
     -- 注册账号
@@ -164,11 +164,11 @@ function root.usr_register_by_phone(msg)
164
     -- 注册埋点
164
     -- 注册埋点
165
     serverLogUtil.logRegister(uid, msg.channel, msg.version, msg.sysVer or "", msg.uuid, msg.udid, msg.ip)
165
     serverLogUtil.logRegister(uid, msg.channel, msg.version, msg.sysVer or "", msg.uuid, msg.udid, msg.ip)
166
 
166
 
167
-    return root.loginByPhone(msg)
167
+    return root.usr_login_by_phone(msg)
168
 end
168
 end
169
 -- 登录 - 手机号
169
 -- 登录 - 手机号
170
 function root.usr_login_by_phone(msg)
170
 function root.usr_login_by_phone(msg)
171
-    log.info("loginByPhone msg[%s]", tostring(msg))
171
+    log.info("usr_login_by_phone msg[%s]", tostring(msg))
172
     local account, password = msg.account, msg.accountPassword
172
     local account, password = msg.account, msg.accountPassword
173
     if not account or not password then
173
     if not account or not password then
174
         return code.PARAMTER_ERROR
174
         return code.PARAMTER_ERROR
@@ -224,7 +224,7 @@ function root.usr_login_by_phone(msg)
224
         registerTime = registerTime
224
         registerTime = registerTime
225
     }
225
     }
226
 
226
 
227
-    log.info("loginByPhone uid[%d] ret[%s]", tostring(uid), tostring(ret))
227
+    log.info("usr_login_by_phone uid[%d] ret[%s]", tostring(uid), tostring(ret))
228
     return code.OK, ret
228
     return code.OK, ret
229
 end
229
 end
230
 
230