当前位置:网站首页>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地址的话。这样的是不支持分享朋友圈的,不知道以后可不可以
关注我持续更新前端知识
边栏推荐
- 11. application layer data transmission format / port number -bite
- Excel中构建SQL语句
- Lumiprobe reactive dye - amino dye: cyanine 5 amine
- Alibaba cloud experience Award: use polardb-x and Flink to build a large real-time data screen
- NFT链游开发应用:2022年值得关注的6大NFT趋势
- Complex convolutional neural network: cv-cnn
- Paging SQL (rownum, row_number, deny_rank, rank)
- Northwestern Polytechnic University attacked by overseas e-mail
- 【力扣10天SQL入门】Day7+8 计算函数
- Rust基础知识
猜你喜欢

89.(cesium篇)cesium聚合图(自定义图片)

Solution to the problem that the assembly drawing cannot be recognized after the storage position of SolidWorks part drawing is changed

Unity C basic review 27 - delegation example (p448)

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

分页sql(rownum、row_number、dense_rank、rank)

Lumiprobe reactive dye - amino dye: cyanine 5 amine

I am 35 years old. Can I change my career to be a programmer?

Review of digital image processing

Create an API rapid development platform, awesome!

明德扬XILINX-K7-325T/410T核心板数据手册
随机推荐
Rust Basics
西北工业大学遭境外电邮攻击
Is there any lack of dependence? An error is reported when flinksql is packaged and running, but there is no problem when the local idea runs. Solve it. Thanks
Material dynamic self illumination
MCS: multivariate random variable - discrete random variable
Leetcode notes: Weekly contest 299
el-table-column行按钮防重控制loading
JS will have variable promotion and function promotion
Rust基础知识
遥感典型任务分析
服务器的数据库连不上了【服务已起、防火墙已关、端口已开、netlent 端口不通】
Is it safe to open a stock account at present? Can I open an account online directly
ImgUtil 图片处理工具类,文字提取,图片水印
Biovendor free light chain( κ and λ) Chemical properties of ELISA Kit
雷达基本组成
复数卷积神经网络:CV-CNN
【力扣10天SQL入门】Day7+8 计算函数
cmake学习-2
Summary of recent work
PostgreSQL source code learning (23) -- transaction log ④ - log assembly