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

UE4 通过按键控制物体的旋转

Spark Structured Streaming HelloWorld

2、 Internationally renowned project HelloWorld
Yuansaka Lin wallpaper

UE4 靠近物体时显示文字,远离时文字消失
![[C language foundation] 13 preprocessor](/img/4c/ab25d88e9a0cf29bde6e33a2b14225.jpg)
[C language foundation] 13 preprocessor

P-norm (2-norm is Euclidean norm)

Low cost, fast and efficient construction of digital collection app and H5 system, professional development of scallop technology is more assured!

这种是我的vs没连上数据库吗

Credit card fraud detection based on machine learning
随机推荐
Calculate the curvature of discrete points (matlab)
Wu Enda's machine learning after class exercises - linear regression
[300 + selected interview questions from big companies continued to share] big data operation and maintenance sharp knife interview question column (VIII)
MySQL - multi table query - Cartesian product sum, correct multi table query, equivalent connection and unequal connection, inner connection and outer connection
AWS Support Plan
ES6模块化+CommonJS
2022河南萌新联赛第(三)场:河南大学 J - 神奇数字
旋转数组最小数字
2022 Henan Mengxin League game (3): Henan University J - magic number
Js手写函数之节流防抖函数
Throttling anti shake function of JS handwritten function
egg-ts-sequelize-CLI
解析Steam教育的课程设计测评体系
qt编译报错整理及Remote模块下载
Spark Structured Streaming HelloWorld
2022 Henan Mengxin League game (3): Henan University B - reverse pair count
Compiled by egg serialize TS
机器学习之信用卡欺诈检测
Autocomplete prevents the form from automatically filling in
Acwing_ 12. Find a specific solution for the knapsack problem_ dp