摘要: 借助script标签发送跨域请求,只支持get方法 客户端:client.html 服务器:server.php 阅读全文
posted @ 2019-03-12 15:21 chuanzi 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 首先下载bootstrap和nprogress两个库 index.html cart.html orders.html 阅读全文
posted @ 2019-03-12 15:06 chuanzi 阅读(308) 评论(0) 推荐(0) 编辑
摘要: db.json 阅读全文
posted @ 2019-03-12 14:18 chuanzi 阅读(191) 评论(0) 推荐(0) 编辑
摘要: promise是ES6新增的语法,可用于解决回调地狱的问题 上面的例子使用起来很臃肿,封装一下 阅读全文
posted @ 2019-03-12 12:29 chuanzi 阅读(155) 评论(0) 推荐(0) 编辑
摘要: const path = require('path') //路径模块 const url = require('url') //url模块 console.log(__dirname) // __dirname获取当前文件绝对路径(不包含文件名) console.log(__filename) // __filename获取当前文件绝对路径(包含文件名) conso... 阅读全文
posted @ 2019-03-12 11:06 chuanzi 阅读(1170) 评论(0) 推荐(0) 编辑
摘要: 升级一下上一篇的功能 首先还是配置:config.js 接着是服务器代码:index.js 最后是模板:template-apache.html end^_^ 阅读全文
posted @ 2019-03-12 01:04 chuanzi 阅读(428) 评论(0) 推荐(0) 编辑