{"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"errCode: -501001 resource system error | errMsg: getOpenData:fail source.on is not a function; at getOpenData api; "}
{ action: 'getOpenData',
openData:
{ list:
[ '25_Rt-GB2xMTxJi5Hb_Z548eoBHqrtfPBCjXBy4UhJk5I7DVXxpSCBcNCzMUhM' ] },
userInfo:
{ appId: 'wx1e6acdbd04edfd2f',
openId: 'okH_90DrM3pIhNB8ennkCbNW4Gqs' } }
Error: errCode: -501001 resource system error | errMsg: getOpenData:fail source.on is not a function; at getOpenData api;
at new CloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6366:28)
at returnAsCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6418:16)
at Object.returnAsFinalCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6432:13)
at Cloud.<anonymous> (/var/user/node_modules/wx-server-sdk/index.js:2218:41)
at step (/var/user/node_modules/tslib/tslib.js:136:27)
at Object.throw (/var/user/node_modules/tslib/tslib.js:117:57)
at rejected (/var/user/node_modules/tslib/tslib.js:108:69)
at <anonymous>
async function sendTMPosition(event) { const { OPENID } = cloud.getWXContext() console.log(event) const sendResult = await cloud.openapi.templateMessage.send({ touser: 'okH_90DrM3pIhNB8ennkCbNW4Gqs' , templateId: 'rCOQ3dMcgmxUX1cwowZUbE2Wmni6Fj5LxxKQ_XXyN5E' , formId: event.formId, data: { keyword1: { value: '产品经理' }, keyword2: { value: '2019 年 1 月 1 日' }, } }) console.log(result) return sendResult } |
可参考:https://developers.weixin.qq.com/community/search?query=501001&page=1&block=1&random=1572257062996