glhcp/business/mixins/app.js

23 lines
507 B
JavaScript
Raw Normal View History

2023-08-10 06:59:52 +00:00
import {
mapGetters,
mapState
} from 'vuex'
export default {
data() {},
computed: {
...mapGetters(['isLogin', 'shopInfo', 'appConfig']),
},
// 全局配置分享
onShareAppMessage() {
const { share_image, share_intro, share_title } = this.appConfig
const { code } = this.shopInfo
const share = {
title: share_title,
path: `/pages/index/index?invite_code=${code}`,
imageUrl: share_image
}
this.$Route.meta.auth && (share.path = this.$Route.fullPath)
return share
}
};