当前位置:网站首页>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地址的话。这样的是不支持分享朋友圈的,不知道以后可不可以
关注我持续更新前端知识
边栏推荐
- 【js】获取当前时间的前后n天或前后n个月(时分秒年月日都可)
- Tencent cloud webshell experience
- [牛客] [NOIP2015]跳石头
- boot - prometheus-push gateway 使用
- OSPF configuration command of Huawei equipment
- New feature of Oracle 19C: automatic DML redirection of ADG, enhanced read-write separation -- ADG_ REDIRECT_ DML
- tensorflow 1.14指定gpu运行设置
- windows安装mysql8(5分钟)
- Periodic flash screen failure of Dell notebook
- golang中的atomic,以及CAS操作
猜你喜欢
动态规划思想《从入门到放弃》
Telerik UI 2022 R2 SP1 Retail-Not Crack
《安富莱嵌入式周报》第272期:2022.06.27--2022.07.03
boot - prometheus-push gateway 使用
Maidong Internet won the bid of Beijing life insurance to boost customers' brand value
筑梦数字时代,城链科技战略峰会西安站顺利落幕
[hfctf2020]babyupload session parsing engine
省市区三级坐标边界数据csv转JSON
Trace tool for MySQL further implementation plan
【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
随机推荐
boot - prometheus-push gateway 使用
Cause of handler memory leak
【JVM调优实战100例】04——方法区调优实战(上)
Lldp compatible CDP function configuration
「笔记」折半搜索(Meet in the Middle)
STM32开发资料链接分享
负载均衡性能参数如何测评?
Let's talk about 15 data source websites I often use
pyflink的安装和测试
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
详解OpenCV的矩阵规范化函数normalize()【范围化矩阵的范数或值范围(归一化处理)】,并附NORM_MINMAX情况下的示例代码
Atomic in golang, and cas Operations
HMM 笔记
Provincial and urban level three coordinate boundary data CSV to JSON
系统休眠文件可以删除吗 系统休眠文件怎么删除
golang中的atomic,以及CAS操作
[hfctf2020]babyupload session parsing engine
The printf function is realized through the serial port, and the serial port data reception is realized by interrupt
动态规划思想《从入门到放弃》
资产安全问题或制约加密行业发展 风控+合规成为平台破局关键