tpl_public_fileedit.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  5. <title>文档处理</title>
  6. <link rel="stylesheet" type="text/css" href="webmain/css/rock.css?1747905850"/>
  7. <script type="text/javascript" src="js/jquery.js"></script>
  8. <script type="text/javascript" src="js/js.js"></script>
  9. <script type="text/javascript" src="js/base64-min.js"></script>
  10. <script>
  11. var id = '<?=$da['id']?>',otype='<?=$da['otype']?>',nowda,ldata;
  12. function initbody(){
  13. js.setmsg('初始中...');
  14. $.ajax({
  15. type:'get',dataType:'json',
  16. url:'api.php?m=upload&a=officeexists&id='+id+'&otype='+otype+'',
  17. success:function(ret){
  18. if(ret.success){
  19. var da = ret.data;
  20. if(da.type==0){
  21. js.setmsg('上传中('+da.filesizecn+')('+da.zong+'/<span id="cishu">0</span>)...');
  22. nowda = da;
  23. upstart(da, 0);
  24. }else if(da.type==2){
  25. js.setmsg('下载远程文件('+da.filesizecn+')...');
  26. }else{
  27. js.setmsg('跳转中...');
  28. js.location(da.url);
  29. }
  30. }else{
  31. js.setmsg(ret.msg);
  32. }
  33. },
  34. error:function(e){
  35. js.setmsg(e.responseText);
  36. }
  37. });
  38. }
  39. function upstart(da, ci){
  40. if(ci==da.zong){
  41. js.setmsg('已上传跳转中...');
  42. js.location(ldata.url);
  43. return;
  44. }
  45. var url = 'api.php?m=upload&a=officefstart&id='+id+'&otype='+otype+'';
  46. url+='&zong='+da.zong+'';
  47. url+='&ci='+ci+'';
  48. url+='&filemid='+da.filemid+'';
  49. url+='&gokey='+da.gokey+'';
  50. url+='&gourl='+jm.base64encode(da.gourl)+'';
  51. $('#cishu').html(''+(ci+1)+'');
  52. $.ajax({
  53. url:url,
  54. dataType:'json',
  55. success:function(ret){
  56. if(ret.success){
  57. ldata = ret.data;
  58. upstart(da, ci+1);
  59. }else{
  60. $('#cishu').html('<button onclick="chongshi('+ci+')" type="button" class="webbtn">重试</button>'+ret.msg);
  61. }
  62. },
  63. error:function(e){
  64. $('#cishu').html('<button onclick="chongshi('+ci+')" type="button" class="webbtn">重试</button>'+e.responseText);
  65. }
  66. });
  67. }
  68. function chongshi(ci){
  69. upstart(nowda, ci);
  70. }
  71. </script>
  72. </head>
  73. <body style="padding:0px;margin:0px;">
  74. <div style="margin-top:20%" align="center" id="zongmsgve">
  75. <span id="msgview"><i class="rock-loading"></i>处理中...</span>
  76. </div>
  77. </body>
  78. </html>
粤ICP备19079148号