Home.js 864 B

12345678910111213141516171819202122232425262728293031323334
  1. var Home = function () {
  2. var exports = {};
  3. exports.options = {};
  4. //初始化数据
  5. exports.initPage = function () {
  6. //初始化通知消息
  7. exports.initNoticeTips();
  8. };
  9. //初始化通知消息
  10. exports.initNoticeTips = function () {
  11. $.fn.submitAjax({
  12. url: "/SysMgr/Home/GetNoticeTips",
  13. target: "#header_notification_bar",
  14. success: function (data) {
  15. //填充模板引擎
  16. var templateData = {
  17. noticeTipTotal: data.Total,
  18. Notices: data.Notices
  19. };
  20. var html = template('notification_bar', templateData);
  21. $("#header_notification_bar").html(html);
  22. App.initComponents();
  23. }
  24. });
  25. }
  26. return exports;
  27. };