慕勒6352758
2020-02-08 11:27
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
我的方法是重新上传部署
之前没看前面同学发的问题?
1、在云函数端对数据库的初始化是不需要写wx的,只需要:const db = cloud.database()
2、在小程序端初始化数据库需要写wx,也就是const db = wx.cloud.database()
轻松入门微信小程序与云开发
64581 学习 · 1742 问题
相似问题