微信小程序,物流助手对接(中通篇)待续
发布时间:2021-10-24 09:30:36作者:顺晟科技点击:
---恢复内容开始---
更新中
获取所有绑定的物流账号
请求地址
GET https://api.weixin.qq.com/cgi-bin/express/business/account/getall?access_token=ACCESS_TOKEN
首先获取access_token
$url="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=xxxx&secret=xxxx";//(微信公众号和小程序接口一样)
$json_token=m(\'httpurl\')-> http_request($url);
$access_token=json_decode($json_token,true);
$url="https://api.weixin.qq.com/cgi-bin/express/business/account/getall?access_token=".$access_token[\'access_token\'];
$res=m(\'httpurl\')-> http_request($url)
还没绑定的小程序需要先绑定的
//更新快递员信息 $url="https://api.weixin.qq.com/cgi-bin/express/business/printer/update?access_token=".$access_token[\'access_token\']; $print_member = array( "openid"=>"oLCoY4wuHpMKG6V_IHjvXPdocon4",// "update_type"=>"bind" ); $json_template=json_encode($print_member); $res=m(\'httpurl\')-> http_request($url,urldecode($json_template));
返回
stdClass Object ( [errcode] => 0 [errmsg] => ok )
---恢复内容结束---

- 上一篇 : 微信小程序从零开始开发步骤(三)
- 下一篇 : 微信小程序,地址助手 - ekse