...
|
...
|
@@ -4,20 +4,12 @@ |
|
|
$(function () {
|
|
|
var url = window.location.href;
|
|
|
var title_title = $(document).attr('title');
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: "/portal/login/wxShare",
|
|
|
data: {
|
|
|
},
|
|
|
dataType: 'json',
|
|
|
success: function(data) {
|
|
|
alert(JSON.stringify(data));
|
|
|
wx.config({
|
|
|
debug: true,
|
|
|
appId: data.appId,
|
|
|
timestamp: data.timestamp,
|
|
|
nonceStr: data.nonceStr,
|
|
|
signature: data.signature,
|
|
|
appId: '{$data.appId}',
|
|
|
timestamp: '{$data.timestamp}',
|
|
|
nonceStr: '{$data.nonceStr}',
|
|
|
signature: '{$data.signature}',
|
|
|
jsApiList: [
|
|
|
'updateAppMessageShareData',
|
|
|
'updateTimelineShareData',
|
...
|
...
|
@@ -45,9 +37,6 @@ |
|
|
wx.error(function (res) {
|
|
|
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
</script> |
|
|
\ No newline at end of file |
...
|
...
|
|