Merge branch 'feature/v1.1.5接口补充2' into develop
| | |
| | | $cateId = request()->param('cateId',''); |
| | | |
| | | $subcid = request()->param('subcid',''); |
| | | |
| | | $couponPriceLowerLimit=request()->param('couponPriceLowerLimit',''); |
| | | //if(empty($cateId) && empty($subcid)) $this->error('分类ID不能为空'); |
| | | |
| | | $page = request()->param('page',1); |
| | |
| | | $secrend_search=request()->param('secrend_search',0); |
| | | $LogicDataoke = new LogicDataoke(); |
| | | |
| | | $list = $LogicDataoke->getGoodsList($cateId,$subcid,$sort,$page,$page_size,$tchaoshi,$secrend_search); |
| | | $list = $LogicDataoke->getGoodsList($cateId,$subcid,$sort,$page,$page_size,$tchaoshi,$secrend_search,$couponPriceLowerLimit); |
| | | |
| | | if($list === false) $this->error($LogicDataoke->getError()); |
| | | |
| | |
| | | * @param mixed 大淘客的二级类目id,通过超级分类API获取。仅允许传一个二级id,当一级类目id和二级类目id同时传入时,会自动忽略二级类目id |
| | | * @return void |
| | | */ |
| | | public function getGoodsList($cids,$subcid,$sort=0,$page = 1,$page_size,$tchaoshi=0,$secrend_search=0) |
| | | public function getGoodsList($cids,$subcid,$sort=0,$page = 1,$page_size,$tchaoshi=0,$secrend_search=0,$couponPriceLowerLimit) |
| | | { |
| | | $params = $this->setParams(['cids'=>$cids,'tchaoshi'=>$tchaoshi,'subcid'=>$subcid,'sort'=>$sort,'pageId'=>$page,'pageSize'=>$page_size]); |
| | | if($secrend_search>0) |
| | |
| | | break; |
| | | } |
| | | } |
| | | if(!empty($couponPriceLowerLimit)) |
| | | { |
| | | $params['couponPriceLowerLimit']=$couponPriceLowerLimit; |
| | | } |
| | | $result = send_get(self::request_url['goods_list'],$params); |
| | | |
| | | if(empty($result) || $result['code'] != 0) return []; |
| | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | let isshow=comUtils.getUrlPar('ishow'); |
| | | /* let isshow=comUtils.getUrlPar('ishow'); |
| | | if(isshow) |
| | | { |
| | | this.getItemsInfo(); |
| | | } |
| | | |
| | | } */ |
| | | this.getItemsInfo(); |
| | | }, |
| | | methods: { |
| | | getItemsInfo() { |
| | |
| | | let postdata = { |
| | | page: 1, |
| | | pageSize: 20, |
| | | sort: 7 |
| | | sort: 2, |
| | | subcid:8052, |
| | | couponPriceLowerLimit:10 |
| | | }; |
| | | this.$http.post('/api/taoke/tb_goods_list', |
| | | postdata |
| | | ).then(e => { |
| | | console.log(e); |
| | | uni.hideLoading(); |
| | | if (e.code != 0) { |
| | | return; |
| | | } |
| | | this.itemsdata = e.data.list; |
| | | var obj=[]; |
| | | var newarr=[]; |
| | | for(var i=0;i<e.data.list.length;i++) |
| | | { |
| | | if(!obj[e.data.list[i].shopName]) |
| | | { |
| | | newarr.push(e.data.list[i]); |
| | | obj[e.data.list[i].shopName]=true; |
| | | } |
| | | } |
| | | this.itemsdata = newarr; |
| | | console.log(e); |
| | | }).catch(function(err) { |
| | | console.log(err); |