Commit 3b91e3a1 authored by 王炽's avatar 王炽

分享修改

parent c2f31d76
...@@ -144,14 +144,14 @@ const shareOptions = { ...@@ -144,14 +144,14 @@ const shareOptions = {
imageUrl: $baseUrl + 'share/share_home0901.jpg', imageUrl: $baseUrl + 'share/share_home0901.jpg',
}, },
1: { 1: {
title: '飞鹤提供家庭营养一站式解决方案', title: '星妈会 | 解锁你的会员服务',
path: '/pages/index/index?pageType=brand', path: '/pages/index/index?pageType=brand',
imageUrl: $baseUrl + 'share/share_brand.png', imageUrl: $baseUrl + 'common/shareImg.png',
}, },
2: { 2: {
title: '超凡吸收!更多妈妈推荐的奶粉', title: '星妈会 | 解锁你的会员服务',
path: '/pages/index/index?pageType=integral', path: '/pages/index/index?pageType=integral',
imageUrl: $baseUrl + 'share/share_integral.png', imageUrl: $baseUrl + 'common/shareImg.png',
}, },
}; };
...@@ -352,8 +352,18 @@ onLoad((options) => { ...@@ -352,8 +352,18 @@ onLoad((options) => {
} }
}); });
onShareAppMessage(() => { onShareAppMessage((e) => {
const pageType = globalStore.curTabIndex; const pageType = globalStore.curTabIndex;
console.log('onShareAppMessage pageType:', pageType);
const integralStore = useIntegralStore();
if (e.from === 'button') {
return {
title: integralStore.originInviteHome?.data?.invitationText,
path: '/pages/invate/sharepage' + '?inviteCode=' + integralStore.originInviteHome?.data?.invitationCode,
imageUrl:
integralStore.originInviteHome?.data?.invitationImageUrl
};
}
return shareOptions[pageType] || shareOptions[0]; return shareOptions[pageType] || shareOptions[0];
}); });
......
...@@ -3232,16 +3232,27 @@ const handleRecordClick = () => { ...@@ -3232,16 +3232,27 @@ const handleRecordClick = () => {
// }); // });
// }, { immediate: true }); // }, { immediate: true });
// 分享配置 // // 分享配置
onShareAppMessage(() => { // onShareAppMessage((e) => {
return { // console.log('onShareAppMessage e1111:', e);
title: integralStore.originInviteHome?.data?.invitationText,
path: '/pages/invate/sharepage' + '?inviteCode=' + integralStore.originInviteHome?.data?.invitationCode, // if (e.from === 'button') {
imageUrl: // return {
integralStore.originInviteHome?.data?.invitationImageUrl || // title: integralStore.originInviteHome?.data?.invitationText,
'https://course.feihe.com/momclub-picture/integral/1023/invate_star_character1023.png', // path: '/pages/invate/sharepage' + '?inviteCode=' + integralStore.originInviteHome?.data?.invitationCode,
}; // imageUrl:
}); // integralStore.originInviteHome?.data?.invitationImageUrl ||
// 'https://course.feihe.com/momclub-picture/integral/1023/invate_star_character1023.png',
// };
// }
// return {
// title: '星妈会 | 解锁你的会员服务',
// path: '/pages/index/index?pageType=integral',
// imageUrl:'https://course.feihe.com/momclub-picture/common/shareImg.png',
// };
// });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
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