SpecWait.cshtml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @using WeApp.TrainingCamp.Dto
  2. @{
  3. Layout = "~/Views/Shared/Layout/_Layout.Spec.cshtml";
  4. CampDto camp = ViewBag.Camp;
  5. string text = ViewBag.Text;
  6. ViewBag.Title = "专家屏(" + camp.Name + ")";
  7. }
  8. @section styles{
  9. <link href="~/Content/Css/Exercise/stu-bg.min.css" rel="stylesheet" />
  10. }
  11. <div class="body no-select" style="">
  12. <div class="left">
  13. <img src="~/Content/Image/Stu/gwLogo.png" />
  14. </div>
  15. <div class="right">
  16. <img src="~/Content/Image/Stu/loudou.png" />
  17. <div class="text-box">
  18. <span class="name">@(camp.Name)</span>
  19. <span class="wait-text">@(text)</span>
  20. </div>
  21. </div>
  22. </div>
  23. @section scripts
  24. {
  25. <script id="hub">
  26. abp.signalr.connect(['@(camp.Id)']);
  27. iwbHub.client.getReloadAll = function (msg) {
  28. console.log('getReloadAll: ', msg);
  29. if (msg) {
  30. try {
  31. var data = JSON.parse(msg);
  32. if (data) {
  33. if (data.no == '@(camp.Id)') {
  34. window.location.reload();
  35. }
  36. }
  37. } catch (e) {
  38. console.log('getReloadAll: ', e);
  39. }
  40. }
  41. };
  42. iwbHub.client.getReloadSpec = function(msg) {
  43. console.log('getReloadSpec: ', msg);
  44. if (msg) {
  45. try {
  46. var data = JSON.parse(msg);
  47. if (data) {
  48. if (data.no == '@(camp.Id)') {
  49. window.location.reload();
  50. }
  51. }
  52. } catch (e) {
  53. console.log('getReloadSpec: ', e);
  54. }
  55. }
  56. };
  57. </script>
  58. }