Error: errCode: -501001 resource system error | errMsg: openapi.search.submitPages:fail source.on is not a function; at openapi.search.submitPages api;
at returnAsCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6052:16)
at Object.returnAsFinalCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6066:15)
at callWXOpenAPI (/var/user/node_modules/wx-server-sdk/index.js:2268:27)
at <anonymous>
自己搞定了。。还是云环境的问题;接口之前正常,重新同步部署后就异常了,应该是云函数库升级后造成的差异; 之前指定云函数用的 cloud.updateConfig({
env: {
database: wxContext.ENV,
storage: wxContext.ENV,
functions: wxContext.ENV
}
})
const db = cloud.database({
env: wxContext.ENV
});
现在弃用了cloud.updateConfig,正常了