Skip to content

Instantly share code, notes, and snippets.

@WunGCQ
Last active May 31, 2018 16:37
Show Gist options
  • Save WunGCQ/ffcfdcd7e07df133f06ed6afcafde268 to your computer and use it in GitHub Desktop.
Save WunGCQ/ffcfdcd7e07df133f06ed6afcafde268 to your computer and use it in GitHub Desktop.
pigee_h5_share
function initShare() {
var wx = window['wx'];
var path = 'https://pigee.tongpaostudio.com/entry' + (childrenVersion ? '1' : '') + '?v=' + Date.now();
$.post('//api.tongpaostudio.com/api/js/config', {
url: window.location.href,
origin: path,
}, function (data) {
wx && wx.config(data);
wx && wx.ready(function () {
wx.onMenuShareTimeline({
title: '他们说你变成那种无聊的大人了呐',
link: path,
imgUrl: 'https://tongpao.yuanliangba.cn/activity/pigee/left.png',
});
wx.onMenuShareAppMessage({
title: '他们说你变成那种无聊的大人了呐',
link: path,
desc: '其实你内心住着一只小猪佩奇对不对',
imgUrl: 'https://tongpao.yuanliangba.cn/activity/pigee/right.png',
});
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment