diff --git a/mock/index.js b/mock/index.js index 0b386e7..33b2a81 100644 --- a/mock/index.js +++ b/mock/index.js @@ -7,6 +7,7 @@ import area from './system/area' import role from './system/role' import log from './system/log' +import allDict from './system/allDict' import callCase from './system/callCase' import config from './system/config' import search from './remote-search' @@ -21,7 +22,8 @@ ...log, ...config, ...search, - ...callCase + ...callCase, + ...allDict ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/index.js b/mock/index.js index 0b386e7..33b2a81 100644 --- a/mock/index.js +++ b/mock/index.js @@ -7,6 +7,7 @@ import area from './system/area' import role from './system/role' import log from './system/log' +import allDict from './system/allDict' import callCase from './system/callCase' import config from './system/config' import search from './remote-search' @@ -21,7 +22,8 @@ ...log, ...config, ...search, - ...callCase + ...callCase, + ...allDict ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/system/allDict.js b/mock/system/allDict.js new file mode 100644 index 0000000..5219ce5 --- /dev/null +++ b/mock/system/allDict.js @@ -0,0 +1,48 @@ +const sourcelist = [ + { 'name': '12345热线电话', 'value': '3' } +] +const levellist = [ + { 'name': '普通事件', 'value': '1' }, + { 'name': '紧急事件', 'value': '2' } +] +const eorclist = [ + { value: '1', name: '咨询' }, + { value: '2', name: '建议' }, + { value: '3', name: '求助' }, + { value: '4', name: '其他' }, + { value: '5', name: '投诉' } +] +export default [ + { + url: '/dict/code/caseSource', + type: 'get', + response: _ => { + return { + code: 200, + data: sourcelist + } + } + }, + { + url: '/dict/code/caseLevel', + type: 'get', + response: _ => { + return { + code: 200, + message: 'success', + data: levellist + } + } + }, + { + url: '/dict/code/eorc', + type: 'get', + response: _ => { + return { + code: 200, + message: 'success', + data: eorclist + } + } + } +]