ソースを参照

Merge branch 'master' of https://git.bjtdba.com/shop/php

hefei 1 年間 前
コミット
681dd50025
共有1 個のファイルを変更した7 個の追加1 個の削除を含む
  1. 7 1
      app/controller/api/user/User.php

+ 7 - 1
app/controller/api/user/User.php

@@ -933,6 +933,9 @@ class User extends BaseController
933 933
                 //赠送积分 完善实名送90个积分,同时送邀请人50个积分
934 934
                 $userRepository->sign_add($member_id, 90,1,'完善实名系统赠送90个积分','','', '', 1, '', 1);
935 935
                 $member_info = Db::name('user')->where( array('uid' => $member_id) )->find();
936
+                Db::name('user')
937
+                    ->where('uid', $member_id)
938
+                    ->update(['real_name' => $params['user_name'], 'nickname' => $params['user_name']]);
936 939
                 if($member_info['spread_uid']){
937 940
                     //好友完善实名系统赠送50个积分
938 941
                     $spreadUid = $member_info['spread_uid'];
@@ -1283,8 +1286,11 @@ class User extends BaseController
1283 1286
         $data['birthday'] = $this->request->param('birthday', null);
1284 1287
         $data['addres'] = $this->request->param('addres', null);
1285 1288
         $data['mark'] = $this->request->param('mark', null);
1286
-        $data['account'] = $this->request->param('account', null);
1287 1289
         $data['phone'] = $this->request->param('phone', null);
1290
+        //        $data['phone'] = $this->request->param('phone', null);
1291
+        if (!empty($data['phone'])) {
1292
+            $data['account'] = $data['phone'];
1293
+        }
1288 1294
         $data = array_filter($data, function($value) {
1289 1295
             return $value !== null;
1290 1296
         });