From 97825e0556551efba4243a1d7a6b8747eddc26f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Tue, 18 Mar 2025 11:51:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeMini/Operation.php | 29 ++++++++++++++ WeMini/Shopping.php | 95 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 WeMini/Shopping.php diff --git a/WeMini/Operation.php b/WeMini/Operation.php index a3624b9..79b1785 100644 --- a/WeMini/Operation.php +++ b/WeMini/Operation.php @@ -38,4 +38,33 @@ class Operation extends BasicWeChat $url = 'https://api.weixin.qq.com/wxaapi/userlog/userlog_search?access_token=ACCESS_TOKEN'; return $this->callPostApi($url, $data, true); } + + /** + * 获取 mediaId 图片 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function getFeedbackmedia($data) + { + $query = http_build_query($data); + $url = 'https://api.weixin.qq.com/cgi-bin/media/getfeedbackmedia?'. $query .'&access_token=ACCESS_TOKEN'; + return $this->callGetApi($url); + } + + + /** + * 实时日志查询 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function getFeedback($data) + { + $query = http_build_query($data); + $url = 'https://api.weixin.qq.com/wxaapi/userlog/userlog_search?'.$query.'&access_token=ACCESS_TOKEN'; + return $this->callGetApi($url); + } } \ No newline at end of file diff --git a/WeMini/Shopping.php b/WeMini/Shopping.php new file mode 100644 index 0000000..244687e --- /dev/null +++ b/WeMini/Shopping.php @@ -0,0 +1,95 @@ +callPostApi($url, $data, true); + } + + /** + * 上传物流信息 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function uploadShippingInfo($data) + { + $url = 'https://api.weixin.qq.com/user-order/orders?access_token=ACCESS_TOKEN'; + return $this->callPostApi($url, $data, true); + } + + /** + * 上传合单购物详情 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function uploadCombinedShoppingInfo($data) + { + $url = 'https://api.weixin.qq.com/user-order/orders?access_token=ACCESS_TOKEN'; + return $this->callPostApi($url, $data, true); + } + + /** + * 上传合单物流信息 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function uploadCombinedShippingInfo($data) + { + $url = 'https://api.weixin.qq.com/user-order/orders?access_token=ACCESS_TOKEN'; + return $this->callPostApi($url, $data, true); + } + + /** + * 验证购物订单上传结果 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function ShoppingInfoVerifyUploadResult($data) + { + $url = 'https://api.weixin.qq.com/user-order/shoppinginfo/verify?access_token=ACCESS_TOKEN'; + return $this->callPostApi($url, $data, true); + } + + +} \ No newline at end of file