|
@@ -391,6 +391,8 @@ class UserInfo extends BaseController
|
|
|
return json_show(1002, "手机号已注册!");
|
|
|
}
|
|
|
|
|
|
+ Db::startTrans();
|
|
|
+
|
|
|
try {
|
|
|
$salt = makeSalt();
|
|
|
$password = sha1("dingding123" . $salt);
|
|
@@ -491,6 +493,7 @@ class UserInfo extends BaseController
|
|
|
->findOrEmpty();
|
|
|
if ($tmp) return json_show(1002, "手机号已注册");
|
|
|
|
|
|
+ Db::startTrans();
|
|
|
try {
|
|
|
$date = date("Y-m-d H:i:s");
|
|
|
$salt = makeSalt();
|
|
@@ -582,6 +585,8 @@ class UserInfo extends BaseController
|
|
|
->findOrEmpty();
|
|
|
if ($tmp) return json_show(1002, "手机号已注册");
|
|
|
|
|
|
+ Db::startTrans();
|
|
|
+
|
|
|
try {
|
|
|
$date = date("Y-m-d H:i:s");
|
|
|
$salt = makeSalt();
|
|
@@ -649,7 +654,7 @@ class UserInfo extends BaseController
|
|
|
Db::rollback();
|
|
|
return json_show(1002, "注册失败");
|
|
|
|
|
|
- } catch (\Exception $e) {
|
|
|
+ } catch (Exception $e) {
|
|
|
Db::rollback();
|
|
|
return json_show(1002, "注册失败," . $e->getMessage());
|
|
|
}
|