分享功能
This commit is contained in:
@@ -89,29 +89,22 @@
|
|||||||
methods: {
|
methods: {
|
||||||
//分享到微信好友
|
//分享到微信好友
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
// 此处的distSource为分享者的部分信息,需要传递给其他人
|
return {
|
||||||
let distSource = uni.getStorageSync('distSource');
|
title: '食瞳',
|
||||||
if (distSource) {
|
type: 0,
|
||||||
return {
|
path: '/pages/index/index?id=' + distSource,
|
||||||
title: '食瞳',
|
summary: "",
|
||||||
type: 0,
|
imageUrl: "https://pupil.hchyun.com/uploads/product/zhanwei02.png"
|
||||||
path: '/pages/index/index?id=' + distSource,
|
|
||||||
summary: "",
|
|
||||||
imageUrl: "https://pupil.hchyun.com/uploads/product/zhanwei02.png"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//分享到朋友圈
|
//分享到朋友圈
|
||||||
onShareTimeline(res) {
|
onShareTimeline(res) {
|
||||||
let distSource = uni.getStorageSync('distSource');
|
return {
|
||||||
if (distSource) {
|
title: '食瞳',
|
||||||
return {
|
type: 0,
|
||||||
title: '食瞳',
|
query: 'id=' + distSource,
|
||||||
type: 0,
|
summary: "",
|
||||||
query: 'id=' + distSource,
|
imageUrl: "https://pupil.hchyun.com/uploads/product/zhanwei02.png"
|
||||||
summary: "",
|
|
||||||
imageUrl: "https://pupil.hchyun.com/uploads/product/zhanwei02.png"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user