- tags: ‘IE9及以上’
- categories: ‘IE9及以上’
- 引入的文件
- CSS更改
- 项目使用
- 公告栏的滚动
- 更改元素高度
- 滚动到底部请求数据
- 清除input type=’file’内容
- PDF的展示的插件—-PDFjs—(兼容到IE8)
- 分页插件(兼容IE8)
- JS悬浮彩色气泡文字标签云动画特效(兼容IE9)
- 兼容IE7的复制
- 日期控件的使用
- 兼容IE8的图片上传,不需要转base64展示图片———好像不兼容IE10
- 判断上传文件是否是图片类型—-未验证是否可以使用
- 文件上传
- 动态更改元素高度
- 文件下载
- 字体图标
- 选择页面中iframe中的元素
- 打印
- 展示的富文本插件
- 封装的提示框
- 搜索内容在IE下搜索时乱码问题
- iframe可以使用什么遮盖Object
- 解决IE中new Date()转换出来的不是日期格式的问题
- 解决IE的缓存问题
- gulp打包
tags: ‘IE9及以上’
categories: ‘IE9及以上’
引入的文件
让IE认识@media媒体查询,让低版本IE认识html5新增的标签
<!--1. html5shiv.min.js 让低版本IE认识html5新增的标签2. respond.min.js 让IE认识@media 媒体查询--><!--[if lt IE 9]><script src="../assets/common/js/html5shiv.min.js"></script><script src="../assets/common/js/respond.min.js"></script><![endif]-->
JQuery使用1点几版本
(注!jquery-2.0以上版本不再支持IE 6/7/8) 并不是最新的版本就最好的,而是根据您项目需求所适合的版本!
ajax的使用
// IE 浏览器需要手动开启下面的,否则ajax不生效jQuery.support.cors=true;
使用了自制图标库—icomoon
https://icomoon.io/app/#/select
input需要双击上传的原因
??????IE9下上传文件是否可以调用input的点击事件
需要将隐藏的input按钮的大小足够的大,因为如果点击在input输入框中的话,就需要点击两次input[type=file] {font-size: 100px;}
让浏览器以什么模式渲染
<meta http-equiv="X-UA-Compatible" content="IE=10">
动态引入JS
// 动态引入js文件Utils.prototype.importJS = function (url, callback) {var script = document.createElement("script");script.type = "text/javascript";script.src = url;script.onload = function(){typeof callback == 'function' ? callback() : '';};document.body.appendChild(script);}
兼容IE8的数组indexof方法的解决
if (!Array.prototype.indexOf){Array.prototype.indexOf = function(elt /*, from*/){var len = this.length >>> 0;var from = Number(arguments[1]) || 0;from = (from < 0)? Math.ceil(from): Math.floor(from);if (from < 0)from += len;for (; from < len; from++){if (from in this &&this[from] === elt)return from;}return -1;};}
解决IE9中console未定义的问题
window.console = window.console || (function(){var c = {}; c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile = c.clear = c.exception = c.trace = c.assert = function(){};return c;})();
css预处理器可以使用
就是简化开发者代码的编写,利用工具生成浏览器能识别的CSS代码
例如:使用“scss”的CSS预处理器,使用koala这个工具来生成CSS代码,其实IDEA也能编译CSS代码
使用jsviews
jsRender/jsViews 引入外部模板引擎
例子
一:模板文件
模板文件 text.tmpl.html
<p>名称:{^{:name}}</p>
模板文件 nav.html
{{for nav}}<p>{^{:#data}}</p>{{/for}}
二、调用模板
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title><script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script><script src="jsrender.min.js"></script><script src="template.js"></script></head><body><p>首页</p><text id="text"><text><div id="bbb"><div></body><script>// 调用模板// new TempRender({ src: './', name: 'text', selector: '#text', data: {name: 'www'} });// 调用自定义模板文件名new TempRender({ srcCustom: true, src: './nav.html', selector: '#bbb', data: { nav: ['www', 'abc', '123']} });</script></html>
三、封装调用模板TempRender方法
(function () {var that = ''var TempRender = function (options) {// console.log(options);that = thisthis.path = options.srcCustom ? options.src : options.src + options.name + '.tmpl.html'; // 模板文件所在位置(包含文件名)【此路径根据调用文件的位置为起始位置】this.selector = options.selector; // 调用模板的标签 id class等,如 '#nav'this.data = options.data; // 数据this.initRender(this); // 此处传入this是为了防止that被污染而导致页面渲染错误}// 此处方法内不能使用that,如果出现多出调用,使用that会污染数据TempRender.prototype.initRender = function (obj) {$.when($.get(obj.path)).done(function (tmplData) {// tmplData 模板文件内容$.templates({tmpl: tmplData});console.log(obj.selector, $.render.tmpl(obj.data))$(obj.selector).html($.render.tmpl(obj.data));})}window.TempRender = TempRender})()
参数说明
srcCustom 自定义模板文件名,不使用公共的后缀src 必传,模板文件所在位置(不包含文件名)【此路径根据调用文件的位置为起始位置】name srcCustom不填时,必传name。模板文件的前缀,后缀默认 '.tmpl.html', 可在template.js中修改。selector 必传,调用模板的标签 id class等,如 '#nav'data 数据
自定义jsrender标签
自定义标签的声明
// 自定义jsrender标签// a标签的自定义(没有子级的a标签)function renderTagA1(url, name, isActive, show) {if(show) {if(isActive) {return '<li class="active"><a class="theme_style_slide_color theme_style_slide_color_h" href="' + url + '"> ' + name + ' </a></li>';}else {return '<li><a class="theme_style_slide_color theme_style_slide_color_h" href="' + url + '"> ' + name + ' </a></li>';}}}// 加载自定义jsrender标签$.views.tags("renderTagA1", renderTagA1);
自定义标签的使用
<ul>{^{for list}}{{renderTagA1 url title isActive show /}}{{/for}}</ul>
头部信息
<meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
更改网址,但是不进行跳转
window.history.pushState({}, 0, window.location.href + '?id='+ACKData.data.id);
CSS更改
解决获取焦点之后,输入框移动的问题
input {vertical-align: top;}
调整input中placeholder的样式
input::-webkit-input-placeholder { /* Chrome/Opera/Safari */color: #ccc;}input::-moz-placeholder { /* Firefox 19+ */color: #ccc;}input:-ms-input-placeholder { /* IE 10+ */color: #ccc;}input:-moz-placeholder { /* Firefox 18- */color: #ccc;}
解决金额符号¥在IE上显示和谷歌上显示不一致的问题,解决方案:字体库改成微软雅黑
html{overflow-x: hidden;font-family: 微软雅黑;}
清除IE下的右侧的叉
input[type=text]::-ms-clear{display: none;}
rgba() ie兼容
@mixin bg($bgColor, $color) {background-color: $bgColor;// 兼容IE8filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=##{$color}, endColorstr=##{$color});-ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#438ACA,endColorstr=#438ACA) !important;}
background-size: cover; ie8兼容
@mixin bgSize($bgUrl, $bgPath) {background: url($bgUrl) no-repeat;background-size: cover;/*兼容ie8 路径要使用绝对路径*/-ms-behavior: url('#{$bgPath}guarantee/src/assets/common/backgroundsize.min.htc');behavior: url('#{$bgPath}guarantee/src/assets/common/backgroundsize.min.htc');}
定义input placeholer的样式
/*input placeholder css*/.placeholder_css:-webkit-input-placeholder {color: #ccc !important;}.placeholder_css:-ms-input-placeholder {color: #ccc !important;}.placeholder_css:-moz-placeholder {color: #ccc !important;}.placeholder_css:placeholder {color: #ccc !important;}.placeholder_css::placeholder {color: #ccc !important;}
定义滚动条样式
.scrollStyle2 {scrollbar-base-color: #ccc;//scrollbar-base-color: #134087;scrollbar-3dlight-color:#ccc;scrollbar-highlight-color: #ccc;scrollbar-track-color: #e9e9e9;scrollbar-arrow-color: #ccc;scrollbar-shadow-color:#e9e9e9;//scrollbar-dark-shadow-color: #011433;}.scrollStyle2::-webkit-scrollbar {width: 6px;height: 6px;background-color: #e9e9e9;}/*定义滚动条轨道 内阴影+圆角*/.scrollStyle2::-webkit-scrollbar-track {border-radius: 2px;background-color: #e9e9e9;}/*定义滑块 内阴影+圆角*/.scrollStyle2::-webkit-scrollbar-thumb {border-radius: 2px;background-color: #CCCCCC;}
项目使用
公告栏的滚动
intervalNotice();function intervalNotice() {clearInterval(noticeTimer);noticeTimer = setInterval(function () {$("div.notice ul").animate({marginTop: '-35px'}, 500, function () {$(this).css({marginTop:"0"}).find(":first").appendTo(this);})}, 2000);}$("div.notice").mouseover(function () {clearInterval(noticeTimer);}).mouseleave(function () {intervalNotice();})
更改元素高度
$(".calcuHeight").css("height", document.documentElement.clientHeight-224 + "px");
滚动到底部请求数据
$(".search-result").scroll(function() {// console.log("滚动条到顶部的垂直高度:" + $(".search-result").scrollTop() );// console.log("滚动条盒子高度:" + $(".search-result").height() );// console.log("页面的文档高度:" + $(".search-result > ul").height() );// 滚动到底部的计算if($(this).scrollTop() + $(this).height() > $(".search-result > ul").height()) {// ge.data.insureProjectInfo.status限制滚动到底部在上一次请求结束之前只请求一次if (ge.data.insureProjectInfo.status) {// 请求下一页的数据ge.data.insureProjectInfo.status = false;ge.data.insureProjectInfo.page++;ge.queryProject();}}});
清除input type=’file’内容
Utils.prototype.clearFile = function(waitClearFile) {var $file = $("" + waitClearFile);if ($file.length > 0) {$file.after($file.clone().val(""));$file.remove();}}
PDF的展示的插件—-PDFjs—(兼容到IE8)
分页插件(兼容IE8)
JS悬浮彩色气泡文字标签云动画特效(兼容IE9)
兼容IE7的复制
clipboard.js!前端实现复制剪切功能,这个小插件仅仅支持到IE9+
IE的window对象提供了clipboardData对象用于实现复制功能
重新封装clipboard实现完美兼容
var ClipBoard = function(obj){this.handlerID = obj.handlerID || null;this.textID = obj.textID || null;this.type = obj.type || 'copy';this.isAttr = obj.isAttr || false;this.isPlugin = true;this.isActive = false;var ua = window.navigator.userAgent;var is_IE = ua.match(/(rv:|msie )\d+/i);var IE_Version = is_IE ? parseInt(is_IE[0].split(/:| /g)[1]) : 9;if(IE_Version <= 8){this.isPlugin = false;}var handlerObj = document.getElementById(obj.handlerID);if(typeof this.type === 'string'){handlerObj.setAttribute('data-clipboard-action',this.type)}else{throw error('type类型错误!');}if(!obj.isAttr && obj.textID){handlerObj.setAttribute('data-clipboard-target','#'+obj.textID);}}ClipBoard.prototype.attach = function(){if(this.isActive){ // 对象已经被实例化return;}var tip = '复制';if(this.type === 'cut'){tip = '剪切';}this.isActive = true;if(this.isPlugin){var clip = new Clipboard('#'+this.handlerID);clip.on('success', function(e) {alert(tip+'成功,可通过Ctrl+V进行粘贴!');});clip.on('error', function(e) {alert(e.action+'操作失败!');});}else if(window.attachEvent){var self = this;var handlerObj = document.getElementById(this.handlerID);handlerObj.attachEvent('onclick',function(){var text = '';if(self.isAttr){// 复制属性值text = handlerObj.getAttribute('data-clipboard-text');}else{var textObj = document.getElementById(self.textID);text = textObj.value || textObj.innerHTML;}window.clipboardData.setData('Text',text);alert(tip+'成功,可通过Ctrl+V进行粘贴!');});}else{alert('浏览器版本过低,不支持该插件!')}}
用法
首先引入clipboard.js以及上面那段代码,然后通过new的方式去实例化控件
// html<p id="copy-p" class="a">将被复制的p文本</p><button id="copy-btn">复制</button><script src="/path/clipboard.js"></script>// jsvar c1 = new ClipBoard({handlerID: 'copy-btn',textID: 'copy-p',isAttr: false,type:'copy'});c1.attach(); // 触发复制/剪切功能
参数说明
handlerID:用于点击事件的控件,在html标签里面加上id这个属性;
textID:被复制文本所在的容器的id;
isAttr:用于说明复制的内容是否为控件中的属性值,默认为false(此时复制的内容是textID内的文本),如果设置为true,前提需要在控件这个标签上增添一个属性:data-clipboard-text,属性值就是你要复制的文本;eg: 复制
type:操作的类型,取值为copy/cut(复制/剪切),默认是copy

日期控件的使用
dcalendar.picker
// 日期控件的渲染---调用$('.mydatepicker').dcalendarpicker({format:'yyyy-mm-dd'});$('#mycalendar').dcalendar();

兼容IE8的图片上传,不需要转base64展示图片———好像不兼容IE10
判断上传文件是否是图片类型—-未验证是否可以使用
Base64 = function (imgFile, callback) {var _this = this;$(imgFile).change(function(){// 定义方法// console.log($(this));console.dir($(this));var pattern = /(\.*.jpg$)|(\.*.png$)|(\.*.jpeg$)|(\.*.gif$)|(\.*.bmp$)/;if(!pattern.test($(this)[0].value)) {alert("请上传jpg/jpeg/png/gif/bmp格式的照片!");$(this).focus();}else{var base64value = "";//判断浏览器类型if(document.all){//兼容IEbase64value = Base64.prototype.ieBase64($(this)[0].value, $(this),callback);}else{//兼容主流浏览器base64value = Base64.prototype.mainBase64($(this)[0].files[0], $(this), callback);}}});};Base64.prototype = {ieBase64: function(file, ele, callback){var realPath, xmlHttp, xml_dom, tmpNode, imgBase64Data;realPath = file;//获取文件的真实本地路径.// console.log("file", file)xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");xmlHttp.open("POST",realPath, false);xmlHttp.send("");xml_dom = new ActiveXObject("MSXML2.DOMDocument");tmpNode = xml_dom.createElement("tmpNode");tmpNode.dataType = "bin.base64";tmpNode.nodeTypedValue = xmlHttp.responseBody;imgBase64Data = "data:image/bmp;base64," + tmpNode.text.replace(/\n/g,"");callback(imgBase64Data, ele);// console.log("IE 兼容");},mainBase64: function(file, ele, callback){var fileReader, imgData;fileReader = new FileReader();fileReader.readAsDataURL(file);fileReader.onload = function () {imgData = this.result; //base64数据// console.log(imgData);// console.log(callback)callback(imgData, ele);}},}
/* 兼容IE8的图片上传,不需要转base64展示图片 */Utils.prototype.previewImage = function (imgFile, ele) {var filextension=imgFile.value.substring(imgFile.value.lastIndexOf("."),imgFile.value.length);filextension=filextension.toLowerCase();// console.log("imgFile",imgFile)if(filextension == '.zip'){ele.style.display = "block";// console.log("执行zip");// document.getElementsByClassName("img_show").innerHTML = "<img id='img1' width='120px' height='100px' src='"+path+"'/>";ele.innerHTML = "<img id='img1' width='100%' height='100%' src='/assets/common/img/zip.png'/>";}else if ((filextension!='.jpg')&&(filextension!='.gif')&&(filextension!='.jpeg')&&(filextension!='.png')&&(filextension!='.bmp')){// console.log("pathtop,sorry")alert("对不起,系统仅支持标准格式的照片,请您调整格式后重新上传,谢谢 !");imgFile.focus();}else{// console.log("path")var path;if(document.all && document.addEventListener && window.atob)//IE{path=window.URL.createObjectURL(imgFile.files[0]);// FF 7.0以上ele.style.display = "block";ele.innerHTML = "<img width='100%' height='100%' src='"+path+"'/>";}else if(document.all) {// console.log("IE")imgFile.select();// console.log(imgFile.select())path = document.selection.createRange().text;// console.log("path",document.selection.createRange())console.dir(document.selection.createRange(), document.selection)// console.log(path)ele.innerHTML="";ele.style.display = "block";ele.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='scale',src=\"" + path + "\")";// 使用滤镜效果document.getElementsByClassName("img_show")[0].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='scale',src=\"" + path + "\")";// 使用滤镜效果}else{path=window.URL.createObjectURL(imgFile.files[0]);// FF 7.0以上ele.style.display = "block";ele.innerHTML = "";ele.innerHTML = "<img width='100%' height='100%' src='"+path+"'/>";}}}
文件上传
/todo 暂时需要在前面增加判断,判断是否是IE9以上的浏览器,如果是则判断文件的大小,如果大于文件的大小则不予上传/
IE9 不支持 files 属性
使用jquery.form.js的文件进行上传(兼容IE9),废弃使用ajaxfileupload.js
动态更改元素高度
$(".calcuHeight").css("height", document.documentElement.clientHeight-205 + "px");
文件下载
window.open(data.guaranteeInfo.guaranteeUrl, '_blank');/*if (!!window.ActiveXObject || "ActiveXObject" in window) {// console.log("下载保单")var elemIF = document.createElement("iframe");elemIF.src = data.guaranteeInfo.guaranteeUrl;elemIF.style.display = "none";document.body.appendChild(elemIF);elemIF.click()} else {var link = document.createElement('a');link.setAttribute("download", "发票");link.href = data.guaranteeInfo.guaranteeUrl;link.click();}*/
字体图标
可以使用字体图标
选择页面中iframe中的元素
/*放大*/$("body").off("click", ".fangdaEvent").on("click", ".fangdaEvent", function () {$("#iframeContent").contents().find("#zoomIn").click();})
打印
使用jQuery.print.min.js
使用print.min.js
/*打印*/$("body").off("click", ".printEvent").on("click", ".printEvent", function () {// jQuery.print.min.js --- 可能只兼容谷歌打印/*$(".induranceInfo").print({globalStyles:true,//是否包含父文档的样式,默认为truemediaPrint:false,//是否包含media='print'的链接标签。会被globalStyles选项覆盖,默认为falsestylesheet:null,//外部样式表的URL地址,默认为nullnoPrintSelector:".no-print",//不想打印的元素的jQuery选择器,默认为".no-print"iframe:true,//是否使用一个iframe来替代打印表单的弹出窗口,true为在本页面进行打印,false就是说新开一个页面打印,默认为trueappend:null,//将内容添加到打印内容的后面prepend:null,//将内容添加到打印内容的前面,可以用来作为要打印内容deferred: $.Deferred()//回调函数})*/// 使用print.min.js// printJS('/assets/page/myGuaranteeDetail/img/fapiao.pdf');$(".transfer_pay > .content").print({globalStyles:true,//是否包含父文档的样式,默认为truemediaPrint:false,//是否包含media='print'的链接标签。会被globalStyles选项覆盖,默认为falsestylesheet:null,//外部样式表的URL地址,默认为nullnoPrintSelector:".no-print",//不想打印的元素的jQuery选择器,默认为".no-print"iframe:true,//是否使用一个iframe来替代打印表单的弹出窗口,true为在本页面进行打印,false就是说新开一个页面打印,默认为trueappend:null,//将内容添加到打印内容的后面prepend:null,//将内容添加到打印内容的前面,可以用来作为要打印内容deferred: $.Deferred()//回调函数})// printPage(); // 自己定义的方法})/*打印*/function printPage(obj){var bdhtml=window.document.body.innerHTML; //获取当前页的html代码var sprnstr="<!--startprint-->"; //设置打印开始区域var eprnstr="<!--endprint-->"; //设置打印结束区域var prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取htmlvar prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); //从结束代码向前取htmlwindow.document.body.innerHTML = prnhtml; //将html代码 放在页面上,方便打印//打印之前设置IE打印时不打印页眉 、页脚if (!!window.ActiveXObject || "ActiveXObject" in window) {remove_ie_header_and_footer();}print.portrait = false;//横向打印//打印window.print();// window.document.body.innerHTML=bdhtml;}//打印之前设置IE打印时不打印页眉 、页脚function remove_ie_header_and_footer() {var hkey_root, hkey_path, hkey_key;hkey_path = "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";try {var RegWsh = new ActiveXObject("WScript.Shell");RegWsh.RegWrite(hkey_path + "header", ""); //设置页眉为空RegWsh.RegWrite(hkey_path + "footer", ""); //设置页脚为空} catch (e) {}}
展示的富文本插件
quill.core.css
封装的提示框
/** 提示框* 使用: 引入 base.js* 参数 optionstype 类型 success 成功 || info || warning 警告 || error 错误msg 提示信息hideTime 提示框消失时间top 最终展示位置* 调用Utils.funWebTip({type: 'warning',msg: "aa"})*/Utils.prototype.funWebTip = function (options){var option = {type: "success", // success || info || warning || errorname: "alert" + new Date().getTime(),top: '26.5%',hideTime: 3000}$.extend(option, options);var html = '<section class="webTipBg alert-' + option.type + " " + option.name + '">' +'<div class="webTip">' +'<i></i>' +'<div class="tip-message">' + option.msg + '</div>' +'</div>' +'</section>'$("body").append(html);var dom = $("." + option.name);dom.animate({top: option.top,opacity: 1}, 500);setTimeout(function (){dom.fadeOut().remove();}, option.hideTime)}
/*提示框*//********************************************************************************/.webTipBg {/*display: none;*/opacity: 0;max-width: 80%;position: fixed;top: 50%;left: 50%;-webkit-transform: translate(-50%, -50%);-moz-transform: translate(-50%, -50%);-ms-transform: translate(-50%, -50%);-o-transform: translate(-50%, -50%);transform: translate(-50%, -50%);z-index: 9999;font-size: 14px;border-radius: 4px;padding: 8px 25px;display: flex;justify-content: space-between; }.webTipBg.alert-success {background-color: #f0f9eb;color: #67c23a; }.webTipBg.alert-info {background-color: #E5F1FF;color: #B9CAFF; }.webTipBg.alert-warning {background-color: #fdf6ec;color: #e6a23c; }.webTipBg.alert-error {background-color: #fef0f0;color: #f56c6c; }.webTipBg div.webTip {display: flex;justify-content: flex-start;align-items: center; }.webTipBg div.webTip i {border-radius: 50%;width: 16px;height: 16px;margin-right: 8px;display: inline-block;vertical-align: middle; }.webTipBg div.webTip .tip-message {display: inline-block;vertical-align: middle; }.webTipBg.alert-success .webTip i {background: url(/assets/common/img/big_icon_success.png) no-repeat center center;background-size: cover; }.webTipBg.alert-info .webTip i {background: url(/assets/common/img/big_icon_jijingshi@2x.png) no-repeat center center;background-size: cover; }.webTipBg.alert-warning .webTip i {background: url(/assets/common/img/big_icon_jingshib@2x.png) no-repeat center center;background-size: cover; }.webTipBg.alert-error .webTip i {background: url(/assets/common/img/big_icon_cuowu@2x.png) no-repeat center center;background-size: cover; }/*图标公共样式*/.del-small-public {position: absolute;border-radius: 50%;background-color: #ccc;top: -6px;right: -8px;z-index: 1;text-align: center;line-height: 12px;color: #fff; }
搜索内容在IE下搜索时乱码问题
使用encodeURIComponent的方法来解决
iframe可以使用什么遮盖Object
<iframe id="iframe1" src="about:blank" frameBorder="0" marginHeight="0" marginWidth="0" style="position:relative; visibility:inherit; top:0px;left:0px;height:100%;width:100%; z-Index:-1;opacity: 0; filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);" allowTransparency="true"></iframe>
解决IE中new Date()转换出来的不是日期格式的问题
IE下不能将带有-的日期格式转换成其他的日期格式
var date = new Date(projectInfo.dueTime.replace(/-/g,'/'));
解决IE的缓存问题
还是在请求后面添加时间戳
gulp打包
打包的版本号可以是动态的更改
