From 8f3cdf2766caf034332357b8c67cbbdf5e41be69 Mon Sep 17 00:00:00 2001 From: songliang Date: Thu, 15 Dec 2022 19:47:00 +0800 Subject: [PATCH] ... --- webapp/controller/MarketController.class.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index d2ae2478..c3210b65 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -679,7 +679,18 @@ class MarketController extends BaseController { $price_filter_array = explode('|', $price_filter); $job_filter_fn = function ($f) { - return ''; + $str = ''; + $arr = array(); + foreach($f as $v) { + if (!empty($v)) { + array_push($arr, 'c_job=\'' . $v . '\' '); + } + } + if (count($arr)>0) { + $str = implode('OR ', $arr); + $str = 'AND (' . $str . ') '; + } + return $str; }; $lv_filter_fn = function ($f) { $f = (int) $f; @@ -858,7 +869,7 @@ class MarketController extends BaseController { 'modifytime' => myself()->_getNowTime(), 's_price' => $s_price, 'c_name' => $nftDetail['info']['name'], - 'c_job' => isset($nftDetail['info']['job']) ? $nftDetail['info']['job'] : 0, + 'c_job' => isset($nftDetail['info']['job']) ? $nftDetail['info']['job'] : ($detail['chip_type'] ? $detail['chip_type']: ($detail['type']?$detail['type']:0)), 'c_lv' => isset($nftDetail['info']['level']) ? $nftDetail['info']['level'] : 0, 'c_quality' => isset($nftDetail['info']['quality']) ? $nftDetail['info']['quality'] : 0, 'c_durability' => isset($nftDetail['info']['durability']) ? $nftDetail['info']['durability'] : (isset($detail['hero_tili']) ? $detail['hero_tili'] : 0),