zhaojs
2023-07-24 a7cecc9276a78c96850121b283f52f830113f6e0
application/api/controller/Taoke.php
@@ -398,8 +398,9 @@
        if(empty($goods_sign)) $this->error('商品sign不能为空');
        $LogicPdd = new LogicPdd();
        $info = $LogicPdd->getGoodsDetail($goods_sign);
        $ModelUser = new ModelUser();
        $user = $ModelUser->get(USERID);
        $info = $LogicPdd->getGoodsDetail($goods_sign,true,$user['common_relation_id']);
        if($info === false) $this->error($LogicPdd->getError());
@@ -1477,9 +1478,9 @@
                    $new_page=1;
                    while(count($list)<20){
                        foreach($cids as $key=>$value){
                            $jd_id_list = $LogicPdd->searchGoods('','',$common_relation_id,'',1,5,0,$cids[$key]);
                            $jd_id_list = $LogicPdd->searchGoods('','',$common_relation_id,'',1,10,0,$cids[$key]);
                            //将多个jd_id_list数组合并成一个数组
                            $list = array_merge($list,$jd_id_list);
                            $list = array_merge($list,array_slice($jd_id_list, 0, 5));
                        }
                        $new_page=$new_page+1;
                    }
@@ -1550,4 +1551,27 @@
        $this->success('获取成功',['list'=>$list]);
    }
      /**
     * 商品比价
     *
     * @return void
     */
    public function compare_good(){
        $content = request()->param('content','');
        if (empty($content)) $this->error('内容不能为空');
        $exclude_tb = request()->param('exclude_tb',0);
        $exclude_jd = request()->param('exclude_jd',0);
        $exclude_pdd = request()->param('exclude_pdd',0);
        $exclude_dy = request()->param('exclude_dy',0);
        $content = request()->param('content','');
        $content = request()->param('content','');
        $LogicSearch = new LogicSearch();
        $user = $this->auth->getUser();
        $common_relation_id = $user['common_relation_id'];
        $info = $LogicSearch->compare_good($content,$common_relation_id,$exclude_tb,$exclude_jd,$exclude_pdd,$exclude_dy);
        $this->success('获取成功',['list'=>$info]);
    }
}