1.1
1.2 直接导出
//http.js
function http(){
console.log("http请求")
}
module.exports
//b.js
var http = require('./http');
http();
1.3 解构导入
function http(){
console.log("http12")
}
module.exports = {
http
}
//a.js
var {http} = require('./a');
http()
//b.js