|
|
@@ -119,7 +119,8 @@ class Register extends Common
|
|
|
$appid = trim(input("post.appid/s", ''));
|
|
|
$appuid = trim(input("post.appuid/s", ''));
|
|
|
$token = trim(input("post.token/s", ''));
|
|
|
- $nowuid = (empty($appuid) || empty($appuid)) ? uniqid('anon_') : $appid . '_' . $appuid;
|
|
|
+ $nowuid = (empty($appuid)) ? uniqid('anon_') : $appuid;
|
|
|
+ $nowuid = $appid . $nowuid;
|
|
|
|
|
|
if (!empty($nowuid) && !empty($token)) {
|
|
|
$old = Db::name('accounts')->where(['account_name' => $nowuid, 'tokenvip' => $token])->find();
|
|
|
@@ -140,6 +141,14 @@ class Register extends Common
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if ($nowuid) {
|
|
|
+ $old = Db::name('accounts')->where(['account_name' => $nowuid])->find();
|
|
|
+ if ($old) {
|
|
|
+ Db::name('accounts')->where(['account_name' => $nowuid])->update(['last_login_time' => time()]);
|
|
|
+ return json(['code' => 1, 'data' => ['id' => $old['id'], 'name' => $nowuid, 'token' => $old['tokenvip']], 'msg' => '注册成功', 'tutype' => 1]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
NEWUSERLABLE:
|
|
|
$now = time();
|
|
|
$token = md5(uniqid() . rand(10000, 50000));
|