商城类、订单类uniapp模板,多角色
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
910 B

import { mapState } from 'vuex'
export default {
data() {
return {
// 默认的全局分享内容
Gshare: {
// title: '三只青蛙',
path: '/pages/index/index', // 全局分享的路径,比如 首页
// imageUrl: '/static/image/login/logo.png', // 全局分享的图片(可本地可网络)
}
}
},
computed: {
...mapState(['configList', 'userInfo']),
},
// 定义全局分享
// 1.发送给朋友
onShareAppMessage(res) {
let o = {
...this.Gshare,
title : this.configList.logo_name,
}
if(this.userInfo.id){
o.path = this.Gshare.path + '?shareId=' + this.userInfo.id
}
return o
},
//2.分享到朋友圈
onShareTimeline(res) {
let o = {
...this.Gshare,
title : this.configList.logo_name,
}
if(this.userInfo.id){
o.path = this.Gshare.path + '?shareId=' + this.userInfo.id
}
return o
},
methods: {
}
}