index.js 479 B

1234567891011121314151617181920212223
  1. const {
  2. db,
  3. _
  4. } = require("../../utils/http");
  5. async function LiveService(data) {
  6. const orilist = await db.collection('live').where({
  7. _id: _.eq(data.id),
  8. activity_name: _.eq(data.activityName)
  9. }).get();
  10. return orilist.data[0] || {}
  11. }
  12. async function LiveServiceList(data) {
  13. const orilist = await db.collection('live').where({
  14. activity_name: _.eq(data.activityName)
  15. }).get();
  16. return orilist.data
  17. }
  18. module.exports = {
  19. LiveService,
  20. LiveServiceList
  21. }