import Mock from 'mockjs';
import setupMock, { successResponseWrap } from '@/mocks/setup';

setupMock({
  setup() {
    Mock.mock(/\/api\/user\/save-info/, () => {
      return successResponseWrap('ok');
    });
    Mock.mock(/\/api\/user\/certification/, () => {
      return successResponseWrap({
        enterpriseInfo: {
          accountType: '\u4f01\u4e1a\u8d26\u53f7',
          status: 0,
          time: '2018-10-22 14:53:12',
          legalPerson: '\u674e**',
          certificateType: '\u4e2d\u56fd\u8eab\u4efd\u8bc1',
          authenticationNumber: '130************123',
          enterpriseName: '\u4f4e\u8c03\u6709\u5b9e\u529b\u7684\u4f01\u4e1a',
          enterpriseCertificateType: '\u4f01\u4e1a\u8425\u4e1a\u6267\u7167',
          organizationCode: '7*******9',
        },
        record: [
          {
            certificationType: 1,
            certificationContent:
              '\u4f01\u4e1a\u5b9e\u540d\u8ba4\u8bc1\uff0c\u6cd5\u4eba\u59d3\u540d\uff1a\u674e**',
            status: 0,
            time: '2021-02-28 10:30:50',
          },
          {
            certificationType: 1,
            certificationContent:
              '\u4f01\u4e1a\u5b9e\u540d\u8ba4\u8bc1\uff0c\u6cd5\u4eba\u59d3\u540d\uff1a\u674e**',
            status: 1,
            time: '2020-05-13 08:00:00',
          },
        ],
      });
    });
    Mock.mock(/\/api\/user\/upload/, () => {
      return successResponseWrap('ok');
    });
  },
});
