收藏
回答

云开发 获取数据模型 为空 ,使用数据库 报错:secret id error ?

const models = cloudbase.init({

            // env: 'xxx',

        });


        // const { data } = await models.users.get({

        //     filter: {

        //     },

        //     // envType: pre 体验环境, prod 正式环境

        //     envType: "pre",

        //   });

        // models.models  内为空


        // 返回查询到的数据

        //   console.log('data', data);

        console.log('models', models);

        const db = models.database()

        console.log('db', db);


        // 这里报错

// Error: secret id error 请前往云开发AI小助手查看问题:https://tcb.cloud.tencent.com/dev#/helper/copilot?q=SIGN_PARAM_INVALID

        db.collection('users').get().then(res => {

            console.log('res', res);

        })



回答关注问题邀请回答
收藏

1 个回答

  • 揪一口布丁🍮
    揪一口布丁🍮
    03-28

    第二行 你需要填写 你自己环境ID

    03-28
    有用
    回复
登录 后发表内容