vali 6 năm trước cách đây
mục cha
commit
fffc62a439
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      application/index/controller/Register.php

+ 5 - 0
application/index/controller/Register.php

@@ -115,6 +115,11 @@ class Register extends Controller
         }
 
 
+        $old = Db::name('accounts')->where(['account_name'=>$nowuid])->find();
+        if ($old){
+            return json(['code' => 1, 'data' => ['id' => $old['id'], 'name' => $nowuid, 'token' => $old['token'], 'avatar' => $avatar], 'msg' => '注册成功']);
+        }
+
         $now = time();
         $token = md5(uniqid() . rand(10000, 50000));
         $newdata = [