MsgShow.cshtml 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. @{
  2. ViewBag.Title = "系统提示";
  3. }
  4. @section scripts{
  5. <script type="text/javascript">
  6. function encodeURL(s) {
  7. return s.replace(/&amp;/g, "&");
  8. }
  9. $(function () {
  10. $.messager.alert('系统提示', decodeURI('@ViewBag.msg'), 'info', function () {
  11. var windowID = '@ViewBag.WindowID';
  12. var url = '@ViewBag.url'
  13. if (url != '' && (windowID == '' || windowID == 'none')) {
  14. location.href = encodeURL(url);
  15. }
  16. else {
  17. if (windowID == '' || windowID == 'none') {
  18. top.$('#sysWindow').window('close');
  19. } else {
  20. top.$('#' + windowID).window('close');
  21. }
  22. var tab = top.$('#index_center_tabs').tabs('getSelected');
  23. var $iframe = tab.panel('body').find("iframe");
  24. if ($iframe[0].contentWindow.reload)
  25. $iframe[0].contentWindow.reload();
  26. }
  27. });
  28. $(".panel-tool-close").css("display", "none");
  29. })
  30. </script>
  31. }