微信小程序,物流助手对接(中通篇)待续


---恢复内容开始---

更新中

获取所有绑定的物流账号

请求地址

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 )

 

 

 

 

---恢复内容结束---


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM