|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
<script>
|
|
|
|
|
const jwx = require('jweixin-module')
|
|
|
|
|
export default {
|
|
|
|
|
onLaunch: function() {
|
|
|
|
|
console.log('App Launch')
|
|
|
|
|
@ -17,6 +18,45 @@
|
|
|
|
|
})
|
|
|
|
|
this.$u.vuex('vuex_token', res.token)
|
|
|
|
|
this.$u.vuex('vuex_userId', res.user_id)
|
|
|
|
|
let url = location.href.split('#')[0]
|
|
|
|
|
this.$u.api.share({
|
|
|
|
|
url
|
|
|
|
|
}).then(res => {
|
|
|
|
|
jwx.config({
|
|
|
|
|
debug: true, // 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。
|
|
|
|
|
appId: res.appId,
|
|
|
|
|
jsApiList: res.jsApiList,
|
|
|
|
|
nonceStr: res.nonceStr,
|
|
|
|
|
signature: res.signature,
|
|
|
|
|
timestamp: res.timestamp,
|
|
|
|
|
})
|
|
|
|
|
jwx.ready(() => {
|
|
|
|
|
jwx.updateAppMessageShareData({
|
|
|
|
|
title: '疯狂赏金-192用户现金红包大派送', // 分享标题
|
|
|
|
|
desc: '疯狂赏金-192用户现金红包大派',
|
|
|
|
|
link: url, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
|
|
|
imgUrl: '/static/share-img.jpeg', // 分享图标
|
|
|
|
|
});
|
|
|
|
|
jwx.onMenuShareAppMessage({
|
|
|
|
|
title: '疯狂赏金-192用户现金红包大派', // 分享标题
|
|
|
|
|
desc: '疯狂赏金-192用户现金红包大派',
|
|
|
|
|
link: url, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
|
|
|
imgUrl: '/static/share-img.jpeg', // 分享图标
|
|
|
|
|
});
|
|
|
|
|
jwx.updateTimelineShareData({
|
|
|
|
|
title: '疯狂赏金-192用户现金红包大派', // 分享标题
|
|
|
|
|
desc: '疯狂赏金-192用户现金红包大派',
|
|
|
|
|
link: url, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
|
|
|
imgUrl: '/static/share-img.jpeg', // 分享图标
|
|
|
|
|
});
|
|
|
|
|
jwx.onMenuShareTimeline({
|
|
|
|
|
title: '疯狂赏金-192用户现金红包大派', // 分享标题
|
|
|
|
|
desc: '疯狂赏金-192用户现金红包大派',
|
|
|
|
|
link: url, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
|
|
|
imgUrl: '/static/share-img.jpeg', // 分享图标
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|