sandm 1 рік тому
батько
коміт
b7c4a5d325

+ 10 - 5
public/static/modular/gate/talentInfo/talentInfo_info.js

@@ -1113,11 +1113,16 @@ $(function () {
         var file = tag.files[0];
         var imgSrc;
         var reader = new FileReader();
-        reader.readAsDataURL(file);
-        reader.onload = function () {
-            imgSrc = this.result;
-            $("#photoImg").attr("src", imgSrc);
-        };
+        if(toString.call(file) === '[object Blob]'){
+            reader.readAsDataURL(file);
+            reader.onload = function () {
+                imgSrc = this.result;
+                $("#photoImg").attr("src", imgSrc);
+            };
+        }else{
+            alert('图片或浏览器不支持,请更换!!');
+        }
+
     });
     TalentInfoInfoDlg.setNoChangeField();
     $("#talent_condition").on('chosen:ready', function (e, params) {