当前位置:网站首页>Taro2.* 小程序配置分享微信朋友圈
Taro2.* 小程序配置分享微信朋友圈
2022-06-29 15:24: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地址的话。这样的是不支持分享朋友圈的,不知道以后可不可以
关注我持续更新前端知识
边栏推荐
- BFD principle and configuration
- Northwestern Polytechnic University attacked by overseas e-mail
- swift JSONSerialization
- . Net program configuration file operation (INI, CFG, config)
- GWD:基于高斯Wasserstein距离的旋转目标检测 | ICML 2021
- 西北工业大学遭境外电邮攻击
- 复数卷积神经网络:CV-CNN
- GWD: rotating target detection based on Gaussian Wasserstein distance | ICML 2021
- 欧标插头EN50075测试项目
- 中序和后序遍历构建二叉树[递归划分区间与回溯拼接子树+中后序和中前序的相似与不同]
猜你喜欢

MCS: discrete random variable - binomial distribution

Lumiprobe 活性染料丨杂染料:BDP FL 神经酰胺

Lumiprobe reactive dye miscellaneous dye: BDP FL ceramide

CKS CKA ckad change terminal to remote desktop

关于SQL+NoSQL : NewSQL数据库

Chapter IX app project test (4) test tools

File常用工具類, 流相關運用 (記錄)

Real software testers = "half product + Half development"?

Unity C # basic review 26 - first acquaintance Commission (p447)

Create an API rapid development platform, awesome!
随机推荐
Symfony framework security component firewall configuration
Take another picture of cloud redis' improvement path
Alibaba cloud experience Award: use polardb-x and Flink to build a large real-time data screen
Knowledge points: what are the know-how of PCB wiring?
Flink SQL task taskmanager memory settings
c#Sqlite类库
雷达相关内容简介
What is the time complexity of the redis command?? (the actual question is about the underlying structure of redis)
Differential equations of satellite motion
LeetCode-1188. 设计有限阻塞队列
LeetCode笔记:Biweekly Contest 81
Uncover the practice of Baidu intelligent test in the field of automatic test execution
阿里云体验有奖:使用PolarDB-X与Flink搭建实时数据大屏
雷达天线简介
"Game engine shallow in shallow out" 98 Substancepainer plug-in development
LeetCode笔记:Weekly Contest 299
message from server: “Host ‘xxxxxx‘ is blocked because of many connection errors; unblock with ‘m
从雷达回波中可获取的信息
stlink故障修复
数字图像处理复习