js异步请求接口\模拟异步封装

export const getCameraList = params => request.post('/api/fms/video/list', params)

 const getDeviceList = () => {
   return new Promise((resolve, reject) => {
     getCameraList().then(res => {
       resolve({
         data: {
           firstPage: true,
           lastPage: false,
           pageNumber: 1,
           pageSize: 1,
           pages: 1,
           totalCount: 1,
           records: res.data
         }
       })
     })
   })
 }

你可能感兴趣的:(javascript,前端,java)