a代码如下:
//重点 引入这句
//测试 引用
function jsSdk() {
var baseUrl = '***********';
$.ajax({
cache: false,
url: baseUrl + "/api/boss/js_sign",
type: "GET",
data: 'URL=' + encodeURIComponent(location.href.split('#')[0]),
dataType: "json",
success: function (json) {
if (json) {
jsLocation(json)
}
},
error: function (e, errorType, error) {
},
});
};
function jsLocation(params) {
wx.config({
beta: true,
debug: false,
appId: params.appId,
timestamp: params.timestamp,
nonceStr: params.nonceStr,
signature: params.signature,
jsApiList: ['checkJsApi', 'openLocation', 'getLocation