From e1b3e17a206bd0bb59881f044ec09fa275ef46a5 Mon Sep 17 00:00:00 2001 From: 15295036569 <349234519@qq.com> Date: 星期三, 14 六月 2023 16:52:09 +0800 Subject: [PATCH] Merge branch 'feature/1.1.3api开发' of http://60.204.153.149:8081/r/dfgApi into feature/1.1.3api开发 --- application/api/controller/User.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/application/api/controller/User.php b/application/api/controller/User.php index 03a09e7..a281c3e 100644 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -18,6 +18,8 @@ use app\api\logic\UserWithdrawal as LogicUserWithdrawal; use app\api\logic\SettlementRecord as LogicSettlementRecord; use app\api\logic\UserMoneyLog as LogicUserMoneyLog; +use think\log; + /** * 浼氬憳鎺ュ彛 */ @@ -84,6 +86,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); if (!$mobile || !$captcha) { $this->error(__('Invalid parameters')); } @@ -245,6 +248,7 @@ { $openid = request()->param('openid'); $access_token = request()->param('access_token'); + $push_cid=request()->param('push_cid',''); $LogicUser = new LogicUser(); $userId = $LogicUser->getUserByOpenId($openid); if ($userId) { @@ -252,6 +256,10 @@ if(empty($user)) $this->error("鐢ㄦ埛淇℃伅鑾峰彇澶辫触"); if ($user['status'] != 'normal') { $this->error(__('Account is locked')); + } + if(!empty($push_cid)&&empty($user['push_cid'])) + {//琛ㄩ噷push_cid涓虹┖锛岃ˉ鍏╬ush_cid + } //濡傛灉宸茬粡鏈夎处鍙峰垯鐩存帴鐧诲綍 $ret = $this->auth->direct($user['id']); @@ -431,6 +439,46 @@ } + /** + * 鏍囪娴忚0鍏冭喘鍟嗗搧璁板綍 + * + * @return void + */ + public function update_first_free_browse() + { + $ids = request()->param('goodsid',''); + + $new_goodsId = request()->param('new_goodsId',''); + + $LogicUserBrowse = new LogicUserBrowse(); + + $res = $LogicUserBrowse->updatefirstfreelog(USERID,$ids,$new_goodsId); + + if($res === false) $this->error($LogicUserBrowse->getError()); + + $this->success([],'娣诲姞鎴愬姛'); + } + + /** + * 妫�娴嬫槸鍚﹂鍗� + * + * @return void + */ + + public function check_isfirst_free() + { + + $LogicUserBrowse = new LogicUserBrowse(); + + $res = $LogicUserBrowse->checkIsFirstFree(USERID); + + if($res === false) $this->error($LogicUserBrowse->getError()); + Log::write('妫�娴嬫槸鍚﹂鍗曪細'.json_encode($res)); + if(empty($res)) $this->success(['info'=>1],'棣栧崟瀹㈡埛'); + $this->success(['info'=>0],'闈為鍗曞鎴�'); + } + + /** * 鐢ㄦ埛鏀惰棌璁板綍 * -- Gitblit v1.9.3