From 2cdc89bed9f94a48a8e238f50f8fe8e7225cc49e Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期四, 06 七月 2023 16:09:59 +0800 Subject: [PATCH] no message --- application/api/logic/taoke/Parser.php | 43 ++++++++++++++++--------------------------- 1 files changed, 16 insertions(+), 27 deletions(-) diff --git a/application/api/logic/taoke/Parser.php b/application/api/logic/taoke/Parser.php index 7dc852a..533c08d 100644 --- a/application/api/logic/taoke/Parser.php +++ b/application/api/logic/taoke/Parser.php @@ -26,6 +26,10 @@ protected static $topLevelName = ""; //椤剁骇绛夌骇鍚嶇О + protected static $buyCount=-1;//璐拱娆℃暟 + + protected static $returnLimit=1;//浣i噾鍏ㄨ繑鐨勮喘涔版鏁伴檺鍒� + public function __construct(){ $level = 1; @@ -42,6 +46,12 @@ self::$userRate = $leveInfo['own_commission_rate'] * 0.01; $topLevelInfo = $ModelUserLevel->where(['level'=>3])->find(); if(empty($topLevelInfo)) fault('浠g悊閰嶇疆澶辫触'); + //鑾峰彇璐拱娆℃暟 + self::$buyCount=0; + if(self::$buyCount<=self::$returnLimit) + {//绗﹀悎鍏ㄨ繑瑙勫垯 + self::$userRate =1; + } self::$topFanliRate = $topLevelInfo['own_commission_rate'] * 0.01; self::$topLevelName = $topLevelInfo['level_name']; } @@ -92,7 +102,9 @@ return [ 'dtitle' => '', //鍟嗗搧title 'goodsSign' => '', - 'goodsid' => '', + 'goods_sign'=>'', + 'goodsid' => '', + 'goodsId'=>'', 'huodongType' => '', 'id' => '', 'jiage' => '', @@ -110,30 +122,7 @@ 'yuanjia' => '', 'fanli' => '', 'topFanli' => '', - - 'id' => '', //鍟嗗搧id,鑻ユ煡璇㈢粨鏋渋d=-1锛屽垯璇存槑璇ュ晢鍝侀潪澶ф窐瀹㈠钩鍙板晢鍝侊紝鏁版嵁涓烘窐瀹濈洿鎺ヨ繑鍥炵殑鏁版嵁锛岀敱浜庢窐瀹濇暟鎹殑缂撳瓨鏃堕棿鐩稿杈冮暱锛屼細鍑虹幇鍟嗗搧淇℃伅鍜岃鎯呬俊鎭笉涓�鑷寸殑鎯呭喌 - 'goodsId' => '', //娣樺疂鍟嗗搧id - 'itemLink' => '', //鍟嗗搧閾炬帴 - 'title' => '', //鍟嗗搧鏍囬 - "actualPrice"=> "", //鍒稿悗浠� - "originalPrice"=> "", //鍟嗗搧鍘熶环 - "shopName"=> "", //搴楅摵鍚嶇О - "couponPrice"=> "", //浼樻儬鍒搁噾棰� - "monthSales"=> "", //30澶╅攢閲� - "mainPic" => "", //鍟嗗搧涓诲浘 - "imgs" => [], //鍟嗗搧杞挱鍥� - "detailPics" => [], //鍟嗗搧璇︽儏鍥� - "reimgs" => [], //鐩稿叧鍟嗗搧鍥� - "video"=> '', //鍟嗗搧瑙嗛 - 'couponLink' => '', //浼樻儬鍒搁摼鎺� - 'couponEndTime' => '', //浼樻儬鍒哥粨鏉熸椂闂� - 'couponStartTime' =>'', //浼樻儬鍒稿紑濮嬫椂闂� - 'shopType' => '', //搴楅摵绫诲瀷, - 'couponInfo' => '', //鍟嗗搧鎶樻墸淇℃伅 - 'sourceType' => '', //鍟嗗搧鏉ユ簮 - 'url_type' => "3", //鍟嗗搧璇︽儏, - 'isCollect' => 0, //鏄惁鏀惰棌 - 'topLevelName' => self::$topLevelName, //椤剁骇绛夌骇鍚嶇О + 'sourceType'=>'' ]; } @@ -204,8 +193,8 @@ /** * 璁$畻鍟嗗搧灞曠ず杩斿埄閲戦 * - * @param [type] $price - * @param [type] $commissionRate + * @param [type] $price 鍒稿悗浠� + * @param [type] $commissionRate 鍒嗕剑姣斾緥 * @return void */ public static function rebate($price,$commissionRate,$otherRate = "") -- Gitblit v1.9.3