UNPKG

mock-convert

Version:

convert interface data to mock data

40 lines (39 loc) 1.08 kB
module.exports = { // projectJsonUrl: [ // // 项目文档接口地址,必须 // 'http://idoc.hhtcex.com/getProjectJson.html?projectId=225', // 'http://idoc.hhtcex.com/getProjectJson.html?projectId=226', // ], projectJsonUrl: "http://idoc.hhtcex.com/getProjectJson.html?projectId=225", // 项目文档接口地址,必须 basePath: 'api/', outOpt: { outPath: 'mock/data/index.js', singleFile: false, }, translateOpt: { apiHost: 'http://openapi.youdao.com/api', appKey: '18f056b095d7e3b9', secretKey: '4rNfpnEYYElENHZaheIfiBQF1r3eDfwp', fileNames: { // eslint-disable-next-line quote-props '保险产品': 'insuranceProducts', }, }, parseOpt: [ { dataType: 'string', identifier: 'price', ignoreCase: true, fullMatch: false, target: '\'$identifier$|2000-3000.1-2\': 3000', }, { dataType: 'string', remark: '小数', master: 'remark', ignoreCase: true, fullMatch: false, target: '\'$identifier$|100-200.1-2\': 3000', }, ], };