ES6语法编写常用工具utils类
1、创建Config类,用户存储一些全局变量
class Config {
constructor() {
this.BASE_URL = 'http://www.baidu.com'
this.IMAGE_URL = 'http://www.cdn.baidu.com'
this.SITE_PREFIX = 'ZP_'
this.AJAX_CONFIG = {
timeout: 10000,
原创
2020-06-28 10:44:46 ·
2338 阅读 ·
0 评论