Authored by 邱骏

调整分享页面

... ... @@ -12,7 +12,7 @@
a.async = 1;
a.src = j;
m.parentNode.insertBefore(a, m); // '//cdn.yoho.cn/yas-jssdk/2.4.20/yas.js'
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//ad.yoho.cn/html5/sdk/yas-sdk/015/2.4.21/yas.js', '_yas'));
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.4.21/yas.js', '_yas'));
var _hmt = _hmt || [];
... ...
/* global wx */
const $ = require('yoho-jquery');
const lazyLoad = require('js/plugin/lazyload');
const Swiper = require('yoho-swiper');
... ... @@ -147,7 +148,6 @@ function getCoupon() { // 分享成功后领券
}
function checkShare(shareData) {
console.log(shareData);
if (isApp) {
let newShare = false;
let app_vercode = cookie.get('app_vercode');
... ... @@ -219,7 +219,31 @@ function initWxShare(data) {
}
};
yo_sdk.wxShare(shareData);
if (wx) {
setTimeout(function() {
window.wx.ready(function() {
wx.onMenuShareAppMessage(shareData);
wx.onMenuShareTimeline(shareData);
wx.onMenuShareQQ(shareData);
wx.onMenuShareWeibo(shareData);
});
}, 500);
if (isWechatMiniProgram) {
wx.miniProgram.postMessage({
data: {
title: data.title,
imgUrl: data.imgUrl,
link: data.link
}
});
}
}
// yo_sdk.wxShare(shareData);
}
function initWebShareButtons(env = '') { // 初始化分享按钮事件
... ... @@ -268,7 +292,8 @@ function initWebShareButtons(env = '') { // 初始化分享按钮事件
Object.assign(webShareData, {
hideType: ['4', '5', '6', '7', '8', '9'],
isCareCallBack: '1',
wxShareMode: parseInt(webShareButton.data('slanding'), 10) ? 'miniprogram' : 'h5'
wxShareMode: parseInt(webShareButton.data('slanding'), 10) ? 'miniprogram' : 'h5',
miniProgramUrl: 'pages/webview/webview?url=' + webShareData.link // 安卓分享小程序会用到
});
}
... ...