You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.1 KiB
59 lines
2.1 KiB
//$(function() {
|
|
/**
|
|
* 获取config信息
|
|
* @returns
|
|
*/
|
|
function getJssdk() {
|
|
console.log(location.href.split('#')[0])
|
|
$.ajax({
|
|
url: "http://h5.qishichuangke.cn/api/v2/animate/get-jssdk",
|
|
type: "POST",
|
|
data: {
|
|
url:location.href.split('#')[0]
|
|
},
|
|
success: function(data) {
|
|
var result = data.data;
|
|
console.log(data);
|
|
wx.config({
|
|
debug: false, // 开启调试模式
|
|
appId: result['appId'], // 必填,公众号的唯一标识
|
|
timestamp: result['timestamp'], // 必填,生成签名的时间戳
|
|
nonceStr: result['nonceStr'], // 必填,生成签名的随机串
|
|
signature: result['signature'], // 必填,签名,
|
|
jsApiList: result['jsApiList'] // 必填,需要使用的JS接口列表,
|
|
});
|
|
},
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 执行ready接口
|
|
* @returns
|
|
*/
|
|
function getReady() {
|
|
wx.hideMenuItems({ // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3
|
|
menuList: ['menuItem:share:qq', 'menuItem:share:weiboApp', 'menuItem:share:QZone', ]
|
|
});
|
|
//wx.hideAllNonBaseMenuItem();
|
|
//自定义“分享给朋友”及“分享到QQ”按钮的分享内容
|
|
wx.updateAppMessageShareData({
|
|
title: '“云游故宫”知识大闯关', // 分享标题
|
|
desc: '赢价值3000元“故宫游学”大奖,得“KFC葡式蛋挞(经典)”优惠券!', // 分享描述
|
|
link: 'http://cfpyx.childrenfun.com.cn/', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
imgUrl: 'http://gugongh5.qishichuangke.cn/image/default/92FCE13AA7B546CAAF428BBA7CCDC802-6-2.png', // 分享图标
|
|
success: function() {
|
|
// 设置成功
|
|
}
|
|
})
|
|
wx.updateTimelineShareData({
|
|
title: '“云游故宫”知识大闯关', // 分享标题
|
|
link: 'http://cfpyx.childrenfun.com.cn/', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
imgUrl: 'http://gugongh5.qishichuangke.cn/image/default/92FCE13AA7B546CAAF428BBA7CCDC802-6-2.png', // 分享图标
|
|
success: function() {
|
|
// 设置成功
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
//})
|