【缺陷修复】分享信息覆盖了海报信息导致小程序码获取失败的问题
parent
53899380c3
commit
94f8883bd8
|
|
@ -197,17 +197,17 @@
|
||||||
// 微信小程序分享好友
|
// 微信小程序分享好友
|
||||||
onShareAppMessage(() => {
|
onShareAppMessage(() => {
|
||||||
return {
|
return {
|
||||||
title: shareInfo.value.title,
|
title: shareInfo.value.forward.title,
|
||||||
path: shareInfo.value.path,
|
path: shareInfo.value.forward.path,
|
||||||
imageUrl: shareInfo.value.image,
|
imageUrl: shareInfo.value.forward.image,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
// 微信小程序分享朋友圈
|
// 微信小程序分享朋友圈
|
||||||
onShareTimeline(() => {
|
onShareTimeline(() => {
|
||||||
return {
|
return {
|
||||||
title: shareInfo.value.title,
|
title: shareInfo.value.forward.title,
|
||||||
query: shareInfo.value.path,
|
query: shareInfo.value.forward.path,
|
||||||
imageUrl: shareInfo.value.image,
|
imageUrl: shareInfo.value.forward.image,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,6 @@
|
||||||
showAuthModal();
|
showAuthModal();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(props.shareInfo);
|
|
||||||
unref(SharePosterRef).getPoster();
|
unref(SharePosterRef).getPoster();
|
||||||
state.showPosterModal = true;
|
state.showPosterModal = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ const getShareInfo = (
|
||||||
link: '', // 分享Url+参数
|
link: '', // 分享Url+参数
|
||||||
query: '', // 分享参数
|
query: '', // 分享参数
|
||||||
poster, // 海报所需数据
|
poster, // 海报所需数据
|
||||||
|
forward: {} // 转发所需参数
|
||||||
};
|
};
|
||||||
|
|
||||||
const app = $store('app');
|
const app = $store('app');
|
||||||
|
|
@ -55,10 +56,10 @@ const getShareInfo = (
|
||||||
console.log('请在平台设置中配置默认转发信息');
|
console.log('请在平台设置中配置默认转发信息');
|
||||||
}
|
}
|
||||||
// 设置自定义分享信息
|
// 设置自定义分享信息
|
||||||
shareInfo.title = scene.title || shareConfig.forwardInfo.title;
|
shareInfo.forward.title = scene.title || shareConfig.forwardInfo.title;
|
||||||
shareInfo.image = $url.cdn(scene.image || shareConfig.forwardInfo.image);
|
shareInfo.forward.image = $url.cdn(scene.image || shareConfig.forwardInfo.image);
|
||||||
shareInfo.desc = scene.desc || shareConfig.forwardInfo.subtitle;
|
shareInfo.forward.desc = scene.desc || shareConfig.forwardInfo.subtitle;
|
||||||
shareInfo.path = buildSpmPath(query);
|
shareInfo.forward.path = buildSpmPath(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
return shareInfo;
|
return shareInfo;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue