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.
35 lines
918 B
35 lines
918 B
4 years ago
|
export default{
|
||
|
data(){
|
||
|
return {
|
||
|
//设置默认的分享参数
|
||
|
//如果页面不设置share,就触发这个默认的分享
|
||
|
share:{
|
||
|
title:'嗨森逛',
|
||
|
path:'/pages/tabBar/home/home',
|
||
|
imageUrl:'',
|
||
|
desc:'',
|
||
|
content:''
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
onShareAppMessage(res) {
|
||
|
return {
|
||
|
title:this.share.title,
|
||
|
path:this.share.path,
|
||
|
imageUrl:this.share.imageUrl,
|
||
|
desc:this.share.desc,
|
||
|
content:this.share.content,
|
||
|
success(res){
|
||
|
uni.showToast({
|
||
|
title:'分享成功'
|
||
|
})
|
||
|
},
|
||
|
fail(res){
|
||
|
uni.showToast({
|
||
|
title:'分享失败',
|
||
|
icon:'none'
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|