You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
clothesProject/cloudfunctions/quickstartFunctions/selectRecord/index.js

13 lines
291 B

const cloud = require('wx-server-sdk');
cloud.init({
env: cloud.DYNAMIC_CURRENT_ENV
});
const db = cloud.database();
// 查询数据库集合云函数入口函数
exports.main = async (event, context) => {
// 返回数据库查询结果
return await db.collection('sales').get();
};