前台js代码:
$(document).ready(function(){
var url = "teachers/getSchool.do";
$.ajax({
type: "POST",
url: url,
//async : false,
dataType:"text",
success : function(data) {
alert(data);
alert("8888");
var str="
PageData pd = new PageData();
Map<String, Object> map = null;
List<PageData> schoolList = null;
try {
pd = this.getPageData();
pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); //读取系统名称
PageData rolePd = new PageData();
rolePd.put("PARENT_ID", Const.PARENT_ROLES);
map = new HashMap<String, Object>();
schoolList = this.schoolService.listAll(new PageData());
if (schoolList != null)
pd.put("msg", "success");
else
pd.put("msg", "error");
schoolList.add(pd);
map.put("list", schoolList);
} catch (Exception e) {
// TODO: handle exception
}
return AppUtil.returnObject(pd, map);
}