From 78b876af3e8647aae615de24ac7932a00cae06a3 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期二, 11 七月 2023 15:24:18 +0800
Subject: [PATCH] no message

---
 application/api/controller/User.php |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/application/api/controller/User.php b/application/api/controller/User.php
index 89032b9..9bd1e0d 100644
--- a/application/api/controller/User.php
+++ b/application/api/controller/User.php
@@ -19,6 +19,7 @@
 use app\api\logic\SettlementRecord as LogicSettlementRecord;
 use app\api\logic\UserMoneyLog as LogicUserMoneyLog;
 use think\log;
+use app\api\logic\ActivityInfo as InfoActivityInfo;
 
 /**
  * 浼氬憳鎺ュ彛
@@ -100,7 +101,7 @@
         $mobile = $this->request->post('mobile');
         $captcha = $this->request->post('captcha');
         $ismobouth=$this->request->post('ismobouth',false);
-        $push_cid=$this->request->post('push_cid',false);
+        $pushCid=$this->request->post('pushCid',false);
         if (!$mobile || !$captcha) {
             $this->error(__('Invalid parameters'));
         }
@@ -118,7 +119,7 @@
             //濡傛灉宸茬粡鏈夎处鍙峰垯鐩存帴鐧诲綍
             $ret = $this->auth->direct($user->id);
         } else {
-            $ret = $this->auth->register($mobile, Random::alnum(), '', $mobile, []);
+            $ret = $this->auth->register($mobile, Random::alnum(), '', $mobile, [],'',[],$pushCid);
         }
         if ($ret) {
             Sms::flush($mobile, 'login');
@@ -296,6 +297,7 @@
     public function bind_mobile_login()
     {
         $wxUser = request()->param('wxUser','','urldecode');
+        $pushCid= request()->param('pushCid','');
         $wxUser = json_decode($wxUser,true);
         if(empty($wxUser)) $this->error('寰俊鎺堟潈淇℃伅鑾峰彇澶辫触');
         $mobile = $this->request->post('mobile');
@@ -322,11 +324,11 @@
         $is_phone_bind = $ModelUser->where(['mobile'=> $mobile])->find();
         if(!empty($is_phone_bind)){
             $LogicUser->bindWechat($is_phone_bind['id'],$wxUser['headimgurl'],$wxUser['sex'],$wxUser['nickname'],$wxUser['openid']);
-            $ret = $this->auth->direct($is_phone_bind['id']);
+            $ret = $this->auth->direct($is_phone_bind['id'],$pushCid);
         }else{ //鍒ゆ柇寰俊鏄惁宸茬粡缁戝畾
             $find_third = $ModelThird->where(['openid'=>$wxUser['openid']])->find();
             if(!empty($find_third)) $this->error('褰撳墠寰俊鍙峰凡缁戝畾鍏朵粬璐﹀彿');
-            $ret = $this->auth->register('', Random::alnum(), '', $mobile, [],'wechat',$wxUser);
+            $ret = $this->auth->register('', Random::alnum(), '', $mobile, [],'wechat',$wxUser,$pushCid);
         }
         Sms::flush($mobile, 'changemobile');
         if ($ret) {
@@ -723,6 +725,9 @@
             $this->error('缁戝畾澶辫触');
         } 
         $ModelUser->commit();
+        //鏇存柊鎷涘嫙娲诲姩淇℃伅
+        $activityInfo=new InfoActivityInfo();
+        $activityInfo->updateRecruitCount($save_data['invitation_id'] );
         $this->success('缁戝畾鎴愬姛',[]);    
     }
 

--
Gitblit v1.9.3