(cls,msg,timeout,url)
| 54 | } |
| 55 | |
| 56 | function alertTips(cls,msg,timeout,url) { |
| 57 | if(!msg) return false; |
| 58 | var title=""; |
| 59 | if (cls=="error" || cls=="fail" || cls=="danger"){ |
| 60 | title='错误'; |
| 61 | cls="error" |
| 62 | }else{ |
| 63 | title='成功'; |
| 64 | cls="success" |
| 65 | |
| 66 | } |
| 67 | $.Toast(title,msg,cls, { |
| 68 | stack: true, |
| 69 | has_icon:true, |
| 70 | has_close_btn:true, |
| 71 | fullscreen:false, |
| 72 | timeout:parseInt(timeout), |
| 73 | sticky:false, |
| 74 | has_progress:true, |
| 75 | rtl:false, |
| 76 | // position_class:'toast-top-center', |
| 77 | }); |
| 78 | setTimeout(function () { |
| 79 | if(url){ |
| 80 | location.href=url |
| 81 | } |
| 82 | },parseInt(timeout)); |
| 83 | } |
| 84 | |
| 85 | // 上传文件 |
| 86 | function upload(url, formData, callback){ |
no outgoing calls
no test coverage detected