Browse Source

增加图片格式错误提醒

XMTT 6 years ago
parent
commit
4266590db9
1 changed files with 7 additions and 1 deletions
  1. 7 1
      html/model/sys/professornew/photo/photo-set.html

+ 7 - 1
html/model/sys/professornew/photo/photo-set.html

@ -272,7 +272,13 @@ $(function (){
272 272
		// 文件上传成功,给item添加成功class, 用样式标记上传成功。
273 273
		cacheImageKey=null;
274 274
		uploader.on( 'uploadSuccess', function(file,data) {
275
			console.log(data);
275
			if(!data.success) {
276
                if (data.code = 302) {
277
                    alert("图片格式错误");
278
                    uploader.reset();
279
                    return;
280
                }
281
            }
276 282
			$("#jcropdiv").show();
277 283
			$(".load").hide();
278 284
			uploader.removeFile(fileId);