modified 修改函数定义位置,使用变量定义路径

This commit is contained in:
zhaoxiang 2016-11-08 11:02:52 +08:00
parent 126e518f02
commit 78e5218ac7
2 changed files with 27 additions and 26 deletions

View File

@ -606,6 +606,33 @@
<script src="__JS__/demo.js"></script>
<script src="__PLUGIN__/vue/vue.min.js"></script>
<script src="__JS__/template.js"></script>
<script>
function refresh( url ) {
var $ = jQuery;
$.ajax({
type: "GET",
url: url,
success: function(data){
if( data.code == 200 ){
if( data.data.tempType == 'table' ){
if( $.buildTable ){
$('#content').html($.buildTable(data.data));
$('#tableBox').hide().fadeIn(800);
}else{
$.getScript('__JS__/template/table.js', function (){
$('#content').html($.buildTable(data.data));
$('#tableBox').hide().fadeIn(800);
});
}
}
}else{
$.alertMsg('请求失败!')
}
}
});
}
</script>
{block name="myScript"}{/block}
</body>
</html>

View File

@ -79,29 +79,3 @@
});
})(jQuery);
function refresh( url ) {
var $ = jQuery;
$.ajax({
type: "GET",
url: url,
success: function(data){
if( data.code == 200 ){
if( data.data.tempType == 'table' ){
if( $.buildTable ){
$('#content').html($.buildTable(data.data));
$('#tableBox').hide().fadeIn(800);
}else{
$.getScript('/static/js/template/table.js', function (){
$('#content').html($.buildTable(data.data));
$('#tableBox').hide().fadeIn(800);
});
}
}
}else{
$.alertMsg('请求失败!')
}
}
});
}