mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 细节优化
This commit is contained in:
parent
e532947d3c
commit
d3091a140f
@ -600,48 +600,14 @@
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="__JS__/demo.js"></script>
|
||||
<script src="__PLUGIN__/vue/vue.min.js"></script>
|
||||
<script src="__JS__/template.js"></script>
|
||||
<script>
|
||||
function refresh(url) {
|
||||
$.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);
|
||||
});
|
||||
}
|
||||
}
|
||||
if( data.data.tempType == 'form' ){
|
||||
if( $.buildForm ){
|
||||
$('#content').html($.buildForm(data.data));
|
||||
$('#tableBox').hide().fadeIn(800);
|
||||
}else{
|
||||
$.getScript('__JS__/template/form.js', function (){
|
||||
$('#content').html($.buildForm(data.data));
|
||||
$('#formBox').hide().fadeIn(800);
|
||||
});
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$.alertMsg(data.msg);
|
||||
setTimeout(function() {
|
||||
if (data.url) {
|
||||
location.href = data.url;
|
||||
}
|
||||
}, 1000*data.wait);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
var JS_PATH = '__JS__';
|
||||
var CSS_PATH = '__CSS__';
|
||||
var STATIC_PATH = '__STATIC__';
|
||||
var IMG_PATH = '__IMG__';
|
||||
var PLUGIN_PATH = '__PLUGIN__';
|
||||
</script>
|
||||
<script src="__JS__/template.js"></script>
|
||||
{block name="myScript"}{/block}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -79,3 +79,43 @@
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
var refresh = function(url) {
|
||||
$.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_PATH + '/template/table.js', function (){
|
||||
$('#content').html($.buildTable(data.data));
|
||||
$('#tableBox').hide().fadeIn(800);
|
||||
});
|
||||
}
|
||||
}
|
||||
if( data.data.tempType == 'form' ){
|
||||
if( $.buildForm ){
|
||||
$('#content').html($.buildForm(data.data));
|
||||
$('#tableBox').hide().fadeIn(800);
|
||||
}else{
|
||||
$.getScript(JS_PATH + '/template/form.js', function (){
|
||||
$('#content').html($.buildForm(data.data));
|
||||
$('#formBox').hide().fadeIn(800);
|
||||
});
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$.alertMsg(data.msg);
|
||||
setTimeout(function() {
|
||||
if (data.url) {
|
||||
location.href = data.url;
|
||||
}
|
||||
}, 1000*data.wait);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -11,7 +11,7 @@
|
||||
* @returns {string}
|
||||
*/
|
||||
$.buildTable = function ( tableObj ) {
|
||||
var tableHtml = '<div class="box" id="tableBox"><div class="box-body">';
|
||||
var tableHtml = '<div class="box box-primary" id="tableBox"><div class="box-body">';
|
||||
if( tableObj.rightButton && tableObj.rightButton.length ){
|
||||
tableObj.header.push({field:"action",info:"操作"});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user