请教一个问题,微信小程序可以通过代码创建云数据库集合吗?
发布于 5 年前 作者 leichao 1434 次浏览 来自 官方Issues

看了文档,是用云函数,但照做后,报错,具体

index.js? [sm]:37 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID c7ed4ef3-b45e-11eb-8fcd-525400dd5846, cloud function service error code -504002, error message ReferenceError: wx is not defined

    at Object.<anonymous> (:37977/var/user/index.js:5)

    at Module._compile (:37977/appservice/internal/modules/cjs/loader.js:701)

    at Object.Module._extensions…js (:37977/appservice/internal/modules/cjs/loader.js:712)

    at Module.load (:37977/appservice/internal/modules/cjs/loader.js:600)

    at tryModuleLoad (:37977/appservice/internal/modules/cjs/loader.js:539)

    at Function.Module._load (:37977/appservice/internal/modules/cjs/loader.js:531)

    at Module.require (:37977/appservice/internal/modules/cjs/loader.js:637)

    at require (:37977/appservice/internal/modules/cjs/helpers.js:22)

    at Object.module.exports.load (:37977/var/runtime/node10/UserFunction.js:27)

    at Runtime.handleOnce (:37977/var/runtime/node10/Runtime.engine.js:97); at cloud.callFunction api; 

    at new g (VM63 WAService.js:2)

    at c (VM63 WAService.js:2)

    at I (VM63 WAService.js:2)

    at Function.success (VM63 WAService.js:2)

    at C (VM63 WAService.js:2)

    at VM63 WAService.js:2

    at u (VM63 WAService.js:2)

    at Function.<anonymous> (VM63 WAService.js:2)

    at C (VM63 WAService.js:2)

    at VM63 WAService.js:2

回到顶部