|
|
@@ -136,21 +136,27 @@ class User extends Controller
|
|
|
$account = db('accounts')->where('id',$account_id)->find();
|
|
|
|
|
|
$info = array();
|
|
|
+ $messageinfo = array();
|
|
|
$info['nick_name'] = $nick_name;
|
|
|
+ $messageinfo['nick_name'] = $nick_name;
|
|
|
if(!empty($email)){
|
|
|
$param['email'] = $email;
|
|
|
$info['account_email'] = $email;
|
|
|
+ $messageinfo['email'] = $email;
|
|
|
}else{
|
|
|
if(!empty($account)){
|
|
|
$param['email'] = $account['account_email'];
|
|
|
+ $messageinfo['email'] = $account['account_email'];
|
|
|
}
|
|
|
}
|
|
|
if(!empty($phone)){
|
|
|
$param['phone'] = $phone;
|
|
|
$info['account_phone'] = $phone;
|
|
|
+ $messageinfo['phone'] = $phone;
|
|
|
}else{
|
|
|
if(!empty($account)){
|
|
|
$param['phone'] = $account['account_phone'];
|
|
|
+ $messageinfo['phone'] = $account['account_phone'];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -158,7 +164,7 @@ class User extends Controller
|
|
|
db('accountsmessage')->insertGetId($param);
|
|
|
if(!empty($info)){
|
|
|
db('accounts')->where('id',$account_id)->update($info);
|
|
|
- db('accountsmessage')->where('account_id',$account_id)->update($info);
|
|
|
+ db('accountsmessage')->where('account_id',$account_id)->update($messageinfo);
|
|
|
}
|
|
|
}catch(\Exception $e){
|
|
|
return json(['code' => -1, 'data' => '', 'msg' => $e->getMessage()]);
|