不能连接云函数

发布于 6 年前作者 yxu10806 次浏览最后编辑 6 年前来自 ask
  • 当前 Bug 的表现(可附上截图)

  • 预期表现

  • 复现路径

  • 提供一个最简复现 Demo

Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 87882a65-5ae1-11e9-82c9-525400e8849e, cloud function service error code -504002, error message wx is not defined; at cloud.callFunction api; 

    at new e (WAService.js:1)

    at u (WAService.js:1)

    at Object.t.returnAsFinalCloudSDKError (WAService.js:1)

    at Function.success (WAService.js:1)

    at WAService.js:1

    at T (WAService.js:1)

    at Le.<anonymous> (WAService.js:1)

    at Le.emit (WAService.js:1)

    at Ga (WAService.js:1)

    at WAService.js:1

3 回复
jingwan
jingwan1 楼6 年前

像是把小程序端的API写到了服务端的API里了。

gongyan
gongyan2 楼6 年前

不是在云函数中写的,是我的页面要调用云函数,

zsun
zsun3 楼4 年前

提示很清楚了,wx is not defined,云函数里不能使用wx相关API