太难了吧太难了 2020-05-20 20:45 采纳率: 0%
浏览 1356

mpvue连接数据库报错Error: errCode: -502005 database collection not exists | errMsg: [ResourceNotFound] Db or Table not exist.

template里面写的< button @click="search()">sss< /button>
在methods里面写的

search(){
        wx.cloud.init({
            traceUser: true,
            env:'ka-tset-pz57d'
        });
        let db = wx.cloud.database();
        let goods = db.collection('goods');
        goods.doc("9098d0ed5ec50fc40009d3b1437ee586").get({
        success:function(res){
            console.log(res.data);
        },
        fail:function(error){
            console.log(error);__
        }
    });
  }

但是一点击按钮就出现_Error: errCode: -502005 database collection not exists | errMsg: [ResourceNotFound] Db or Table not exist._这样的报错
该怎么解决啊

  • 写回答

1条回答 默认 最新

  • zqbnqsdsmd 2020-05-21 09:05
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 vc6.0中想运行代码的时候总是提示无法打开文件是怎么回事
  • ¥25 关于##爬虫##的问题,如何解决?:
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题