当前位置:网站首页>Taro2.* 小程序配置分享微信朋友圈
Taro2.* 小程序配置分享微信朋友圈
2022-07-06 17:29:00 【yunchong_zhao】
if (Taro.getEnv() === Taro.ENV_TYPE.WEAPP) {
Taro.showShareMenu({
withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"],
success(res) {
console.log(res);
},
fail(e) {
console.log(e);
},
});
}
// 微信分享朋友
onShareAppMessage() {
return {
title: this.state.shareMessage.Title,
path: this.state.shareMessage.Path,
imageUrl: this.state.shareMessage.ImgUrl,
};
}
// 分享朋友圈
onShareTimeline() {
return {
title: this.state.shareMessage.Title,
query: this.state.shareMessage.Path,
imageUrl: this.state.shareMessage.ImgUrl,
};
}
注意哈:
如果小程序页面内嵌webview 然后套一个h5地址的话。这样的是不支持分享朋友圈的,不知道以后可不可以
关注我持续更新前端知识
边栏推荐
- The MySQL database in Alibaba cloud was attacked, and finally the data was found
- Learning notes 5: ram and ROM
- golang中的Mutex原理解析
- Come on, don't spread it out. Fashion cloud secretly takes you to collect "cloud" wool, and then secretly builds a personal website to be the king of scrolls, hehe
- Deep learning framework TF installation
- tensorflow 1.14指定gpu运行设置
- Provincial and urban level three coordinate boundary data CSV to JSON
- SuperSocket 1.6 创建一个简易的报文长度在头部的Socket服务器
- 城联优品入股浩柏国际进军国际资本市场,已完成第一步
- gnet: 一个轻量级且高性能的 Go 网络框架 使用笔记
猜你喜欢
Telerik UI 2022 R2 SP1 Retail-Not Crack
Batch obtain the latitude coordinates of all administrative regions in China (to the county level)
BFS realizes breadth first traversal of adjacency matrix (with examples)
[Niuke] [noip2015] jumping stone
让我们,从头到尾,通透网络I/O模型
第六篇,STM32脉冲宽度调制(PWM)编程
HMM 笔记
ActiveReportsJS 3.1中文版|||ActiveReportsJS 3.1英文版
系统休眠文件可以删除吗 系统休眠文件怎么删除
[batch dos-cmd command - summary and summary] - string search, search, and filter commands (find, findstr), and the difference and discrimination between find and findstr
随机推荐
Trace tool for MySQL further implementation plan
Windows installation mysql8 (5 minutes)
windows安装mysql8(5分钟)
MySQL中回表的代价
Mongodb client operation (mongorepository)
Address information parsing in one line of code
UI控件Telerik UI for WinForms新主题——VS2022启发式主题
[user defined type] structure, union, enumeration
筑梦数字时代,城链科技战略峰会西安站顺利落幕
身体质量指数程序,入门写死的小程序项目
迈动互联中标北京人寿保险,助推客户提升品牌价值
pytorch之数据类型tensor
ActiveReportsJS 3.1中文版|||ActiveReportsJS 3.1英文版
Maidong Internet won the bid of Beijing life insurance to boost customers' brand value
Zabbix 5.0:通过LLD方式自动化监控阿里云RDS
ARM裸板调试之JTAG原理
通过串口实现printf函数,中断实现串口数据接收
golang中的Mutex原理解析
View remote test data and records anytime, anywhere -- ipehub2 and ipemotion app
Part VI, STM32 pulse width modulation (PWM) programming