MsgShowAndOpenAddUrl.cshtml 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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. debugger
  14. if (url != '' && (windowID == '' || windowID == 'none')) {
  15. location.href = encodeURL(url);
  16. }
  17. else {
  18. if (windowID == '' || windowID == 'none') {
  19. top.$('#sysWindow').window('close');
  20. } else {
  21. top.$('#' + windowID).window('close');
  22. }
  23. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + encodeURL(url);
  24. $.popupTopWindow('学生信息修改', redirectTo, 700, 500, null, null);
  25. }
  26. });
  27. $(".panel-tool-close").css("display", "none");
  28. })
  29. </script>
  30. }