Commit 90c64948 authored by 王源's avatar 王源 🎧

修改shopify底层分页接口加入参数

parent 7f40dd4b
...@@ -260,12 +260,13 @@ abstract class AbstractShopify ...@@ -260,12 +260,13 @@ abstract class AbstractShopify
/** /**
* 分页 * 分页
* @param null $url * @param null $url
* @return ['data' => [数据], 'next_link' => '下一页链接'] * @param array $urlParams
* @return mixed ['data' => [数据], 'next_link' => '下一页链接']
* @throws Exception * @throws Exception
*/ */
public function page($url = null) public function page($url = null, $urlParams = [])
{ {
if (!$url) $url = $this->generateUrl(); if (!$url) $url = $this->generateUrl($urlParams);
$response = HttpRequestJson::get($url, $this->httpHeaders); $response = HttpRequestJson::get($url, $this->httpHeaders);
return $this->processPageResponse($response, $this->pluralizeKey); return $this->processPageResponse($response, $this->pluralizeKey);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment