Initial commit
This commit is contained in:
16
api/index.js
Normal file
16
api/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* url 映射
|
||||
* @author WangLongFei/Alisdon <920124512@qq.com>
|
||||
*/
|
||||
const files = require.context('../api', false, /\.js$/);
|
||||
const modules = {};
|
||||
|
||||
files.keys().forEach(key => {
|
||||
if (key !== './index.js') {
|
||||
modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default;
|
||||
}
|
||||
});
|
||||
|
||||
export default {
|
||||
...modules
|
||||
};
|
||||
Reference in New Issue
Block a user