feat: 实现小程序分享

This commit is contained in:
2025-10-13 20:04:05 +08:00
parent 2abce21c49
commit 621d5d4c57
2 changed files with 17 additions and 0 deletions

15
src/utils/share.js Normal file
View File

@@ -0,0 +1,15 @@
export default {
install(app) {
app.mixin({
onLoad() {
const page = getCurrentPages().pop();
if (page) {
uni.showShareMenu({
withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"],
});
}
},
});
},
};