123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import config from '../config.js';
- export default {
- data() {
- return {
- share: {
- title: config.point_title,
- path: `/pages/index/index`,
- imageUrl: config.shareUrl,
- }
- }
- },
- onShareAppMessage(res) { //发送给朋友
- return {
- title: this.share.title,
- path: this.share.path,
- imageUrl: this.share.imageUrl,
- success(res) {
- uni.showToast({
- title: '分享成功'
- })
- },
- fail(res) {
- uni.showToast({
- title: '分享失败',
- icon: 'none'
- })
- }
- }
- },
- onShareTimeline(res) { //分享到朋友圈
- return {
- title: this.share.title,
- path: this.share.path,
- imageUrl: this.share.imageUrl,
- success(res) {
- uni.showToast({
- title: '分享成功'
- })
- },
- fail(res) {
- uni.showToast({
- title: '分享失败',
- icon: 'none'
- })
- }
- }
- },
- }
|