日志内容 Request ID: 9ab4e57a-7859-11e9-ba11-5254005d5fdb
执行时间: 261.35ms内存使用: 12.71 MB
返回结果
{"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"errCode: 41028 | errMsg: openapi.templateMessage.send:fail invalid form id hint: [iJbOFA01863950]"}
日志
START RequestId: 9ab4e57a-7859-11e9-ba11-5254005d5fdb
Event RequestId: 9ab4e57a-7859-11e9-ba11-5254005d5fdb
Error: errCode: 41028 | errMsg: openapi.templateMessage.send:fail invalid form id hint: [iJbOFA01863950]
at new CloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6166:28)
at /var/user/node_modules/wx-server-sdk/index.js:2353:43
at step (/var/user/node_modules/tslib/tslib.js:133:27)
at Object.next (/var/user/node_modules/tslib/tslib.js:114:57)
at fulfilled (/var/user/node_modules/tslib/tslib.js:104:62)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
END RequestId: 9ab4e57a-7859-11e9-ba11-5254005d5fdb
Report RequestId: 9ab4e57a-7859-11e9-ba11-5254005d5fdb Duration:261ms Memory:256MB MaxMemoryUsed:12.710938MB
这个错误意思是传入的 formId 是非法的。确认下是否按文档说明获取的 form_id: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/template-message.html。注意是需要在手机端操作的。
<form reportSubmit bindsubmit="inputSend" ></form>
if
(e.detail.formId &&
this
.data.inputValue.length > 0 &&
this
.data.chatToOpenid.length > 0) {
api.sendMsg({
touser:
this
.data.chatToOpenid,
formId: e.detail.formId,
title:
this
.data.chatToName,
time:
new
Date().format(
"yyyy-MM-dd hh:mm:ss"
),
content:
this
.data.inputValue
});
}
这段代码没问题吧
formId 貌似只有一种获取方式吧 还有其他的获取方式吗
是必现么
是必现