You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/application/third_party/updatetrain/views/updatestation.php

56 lines
2.7 KiB
PHTML

<div class="col-sm-5 well">
</div>
<div class="col-sm-18">
<div class="panel panel-default">
<div class="panel-heading">更新国内火车站点信息</div>
<div class="panel-body">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-striped">
<tr>
<td width="120">&nbsp;</td>
<td width="300">
6 years ago
<div class="progress">
<div id="pros" class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
</div>
</div>
<div class="form_submit">
6 years ago
<button type="button" class="btn btn-success" id="trigger_ajax">test</button>
</div>
</td>
6 years ago
<td>&nbsp;
<P>由于涉及HT所以更新程序需要运行在本地http://202.103.68.144:65008/info.php/thirdparty/updatetrain/updatestation/</P>
6 years ago
<p>原来准备做点击后更新,加进度条。后来发现这个功能需要自动运行,基本不需要界面。加上时间也紧。所以就直接加链接了</p>
<P>以后数据都已HT的数据为准所以先要把目前站点JS的内容判断后同步到HT里面以后根据12306数据更新HT然后把新内容邮件发送到我邮箱我在手动更新网前站点JS</P>
<p><a href="/info.php/thirdparty/updatetrain/updatestation/getstatioBy12306/">点击更新主要根据12306数据更新</a></p>
6 years ago
<p style="display: none;"></p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td id="msg_1">请等待:当前进度:<span>0%</span></td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3" id="msg_1a"></td>
</tr>
</table>
</div>
</div>
</div>
<script type="text/javascript">
6 years ago
var trigger = document.getElementById("trigger_ajax");
trigger.onclick = function(){
var xhr = new XMLHttpRequest();
xhr.onprogress = function(event){
if(event.lengthComputable){
var loaded = parseInt(event.loaded/event.total*100)+"%";
$('#pros').width(loaded);
$('#pros').text(loaded);
}
}
xhr.open("post", "/info.php/thirdparty/updatetrain/updatestation/test/", true);
xhr.send(null);
}
6 years ago
</script>