问题模块 | 框架类型 | 问题类型 | 终端类型 | AppID | 基础库版本 |
---|---|---|---|---|---|
云开发 | 小程序 | Bug | 客户端 | wx124243178e54c57e | 2.7.7 |
- 当前 Bug 的表现(可附上截图)
err Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID , cloud function service error code -504002, error message Function not found: [getWXContext]; at cloud.callFunction api;
- 预期表现
- 复现路径
isMatchAdmin (cb) { Cloud.getUserInfo() .then((resInfo) => { const OPENID = this .OPENID = resInfo.result.OPENID console.log(OPENID) cb && cb() Cloud.getAdminList({ db: this .db }) .then((res) => { if (res.data) { let isAdmin = false res.data.forEach((item) => { if (item.openId === OPENID) { isAdmin = true } }) this .setData({ isAdmin: isAdmin }) } else { throw new Error() } }) }) . catch (err => { console.log( 'err' , err) // this.goError() }) }, |
- 提供一个最简复现 Demo
err Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID , cloud function service error code -504002, error message Function not found: [getWXContext]; at cloud.callFunction api;