摘要: 1.在util目录下先新建一个js文件 2.写函数: function 函数名1 ( 可传参 ) { } function 函数名2 ( 可传参 ) { this.函数名1 } 3.通过 module.exports 或者 exports 对外暴露接口。 module.exports = { '对外 阅读全文