33 lines
714 B
JavaScript
33 lines
714 B
JavaScript
$(function (){
|
|
$.ajax({
|
|
type : 'GET',
|
|
url : "/myInfo/getDashBoardConfig",
|
|
dataType:"json",
|
|
success : function(data) {
|
|
data = [{menuUrl:"/publicBoard/noticePage"}].concat(data)
|
|
getSubPage(data)
|
|
},
|
|
error : function(xhr, status) {
|
|
|
|
}
|
|
})
|
|
})
|
|
|
|
function getSubPage(menuList){
|
|
$.each(menuList, function(idx, menu){
|
|
if(idx<6){
|
|
const url = menu.menuUrl+(menu.menuUrl.includes('?')?'&dashboardFlag=true':'?dashboardFlag=true');
|
|
$.ajax({
|
|
type : 'GET',
|
|
url : url,
|
|
dataType:"html",
|
|
success : function(html) {
|
|
$("#subPage"+idx).append(html);
|
|
},
|
|
error : function(xhr, status) {
|
|
|
|
}
|
|
})
|
|
}
|
|
})
|
|
} |