Blame view

src/api/community/communitySpaceConfirmApi.js 1.04 KB
34fbc487   wuxw   完成预约功能
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  import request from '@/utils/request'
  
  // 查询核销订单列表
  export function listCommunitySpaceConfirmOrder(params) {
    return new Promise((resolve, reject) => {
      request({
        url: '/communitySpace.listCommunitySpaceConfirmOrder',
        method: 'get',
        params
      }).then(response => {
        const res = response.data
        if (res.code === 0) {
          resolve({
            data: res.data,
            total: res.total
          })
        } else {
          reject(new Error(res.msg || '获取核销列表失败'))
        }
      }).catch(error => {
        reject(error)
      })
    })
  }
  
  // 核销场地订单
  export function saveCommunitySpaceConfirmOrder(data) {
    return new Promise((resolve, reject) => {
      request({
        url: '/communitySpace.saveCommunitySpaceConfirmOrder',
        method: 'post',
        data
      }).then(response => {
        const res = response.data
        if (res.code === 0) {
          resolve(res)
        } else {
          reject(new Error(res.msg || '核销操作失败'))
        }
      }).catch(error => {
        reject(error)
      })
    })
  }