|
|
- export default {
- data() {
- return {
-
- }
- },
- methods: {
- // 自定义分享内容
- mixinCustomShare() {
- return {
- }
- }
- },
- computed: {
- // 获取全局配置的文本
- configParamText() {
- return key => this.$store.state.configList[key]?.paramText || '默认文本'
- },
- // 获取全局配置的图片
- configParamImage() {
- return key => this.$store.state.configList[key]?.paramImage || '/static/默认图片.png'
- },
- // 获取全局配置的富文本
- configParamTextarea() {
- return key => this.$store.state.configList[key]?.paramTextarea || '默认富文本'
- },
- // 默认的全局分享参数
- GShare() {
- return {
- title: this.configParamText('config_app_name'),
- desc: this.configParamText('share_desc'),
- imageUrl: this.configParamImage('config_logo'),
- path: '/pages/index/index'
- }
- }
- },
- onShareAppMessage() {
- return {
- ...this.GShare,
- ...this.mixinCustomShare()
- }
- },
- onShareTimeline() {
- return {
- ...this.GShare,
- ...this.mixinCustomShare()
- }
- }
- }
|