问答详情
源自:3-3 云函数

VM538:1 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 7f1b94bc-4a21-11ea-b276-52540054168a, cloud function service error code -504002, error message wx is not defined; at cloud.callFunction api; at

VM538:1 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 7f1b94bc-4a21-11ea-b276-52540054168a, cloud function service error code -504002, error message wx is not defined; at cloud.callFunction api; 

    at new u (WAService.js:1)

    at d (WAService.js:1)

    at f (WAService.js:1)

    at Function.success (WAService.js:1)

    at WAService.js:1

    at C (WAService.js:1)

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

    at i.emit (WAService.js:1)

    at Rs (WAService.js:1)

    at WAService.js:1

console.error @ VM538:1

(anonymous) @ cloud.js? [sm]:88

Promise.catch (async)

batchDelete @ cloud.js? [sm]:83

r.safeCallback @ WAService.js:1

(anonymous) @ WAService.js:1

r @ WAService.js:1

(anonymous) @ WAService.js:1

(anonymous) @ WAService.js:1

n @ VM552 asdebug.js:1

(anonymous) @ VM552 asdebug.js:1

(anonymous) @ VM552 asdebug.js:1

_ws.onmessage @ VM552 asdebug.js:1


提问者:慕勒6352758 2020-02-08 11:27

个回答

  • 逃离外包
    2020-04-21 15:52:52

    我的方法是重新上传部署

  • 慕勒6352758
    2020-02-08 11:32:14

    之前没看前面同学发的问题?

  • 慕勒6352758
    2020-02-08 11:31:18

    1、在云函数端对数据库的初始化是不需要写wx的,只需要:const db = cloud.database() 

    2、在小程序端初始化数据库需要写wx,也就是const db = wx.cloud.database()