data.js 369 B

1234567891011121314
  1. let Parse = getApp().Parse
  2. export default {
  3. async getRoomById(roomId) {
  4. let Room = new Parse.Query('ShopRoom')
  5. Room.include("shop")
  6. let room = await Room.get(roomId)
  7. room = room.toJSON()
  8. room.rate = room.shop.score
  9. room.workingTime = room.shop.workingTime
  10. console.log(room)
  11. return room
  12. }
  13. }