var link = location.href;
$.ajax({
url: "/WxJSSDK/WxJS_SDK.aspx/GetInfoMation",
type: "Post",
data: "{ 'url': '"+link+"' }",
async: false,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
var datad = JSON.parse(data.d);
wx.config({
debug: false,
appId: datad.appid,
timestamp: datad.timestamp,
nonceStr: datad.noncestr,
signature: datad.signature,
jsApiList: [
"openLocation"
]
});
wx.error(function (res) {
layer.msg(res);
});
},
error: function (error) {
layer.msg(error)
}
});