插入数据时候出现Error: errCode: -501005 invalid env | errMsg: Environment not found
const db = wx.cloud.database();
insert: function () {
db.collection('user').add({
data: {
name: 'jest',
age: '20'
},
success: res => {
console.log(res);
console.log("插入数据成功");
},
fail: err => {
console.log(err);
console.log("插入数据失败");
}
})
},
<button bindtap="insert">insert</button>