dev_hss
hjm 6 years ago
parent b95c8c4f2e
commit 0170247b4a

@ -285,8 +285,9 @@ class App extends Component {
if (window.wx) {
const wx = window.wx
const url = '/wechats/js_sdk_signature.json'
const currentUrl = window.location.href.split('#')[0]
axios.post(url, {
url: window.location.href.split('#')[0],
url: currentUrl,
}).then((response) => {
console.log('got res')
const data = response.data;
@ -308,10 +309,10 @@ class App extends Component {
wx.ready(function () {
console.log('wx is ready')
var shareData = {
title: '这是是分享标题',
desc: '这是是摘要',
link: 'http://pre-newweb.educoder.net',
imgUrl: 'http://pre-newweb.educoder.net/images/educoder/index/subject/subject15.jpg'
title: 'EduCoder',
desc: '创新源于实践',
link: currentUrl,
imgUrl: currentUrl + '/images/educoder/index/subject/subject15.jpg'
};
wx.onMenuShareAppMessage(shareData);//分享给好友

Loading…
Cancel
Save