From 46ec78d291c69dac458103df6ead5b069fc9a8f4 Mon Sep 17 00:00:00 2001 From: heyuntao <heyuntao@LAPTOP-MP4HD5NS> Date: 星期二, 04 七月 2023 14:57:28 +0800 Subject: [PATCH] o元购记录增加平台字段 --- application/api/controller/User.php | 44 +++++++++++++++++++++++++++++++++++++------- 1 files changed, 37 insertions(+), 7 deletions(-) diff --git a/application/api/controller/User.php b/application/api/controller/User.php index baa9132..edb6a6a 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')); } @@ -211,7 +214,8 @@ $user = $this->auth->getUser(); $mobile = $this->request->post('mobile'); $captcha = $this->request->post('captcha'); - if (!$mobile || !$captcha) { + $isyj=$this->request->post('isyj',false); + if (!$mobile || (!$isyj&&!$captcha)) { $this->error(__('Invalid parameters')); } if (!Validate::regex($mobile, "^1\d{10}$")) { @@ -282,16 +286,21 @@ if(empty($wxUser)) $this->error('寰俊鎺堟潈淇℃伅鑾峰彇澶辫触'); $mobile = $this->request->post('mobile'); $captcha = $this->request->post('captcha'); - if (!$mobile || !$captcha) { + $isyj=$this->request->post('isyj',false); + if (!$mobile || (!$isyj&&!$captcha)) { $this->error(__('Invalid parameters')); } if (!Validate::regex($mobile, "^1\d{10}$")) { $this->error('璇疯緭鍏ユ纭墜鏈哄彿'); } - $result = Sms::check($mobile, $captcha, 'changemobile'); - if (!$result) { - $this->error(__('Captcha is incorrect')); + if(!$isyj) + { + $result = Sms::check($mobile, $captcha, 'changemobile'); + if (!$result) { + $this->error(__('Captcha is incorrect')); + } } + $ModelThird = new ModelThird(); $LogicUser = new LogicUser(); //鍒ゆ柇褰撳墠鎵嬫満鍙锋槸鍚﹀凡缁忕粦瀹氬井淇� @@ -430,7 +439,7 @@ $this->success([],'鍒犻櫎鎴愬姛'); } - + /** * 鏍囪娴忚0鍏冭喘鍟嗗搧璁板綍 * @@ -442,15 +451,36 @@ $new_goodsId = request()->param('new_goodsId',''); + $plateform= request()->param('plateform',''); + $LogicUserBrowse = new LogicUserBrowse(); - $res = $LogicUserBrowse->updatefirstfreelog(USERID,$ids,$new_goodsId); + $res = $LogicUserBrowse->updatefirstfreelog(USERID,$ids,$new_goodsId,$plateform); 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