function getNotice() { $.ajax({ url: 'notice!getNotice.action', dataType: "json", type: "GET", cache: false, success: function(ret) { var len = ret.length; if (len > 0) { $(".message .num").remove(); var html = '

    '; html += "
  1. [全部已读]
  2. "; $.each(ret, function(index, item) { if ($.inArray(item.xxid, readedNotice) == -1) { if ($.inArray(item.xxid, noticeIds) == -1) { noticeIds.push(item.xxid); newNoticeIds.push(item.xxid); } if (item.type === "") { html += "
  3. " + item.msg + "    [已读]
  4. "; } else if (item.type.endWith('sh')) { var shData = $.parseJSON(item.msg); html += "
  5. " + shData.subject + "," + shData.status + ((typeof(shData.feedback) == 'undefined') ? "" : ",审核意见:" + shData.feedback) + "    [已读]
  6. "; } else if (item.type.endWith('cjtz')) { var shData = $.parseJSON(item.msg); html += "
  7. <<" + shData.kcmc + ">> 的成绩出来了,总成绩:" + shData.zcj + ",绩点:" + shData.jd + "     [已读]
  8. "; } else if (item.type.endWith('xkcl')) { var shData = $.parseJSON(item.msg); html += "
  9. 您一选未选中<<" + shData.kcmc + ">> ,请关注下一轮选课开放时间。     [已读]
  10. "; } } }); html += '

      '; if (noticeIds.length > 0) { $(".message").append('' + noticeIds.length + ''); NoticeHtml = html; } else { NoticeHtml = "无未读通知"; } $(".message").poshytip('update', NoticeHtml); if (newNoticeIds.length > 0) { inotify(newNoticeIds.length); newNoticeIds = []; } } } }); }