forked from nsjcy/frontEnd/nsjcy

liuwh
2020-03-10 c935312f14761bb107d220693eaeb5e183021028
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import fetch from './_fetch';
import { message } from 'antd';
export default data =>
  fetch(
    `api/question/audit` +
      '?' +
      Object.entries(data)
        .map(([k, v]) => `${k}=${v}`)
        .join('&')
  )
    .then(json => {
      if (json.code == 0) {
        return true;
      } else {
        message.error(json.msg, 2);
        return false;
      }
    })
    .catch(error => message.error('详情加载失败,请联系管理员', 2));