admin.js 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, undefined, Frontend, Form, Template) {
  2. var Controller = {
  3. index: function () {
  4. // 标记为已读
  5. $(document).on('click', '.mark-event', function () {
  6. Fast.api.ajax($(this).data('url'), function () {
  7. location.reload();
  8. });
  9. });
  10. $(document).on('click','.btn-refresh', function () {
  11. Layer.load();
  12. location.reload();
  13. });
  14. // 重新获取左侧消息数量
  15. Fast.api.ajax({
  16. url: 'notice/admin/statistical',
  17. loading: false,
  18. method: 'post',
  19. }, function (data, res) {
  20. Backend.api.sidebar({
  21. 'notice/admin': data.num,
  22. });
  23. return false;
  24. }, function () {
  25. return false;
  26. });
  27. }
  28. };
  29. return Controller;
  30. });