|
@@ -13,6 +13,11 @@ require_once (BASE_ROOT_PATH . '/helper/shaker_helper.php');
|
|
|
require_once (BASE_ROOT_PATH . '/helper/ranklist_helper.php');
|
|
|
require_once (BASE_ROOT_PATH . '/helper/special_helper.php');
|
|
|
require_once (BASE_ROOT_PATH . '/helper/util_helper.php');
|
|
|
+require_once (BASE_ROOT_PATH . '/helper/search/tcp_client.php');
|
|
|
+require_once (BASE_ROOT_PATH . '/helper/search/util.php');
|
|
|
+require_once (BASE_ROOT_PATH . '/helper/search_param.php');
|
|
|
+require_once (BASE_ROOT_PATH . '/helper/goods_helper.php');
|
|
|
+
|
|
|
|
|
|
class member_bonusControl extends mbMemberControl
|
|
|
{
|
|
@@ -115,6 +120,82 @@ class member_bonusControl extends mbMemberControl
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function match_goodsOp()
|
|
|
+ {
|
|
|
+ $bonus_rate = $this->mPred->bonus_rate();
|
|
|
+ $rate_moneys = $bonus_rate->format();
|
|
|
+ $price = bonus_helper::match_price($rate_moneys);
|
|
|
+
|
|
|
+ if($price == false)
|
|
|
+ {
|
|
|
+ return self::outsuccess(array('special_list' => null,
|
|
|
+ 'summary' => null,
|
|
|
+ 'groupbuy' => null,
|
|
|
+ 'limitime' => null,
|
|
|
+ 'bundling' => null,
|
|
|
+ 'mobile_page' => mobile_page(0)));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ $params = ['price' => $price,'page_no' => $this->page_no(),'page_size' => $this->page_size()];
|
|
|
+ $result = search\tcp_client::instance()->match_price($params);
|
|
|
+
|
|
|
+ $cids = $result['cids'];
|
|
|
+ $model_goods = Model('goods');
|
|
|
+ $items = $model_goods->getGoodsListByColorDistinct(array('goods_commonid' => array('in',$cids)),goods_helper::fieldstr,'','');
|
|
|
+ $page_count = $result['page_count'];
|
|
|
+
|
|
|
+ if(empty($items))
|
|
|
+ {
|
|
|
+ return self::outsuccess(array('special_list' => null,
|
|
|
+ 'summary' => null,
|
|
|
+ 'groupbuy' => null,
|
|
|
+ 'limitime' => null,
|
|
|
+ 'bundling' => null,
|
|
|
+ 'mobile_page' => mobile_page($page_count)));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ $tmp =[];
|
|
|
+ foreach ($items as $item) {
|
|
|
+ $commonid = intval($item['goods_commonid']);
|
|
|
+ $tmp[$commonid] = $item;
|
|
|
+ }
|
|
|
+
|
|
|
+ $goods_list = [];
|
|
|
+ foreach ($cids as $cid)
|
|
|
+ {
|
|
|
+ if(array_key_exists($cid,$tmp)) {
|
|
|
+ $goods_list[] = $tmp[$cid];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $blocks = [];
|
|
|
+ if($this->page_no() == 1)
|
|
|
+ {
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($goods_list as $goods) {
|
|
|
+ $goods_id = intval($goods['goods_id']);
|
|
|
+ $goods_ids[] = $goods_id;
|
|
|
+ }
|
|
|
+
|
|
|
+ $helper = new goods_helper();
|
|
|
+ $ret = $helper->get_summaryex($goods_list,$related_goods);
|
|
|
+
|
|
|
+ $block = special_formater::format_goods($goods_ids,"",$ret['sort_summary']);
|
|
|
+ $blocks[] = $block;
|
|
|
+
|
|
|
+ return self::outsuccess(array('special_list' => $blocks,
|
|
|
+ 'summary' => $ret['summary'],
|
|
|
+ 'groupbuy' => $ret['groupbuy'],
|
|
|
+ 'limitime' => $ret['limitime'],
|
|
|
+ 'bundling' => $ret['bundling'],
|
|
|
+ 'mobile_page' => mobile_page($page_count)));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public function makeby_bonusOp()
|
|
|
{
|
|
|
if(!isset($_GET['bonus_sn']) || empty($_GET['bonus_sn'])) {
|
|
@@ -793,6 +874,8 @@ class member_bonusControl extends mbMemberControl
|
|
|
$pages = $this->pages($count);
|
|
|
return $type_infos;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
class tpl_invite
|