| | |
| | | * @param [type] $nineCid 9.9精选的类目id,分类id请求详情:-1-精选,1 -5.9元区,2 -9.9元区,3 -19.9元区(调整字段) |
| | | * @return void |
| | | */ |
| | | public function getOpGoodsList($nineCid,$page = 1,$page_size) |
| | | public function getOpGoodsList($nineCid,$page = 1,$page_size,$excludecid=[]) |
| | | { |
| | | $params = $this->setParams(['version'=>'v3.0.0','nineCid'=>$nineCid,'pageId'=>$page,'pageSize'=>$page_size]); |
| | | $result = send_get(self::request_url['op_goods_list_url'],$params); |
| | | if(empty($result) || $result['code'] != 0) return []; |
| | | |
| | | $list = $result['data']['list']; |
| | | |
| | | $list_new=[]; |
| | | if(!empty($list)){ |
| | | foreach($list as &$goods){ |
| | | //排除指定分类 |
| | | if(!empty($excludecid) && in_array($goods['cid'],$excludecid)) continue; |
| | | $goods = self::initGoods($goods); |
| | | array_push($list_new,$goods); |
| | | } |
| | | } |
| | | return $list; |
| | | return $list_new; |
| | | } |
| | | |
| | | |