当前位置:网站首页>[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
}
],
边栏推荐
猜你喜欢

I.MX6U-系统移植-6-uboot图形化配置

理性认知教育机器人寓教于乐的辅助作用

性能和成本的综合架构:单元化架构
![[C language foundation] 13 preprocessor](/img/4c/ab25d88e9a0cf29bde6e33a2b14225.jpg)
[C language foundation] 13 preprocessor

Li Kou daily question - day 42 -661. Picture smoother

UE4 two ways to obtain player control

Threadpooltaskexecutor and ThreadPoolExecutor
![[300 + selected interview questions from big companies continued to share] big data operation and maintenance sharp knife interview question column (VIII)](/img/a0/b2b0f5fb63301f5b7dd14302aa39e2.png)
[300 + selected interview questions from big companies continued to share] big data operation and maintenance sharp knife interview question column (VIII)

Codeforces Round #807 (Div. 2)

TIA botu WinCC Pro controls the display and hiding of layers through scripts
随机推荐
How is the launch of ros2 different?
qt编译报错整理及Remote模块下载
UE4 displays text when it is close to the object, and disappears when it is far away
嵌入式实操----基于RT1170 FreeRTOS实现CPU使用率统计(二十四)
2022 Henan Mengxin League game (3): Henan University L - synthetic game
Weights & Biases (二)
QT compilation error sorting and remote module Download
Comparison of the relationship between the number of partitions and the number of reducetask in MapReduce
[learning notes] agc041
Codeforces Round #807 (Div. 2)
Use of anonymous functions
Integrated architecture of performance and cost: modular architecture
11、 Exception handler
UE4 多个角色控制权的切换
2、 Internationally renowned project HelloWorld
人脸数据库收集总结
Several methods of realizing high-low byte or high-low word exchange in TIA botu s7-1200
机器学习之信用卡欺诈检测
再获认可 | 赛宁网安连续上榜《CCSIP 2022中国网络安全产业全景图》
ASP. Net core actionfilter filter details