json 前台处理

export function fetchList(query) {
  return new Promise((resolve, reject) => {
    request({
      url: '/XXX/page',
      method: 'get',
      params: query
    }).then(res => {
      let list = res.data.records;
      let lstOject = []

      for(let item of list){
        let reObject = Object.assign({},item,JSON.parse(item.auditInfo))
        lstOject.push(reObject)
      }
      res.data.data.records = lstOject;
      resolve(res);
      //console.log(res.data.data.records)
    })
  })
}
posted @ 2024-06-17 10:42  寒冷的雨呢  阅读(5)  评论(0编辑  收藏  举报