当前位置:网站首页>[enterprise micro procedure]
[enterprise micro procedure]
2022-07-26 04:34:00 【Guodong pudding】
1. Share messages to the current session
wx.invoke('sendChatMessage', {
msgtype:"text", // Message type , Required
enterChat: true, // by true When, it means to enter the session after sending , Mobile end only 3.1.10 And above versions support this field
text: {
content:" Hello ", // Text content
},
image:
{
mediaid: "", // The material of the picture id
},
video:
{
mediaid: "", // Video material id
},
file:
{
mediaid: "", // The material of the document id
},
news:
{
link: "", //H5 Message page url Required
title: "", //H5 Message title
desc: "", //H5 A summary of the news
imgUrl: "", //H5 Message cover image URL
},
miniprogram:
{
appid: "wx8bd80126147df384",// Applet appid, Any applet that the enterprise has associated
title: "this is title", // Applet messages title
imgUrl:"https://search-operate.cdn.bcebos.com/d054b8892a7ab572cb296d62ec7f97b6.png",// Cover image of applet message . Must bring http perhaps https Protocol header , Otherwise, the report will be wrong $apiName$:fail invalid imgUrl
page:"/index/page.html", // The path after the applet message is opened , Pay attention to .html As a suffix , Otherwise, opening it on wechat will prompt that the page cannot be found
},
}, function(res) {
if (res.err_msg == 'sendChatMessage:ok') {
// Send successfully
}
})
2. Example
miniprogramList: [
{
appid:"wx8bd80126147df384",
title: " Personal applet ",
imgUrl: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi3%2F206824074%2FO1CN01XTzvn61fxw8q88nXw_%21%21206824074.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1660704764&t=03948fd5c9727cfc1c291f71b5390ec6",
page: "pages/getUserInfo/getUserInfo.html", // The path after the applet message is opened , Pay attention to .html As a suffix , Otherwise, opening it on wechat will prompt that the page cannot be found
}
],
边栏推荐
- 自动化测试框架该如何搭建?
- 2022河南萌新联赛第(三)场:河南大学 B - 逆序对计数
- Life related - ten years of career experience (turn)
- 数据库连接数查看和修改
- Dijango learning
- 旋转数组最小数字
- Creative design principle of youth maker Education
- How does win11 set the theme color of the status bar? Win11 method of setting theme color of status bar
- 嵌入式实操----基于RT1170 FreeRTOS实现CPU使用率统计(二十四)
- [learning notes] agc041
猜你喜欢

Integrated architecture of performance and cost: modular architecture

七、RESTful

7、 Restful

FFmpeg 视频添加水印

Analyzing the curriculum design evaluation system of steam Education

UE4 controls the rotation of objects by pressing keys

Postman imports curl, exports curl, and exports corresponding language codes

Matlab drawing

Unable to find sygwin.s file during vscode debugging

Support proxy direct connection to Oracle database, jumpserver fortress v2.24.0 release
随机推荐
[C language foundation] 13 preprocessor
使用百度飞桨EasyDL完成垃圾分类
egg-ts-sequelize-CLI
P-norm (2-norm is Euclidean norm)
autocomplete禁止表单自动填充
五、域对象共享数据
UE4 keyboard control switch light
九、文件上传和下载
MySQL 执行失败的sql是否会计入慢查询?
Codeforces Round #807 (Div. 2)
UE4 获取玩家控制权的两种方式
ASP. Net core actionfilter filter details
UE4 two ways to obtain player control
3、 @requestmapping annotation
Cnosdb Nirvana Rebirth: abandon go and fully embrace rust
egg-ts-sequelize-CLI
【语义分割】2018-DeeplabV3+ ECCV
三、@RequestMapping注解
Dijikstra (preprocessing first) +dfs, relocation truncated to fit
Spark Structured Streaming HelloWorld