1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- export default {
- data() {
- return {
- }
- },
- onLoad: function() {
- wx.showShareMenu({
- withShareTicket: true,
- menus: ["shareAppMessage", "shareTimeline"]
- })
- },
- onShareAppMessage(res) {
- console.log(1111)
- let that = this;
- // let imageUrl = that.shareUrl || '';
- // let imageUrl = 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/min1.png'
- if (res.from === 'button') {
- console.log(2222)
- //这块需要传参,不然链接地址进去获取不到数据
- // let path = `/` + that.$scope.route + `?item=` + that.$scope.options.item;
- let path = `/pages/cardHolder/scanCodeAddCard`
- return {
- title: '商品分享~',
- path: path,
- // imageUrl: imageUrl,
- content:'这里是分享内容啊!',
- desc:"这里是自定义描述啊!"
- };
- }
- if (res.from === 'menu') {
- return {
- title: '鲅鱼圈专属旅游平台~',
- path: '/pages/food/food',
- // imageUrl: imageUrl
- };
- }
- },
- // 分享到朋友圈
- onShareTimeline() {
- return {
- title: '名片box',
- path: '/pages/cardHolder/cardHolder',
- imageUrl: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/%E5%90%8D%E7%89%87box.png'
- };
- },
- methods: {
- }
- }
|