| | |
| | | * @param [type] $goods_sign 商品sign |
| | | * @return void |
| | | */ |
| | | public function getGoodsDetail($goods_sign,$is_browse = true) |
| | | public function getGoodsDetail($goods_sign,$is_browse = true,$relationid='') |
| | | { |
| | | $params = [ |
| | | 'goods_sign' => $goods_sign |
| | | ]; |
| | | if(!empty($relationid)) |
| | | { |
| | | $params['custom_parameters']='{"uid":"'.$relationid.'"}'; |
| | | if(!empty(MOBILE_INFO)){ |
| | | $params['pid'] = MOBILE_INFO == "IOS" ? $this->config['ios_pid'] : $this->config['android_pid']; |
| | | }else{ |
| | | return []; |
| | | } |
| | | } |
| | | $send_data = $this->makeSign($params,self::request_url['goods_detail_url']); |
| | | $result = send_get(self::base_url,$send_data); |
| | | if(empty($result)) fault('数据获取失败'); |
| | |
| | | } |
| | | $send_data = $this->makeSign($params,self::request_url['search_goods_url']); |
| | | $result = send_get(self::base_url,$send_data); |
| | | if(empty($result) || isset($result['error_response'])) fault('数据获取失败'); |
| | | if(empty($result) || isset($result['error_response'])) return []; //fault('数据获取失败'); |
| | | $list = $result['goods_search_response']['goods_list']; |
| | | if(!empty($list)){ |
| | | $tmp = []; |