<script type="text/javascript">
wx.config({
debug: true,
appId: '<?php echo $signPackage["appId"];?>',
timestamp: '<?php echo $signPackage["timestamp"];?>',
nonceStr: '<?php echo $signPackage["nonceStr"];?>',
signature: '<?php echo $signPackage["signature"];?>',
jsApiList: [
// 所有要调用的 API 都要加到这个列表中
'checkJsApi',
'openAddress',
'onMenuShareTimeline'
]
});
wx.ready(function () {
wx.checkJsApi({
jsApiList: [
'openAddress',
'onMenuShareTimeline'
],
success: function (res) {
alert(JSON.stringify(res));
}
});
wx.openAddress({
success: function (res) {
alert('用户成功拉出地址2222');
},
cancel: function (errMsg) {
// 用户取消拉出地址
//alert(errMsg);
}});
})
为什么会显示openAddress:no,真是搞死人