【代码优化】分享优化

This commit is contained in:
puhui999
2025-01-09 15:14:46 +08:00
parent a2ba10f796
commit 5cc6d99891
9 changed files with 74 additions and 36 deletions
+5 -5
View File
@@ -64,7 +64,7 @@
import sheep from '@/sheep';
import { isEmpty } from 'lodash-es';
// #ifdef MP-WEIXIN
import { onShareAppMessage, onShareTimeline, onShow } from '@dcloudio/uni-app';
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
// #endif
const props = defineProps({
@@ -197,17 +197,17 @@
// 微信小程序分享好友
onShareAppMessage(() => {
return {
title: shareInfo.value.forward.title,
title: shareInfo.value.title,
path: shareInfo.value.forward.path,
imageUrl: shareInfo.value.forward.image,
imageUrl: shareInfo.value.image,
};
});
// 微信小程序分享朋友圈
onShareTimeline(() => {
return {
title: shareInfo.value.forward.title,
title: shareInfo.value.title,
query: shareInfo.value.forward.path,
imageUrl: shareInfo.value.forward.image,
imageUrl: shareInfo.value.image,
};
});
// #endif