当前位置:网站首页>简单几步实现小程序分享朋友圈
简单几步实现小程序分享朋友圈
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
}
},实际效果

边栏推荐
猜你喜欢
随机推荐
顺序表oj之合并两个有序数组
js数据类型检测与修改检测
GD32F407 移植FreeRTOS+Lwip
Advanced multi threading: the underlying principle of synchronized, the process of lock optimization and lock upgrade
Simpledateformat thread unsafe and datetimeformatter thread safe
Openjudge: campus accommodation reservation system
链表实现增删查改
Microsoft Edge浏览器插件(2)
DOM操作的案例
Fusiongan code learning (I)
new,let,var,const以及暂时性死区,xml和json的区别
[idea plug-in artifact] teaches you how to set all attributes in an entity class with one click of idea
结果填空 国庆有几天是星期日(纯Excel解决)
RESNET structure comparison
shell运行原理
异步编程Promise
Openjudge: find all substring positions
DOM——页面的渲染、style属性操作、预加载与懒加载、防抖与节流
The way of deep learning thermodynamic diagram visualization
Mutual conversion between latex and word








