当前位置:网站首页>简单几步实现小程序分享朋友圈
简单几步实现小程序分享朋友圈
2022-07-28 05:19:00 【乐檬青年】

// 用户点击右上角分享给好友,要先在设置menus的两个参数,才可以分享朋友圈
onShareAppMessage: function () {
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
},关于wx.showShareMenu的介绍 https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.showShareMenu.html
//用户点击右上角分享朋友圈
onShareTimeline: function () {
return {
title: '分享的标题',
query: {
// key: 'value' //要携带的参数
},
imageUrl: '' //分享图,默认小程序的logo
}
},实际效果

边栏推荐
猜你喜欢
随机推荐
标准C语言学习总结5
Review of metallurgical physical chemistry -- cathodic polarization, overpotential, anode and anode process in metal electrodeposition
Openjudge: find all substring positions
在线词云图生成(以WordArt为例)
Review of metallurgical physical chemistry ---- gas solid reaction kinetics
Delete specific elements in order table OJ
标准C语言总结2
Arrangement of main drawings of the latest 54 papers of eccv22
ArcGIS之Model Builder
A file upload tool website written by individuals
标准C语言总结4
How Visio accurately controls the size, position and angle of graphics
uniapp-监听app是否有网络连接
对象内多个数组的对应下标相加
顺序表的增删查改
基于XMind的E-R图制作
Openjudge: count the number of numeric characters
GIS领域竞赛整理(不完全统计)
ES6--->箭头函数、类、模块化
ArcGIS Engine开发资源









