diff --git a/src/main.js b/src/main.js index 0fab316..d3d7204 100644 --- a/src/main.js +++ b/src/main.js @@ -5,10 +5,13 @@ import "./style/my.scss"; //#region VUE3 import { createSSRApp } from 'vue' import { store } from '../src/store/index' +import share from "../src/utils/share" + export function createApp() { const app = createSSRApp(App) app.use(uviewPlus) app.use(store) + app.mixin(share) return { app } diff --git a/src/pages/uploadPhoto/uploadPhoto.vue b/src/pages/uploadPhoto/uploadPhoto.vue index 4a9a9c9..339d6ba 100644 --- a/src/pages/uploadPhoto/uploadPhoto.vue +++ b/src/pages/uploadPhoto/uploadPhoto.vue @@ -424,25 +424,6 @@ onShow(() => { }); //#endregion --------------------- -onShareAppMessage((res) => { - return { - title: "邃芒智像", - }; -}); - -// 分享到朋友圈 -onShareTimeline((res) => { - return { - title: "邃芒智像", - }; -}); - -// 收藏 -onAddToFavorites((res) => { - return { - title: "邃芒智像", - }; -}); //#region 公共方法 function goOtherPage(url) { diff --git a/src/utils/share.js b/src/utils/share.js new file mode 100644 index 0000000..6fc0f46 --- /dev/null +++ b/src/utils/share.js @@ -0,0 +1,21 @@ +export default { + onShareAppMessage() { + return { + title: "邃芒智像", + }; + }, + + // 分享到朋友圈 + onShareTimeline() { + return { + title: "邃芒智像", + }; + }, + + // 收藏 + onAddToFavorites() { + return { + title: "邃芒智像", + }; + } +}