代码拉取完成,页面将自动刷新
同步操作将从 user_499098/online_office_viewer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html>
<head>
<title>Online Office Viewer</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script type="text/javascript" src="./assets/js/jquery.min.js"></script>
<script type="text/javascript" src="./assets/js/jquery.ajaxupload.js"></script>
<link rel="stylesheet" href="./assets/css/style.css">
<link href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="./assets/lib/jquery-toast-plugin/dist/jquery.toast.min.css">
<script type="text/javascript" src="./assets/lib/jquery-toast-plugin/dist/jquery.toast.min.js"></script>
</head>
<body>
<div id="loading" class="loading" style="display: none">
<img src="./assets/imgs/loadingBar.gif"/>
</div>
<div class="container">
<form id="form-1" class="form">
<label>Choose an office file</label>
<input type="file" name="uploadfile" /><br>
</form>
<button class="btn btn-primary" id="upload_btn">Click And Upload</button>
</div>
</body>
<script type="text/javascript">
$('#upload_btn').click(function() {
$.toast({
text : "Start Uploading",
hideAfter: false,
position : 'mid-center'
});
$("#loading").css("display", "block");
$('#form-1').ajaxUpload({
url : '/api/handle.php',
error : function () {
$("#loading").css("display", "none");
$.toast({
stack: 1,
text : "Upload Failed",
hideAfter: false
});
},
success : function (data) {
$("#loading").css("display", "none");
data = JSON.parse(data);
if (data.code == 0){
$.toast({
stack: 1,
text : "Upload and Convert success",
hideAfter: false
});
setTimeout(function () {
window.location.href = "/viewer.html?file=" + encodeURIComponent(data.data.href);
}, 1000);
}else{
$.toast({
stack: 1,
text : data.msg,
hideAfter: false
});
}
}
});
});
</script>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。