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

边栏推荐
- Writing methods of scientific research papers: add analysis and discussion in the method part to explain their contributions and differences
- Openjudge: campus accommodation reservation system
- Implementation of date class and its basic functions
- 标准C语言学习总结8
- ArcMap地图投影相关操作
- The Monte Carlo method solves the PI and draws points with turtle, and completes the progress bar problem
- 冶金物理化学复习 --- 化学反应动力学基础
- JS数组的方法大全
- uni-app-双击事件模拟
- Thesis writing function words
猜你喜欢

DOM操作的案例

Merge two ordered arrays of order table OJ

Review of Metallurgical Physical Chemistry - gas liquid phase reaction kinetics

顺序表oj之合并两个有序数组

顺序表oj题目

冶金物理化学复习 ---- 气固反应动力学

基于Highcharts平台的桑基图(Sankey diagram)绘制

CAD-GIS数据转换

基于Easy CHM和VS的帮助文档制作

Idea configures the service (run dashboard) service, and multiple modules are started at the same time
随机推荐
顺序表oj题目
Microsoft Edge浏览器插件(1)
ES6----解构赋值
Writing methods of scientific research papers: add analysis and discussion in the method part to explain their contributions and differences
Thesis writing function words
openjudge:石头剪刀布
CAD-GIS数据转换
The difference between get and post
Merge two ordered arrays of order table OJ
树莓派串口
Event_looop-事件循环机制
Interface idempotency problem
GIS领域竞赛整理(不完全统计)
Arrangement of main drawings of the latest 54 papers of eccv22
c语言:通过一个例子来认识函数栈帧的创建和销毁讲解
Image enhancement - msrcr
标准C语言学习总结5
ArcMap中的距离工具条(Distance)
DOM——页面的渲染、style属性操作、预加载与懒加载、防抖与节流
Canvas绘图1