Commit c252a6d2 authored by leiqingsong's avatar leiqingsong

微信 分享bug处理

parent 985808f1
......@@ -356,13 +356,13 @@ export default {
},
// 分享
handleShare() {
let url = `http://oysales.oywanhao.com:8087/activeDetail?id=${this.active_id}&active_type=${this.active_type}`;
let env = window.navigator.userAgent.toLowerCase();
if (
env.match(/MicroMessenger/i) == "micromessenger" &&
env.match(/wxwork/i) == "wxwork"
) {
console.log("企业微信客户端");
let url = `http://oysales.oywanhao.com:8087/activeDetail?id=${this.active_id}&active_type=${this.active_type}`;
wx.invoke(
"shareToExternalContact",
{
......@@ -381,9 +381,11 @@ export default {
);
} else if (env.match(/micromessenger/i) == "micromessenger") {
console.log("微信客户端");
let wx_url = `http://oysales.oywanhao.com:8087/activeDetail?id=${this.$route.query.id}&active_type=${this.$route.query.active_type}`;
wx.ready(function() {
wx.onMenuShareTimeline({
title: `${this.activityName}`, // 分享标题
title: `${this.$route.query.active_type === 'wheel' ? '抽奖' : '送券'}活动`, // 分享标题
link: url, // 分享链接,将当前登录用户转为puid,以便于发展下线
imgUrl: "", // 分享图标
success: function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment