Last active
January 14, 2019 01:52
-
-
Save southill/15a0ee02813749d91808 to your computer and use it in GitHub Desktop.
分享设置 #iwegu #jsconfig #wxjssdk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: "GET", | |
dataType: "jsonp", | |
url: "https://api.igumo.cc/api/wxcache/jsconfig", | |
data: { | |
url: location.href | |
}, | |
success: function(_data) { | |
if (_data.status == 1) { | |
wx.config({ | |
debug: false, | |
appId: _data.data.appId, | |
timestamp: _data.data.timestamp, | |
nonceStr: _data.data.nonceStr, | |
signature: _data.data.signature, | |
jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', | |
'onMenuShareWeibo', 'hideMenuItems', 'hideAllNonBaseMenuItem' | |
] | |
}); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment