openView:function (imagUrl) { alert(imagUrl) var imagurlencode=encodeURI(imagUrl); var fileType = imagurlencode.substr(imagurlencode.lastIndexOf(".")+1).toLowerCase(); if(fileType=='jpeg'||fileType=='jpg'||fileType=='png'||fileType=='bmp'){ window.open(imagUrl) }else { var curWwwPath=window.document.location.href; var pathName=window.document.location.pathname; var pos=curWwwPath.indexOf(pathName); var localhostPaht=curWwwPath.substring(0,pos); window.open('https://docview.mingdao.com/op/view.aspx?src='+localhostPaht+imagurlencode,'','height=1000,width=1000,scrollbars=yes,status =yes') } },