????? ???? ?? ??? ?? ???? ?? ????? ????? ???? ?? ?? ???, ?? ????? ??? ? ? ?? ?? ????? ????? ??? ? ??. ???? ?? ???? ?? ????? ???? ???? ? ?????? ???? ???. ?? ??? mp ????? ??? ? ????.
WeChat? ?? ?? ?? ??? WeChat ??? ?? ?????. WeChat ?? ??? ??? ? ?? ??? ??? ? ????.
?????? ????? ???? ???? ????? ?????? ???? ????? ???? ??? ??? ???? ??? ??? ???? ? ????.
?, ???? ????? ??? ? ???? ?? ?? ???? ? ??? ????? ????? ???? ??, ?? ??? ???? ???? ?? ??? ?? ? ????. ??.
?? ??? ??? ????.
1. ???? ???? ???? ?? ??? ??? ? https://open.weixin ??? WeChat oauth2 ???? ?????. .qq.com/connect/oauth2/authorize
2. oauth2 ???? ??? ?? ???? ?????? PHP? ???? ??? ?? ????? ?? ? ?? ? accessToken ?? ????. ??? ???? ??? ???? ????? ???? ?????.
3. ?? ???? 2?? ??? ?? ????? ??? ??? ?? ???? ???? ?? ?? ??? ?????. ???? ajax? ???? ?? ??? ??????? ???? ??? ?? ? ???? ??? ??? ??? ? ?? ?? ??? ??? ????.
???? ? ? ?? ??? ?? ??? ???? ?????.
1. WeChat oauth2? ???? ??? ??? ???? ?? ??? ?? ? ????. , ??? ?????? ? ?? ????. ? ??? oauth2 ???? ???????. ??? appid? WeChat appid??,redirect_uri? urlencode ?? ?? ?? ??? ??, response_type? ?? ??, ??? ?? snsapi_base, ??? ??? ?? ???? #wechat_redirect? ??? ??? ?? ??? ??? ????.
https://open.weixin.qq.com/connect/oauth2/authorize?appid= APPID&redirect_uri=?? ?? ??&response_type=code&scope =snsapi_base&state=#wechat_redirect
? ???? ?????. 2. ???? ? ??? ????? ? ???? accessToken? ??? ?? ?? ??? ???????. accessToken? ??? ??? ?? ? ?????. accessToken? WeChat? ?? ???? ? ???? ?? ??? ??? ???? ????.
GET ??? ???? accessToken? ???? ? ?? file_get_contents? ??? ? ????. ?? ??? ??? ????.
https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=APP_SECRET&code=CODE&grant_type=authorization_code;
? ?? ??? ????. ??? ?????. ??? WeChat?? ??? ???? ?? ?? ???? ?? ? ???? ???? accessToken? ????? ??? ??? ??? ??? ????.
??? ?? ??? WeChat ??? ??? ????. ?? ???? ?? ???? ??????. ?????&url=?? ???? URL? ???? sha1???? ??????.
??, ? appID, ??(???? jsapi_address), signType(???? sha1), addrSign(???)? ???? ??? ????? ??? ?? ????? ??? ?? ??? ???? ???. ?? sha1? ????), timeStamp(?? ?? ?????), nonceStr(?? ?? ?? ???).
3. ??? ?? ????? ?? js ?? ? ???? ??? ??? ?? ??? ?????.
function get_addr() { WeixinJSBridge.invoke('editAddress',{ "appId" : "<?php echo $sign['appId']?>", "scope" : "jsapi_address", "signType" : "sha1", "addrSign" : "<?php echo $sign['addrSign']?>", "timeStamp" : "<?php echo $sign['timeStamp']?>", "nonceStr" : "<?php echo $sign['nonceStr']?>", },function(res){ if(res.err_msg == 'edit_address:ok') { //將地址信息存入數(shù)據(jù)庫 //將地址信息顯示在當(dāng)前頁面 document.getElementById("address_info").innerHTML="<b>收件人:"+res.userName+"</b> <b>"+res.telNumber+"</b><br /> 收貨地址:"+res.proviceFirstStageName+res.addressCitySecondStageName+res.addressCountiesThirdStageName+res.addressDetailInfo; } else{ alert("獲取地址失敗,請重新點(diǎn)擊"); } }); }
? ???? ??? WeChat? ???? ???? ?? ??? ?? ?? ???????.
? ??? ??? ??? ?? ?? PHP ?? WeChat ?? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)