customerServiceMessage.send 小程序卡片格式问题?
发布于 4 年前 作者 yuanna 306 次浏览 来自 官方Issues

60c9c201-6bf9e2e6-518f0548

在云函数调用的时候,小程序卡片的消息类型报错,TEXT就不会,公众号的APPID和用户的OPENID都没错,小程序已关联

报错图片:

官方文档:

const cloud = require('wx-server-sdk')
cloud.init({
  env: cloud.DYNAMIC_CURRENT_ENV,
})
exports.main = async (event, context) => {
  try {
    const result = await cloud.openapi.customerServiceMessage.send({
        "touser": 'OPENID',
        "msgtype": 'miniprogrampage',
        "miniprogrampage": {
          "title": 'title',
          "pagepath": 'pagepath',
          "thumbMediaId": 'thumb_media_id'
        }
      })
    return result
  } catch (err) {
    return err
  }
}
回到顶部