问题描述:在用户中心上传商品的批量上传图片,还有在淘宝助理导入批量上传图片等会遇到在IE,360等IE系浏览器卡死的现象,如下图提示:

QQ截图20141012094933.png

 

解决办法:

一、将 themes/mall/.../member.header.html 中的以下代码删掉:

<!-- Use IE7 mode -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7 charset={$charset}" />

以上可以解决 >=IE11 的卡死问题,如果你的浏览器是IE9或IE10,经过以上修改后,还是无法实现批量上传图片,则参考第二步修改:

 

二、找到 includes\libraries\javascript\swfupload\swfupload.js,参照以下代码修改

 SWFUpload.prototype.getFlashHTML = function () {
 // Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
    //解决IE9的BUG
    var classid = "";
    var Sys = {};
    var ua = navigator.userAgent.toLowerCase();
    if (window.ActiveXObject)
        Sys.ie = ua.match(/msie ([\d.]+)/)[1]
    if (Sys.ie && Sys.ie.substring(0, 1) == "9") {
        classid = 'classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
    }


 return ['<object id="', this.movieName, '"'+classid+' type="application/x-shockwave-flash" data="', this.settings.flash_url, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
    '<param name="wmode" value="', this.settings.button_window_mode, '" />',
    '<param name="movie" value="', this.settings.flash_url, '" />',
    '<param name="quality" value="high" />',
    '<param name="menu" value="false" />',
    '<param name="allowScriptAccess" value="always" />',
    '<param name="flashvars" value="' + this.getFlashVars() + '" />',
    '</object>'].join("");
};

 

进后台更新缓存,问题解决。