diff --git a/app/views/shixuns/operation.js.erb b/app/views/shixuns/operation.js.erb index c1ebe2f8f..04f7c8c98 100644 --- a/app/views/shixuns/operation.js.erb +++ b/app/views/shixuns/operation.js.erb @@ -2,13 +2,18 @@ sure_box_redirect('#{security_settings_path}', '开启实训,请先绑定邮箱'); <% else %> <% if @is_modify.blank? %> - //为了防止浏览器阻挡 + //为了防止浏览器阻挡,在实训路径中需要弹出新的页面,而实训首页又不需要弹出新的页面 + <% if @is_subject %> + var newTab=window.open("/loading.html"); + $.ajax().done(function() { + // 重定向到目标页面 + newTab.location.href = "<%= shixun_exec_shixun_path(@shixun) %>"; + }); + <% else %> $(".loading_all").show(); window.location.href="<%= shixun_exec_shixun_path(@shixun) %>"; $("#ajax-indicator").hide(); - //var tempwindow = window.open(); - //tempwindow.location = '<%#= shixun_exec_shixun_path(@shixun) %>'; - //window.open("<%#= shixun_exec_shixun_path(@shixun) %>"); + <% end %> <% else %> sure_box_redirect('<%= myshixun_reset_myshixun_path(@myshixun) %>', '实训已经更新啦,系统正在为您重置'); <% end %> diff --git a/public/loading.html b/public/loading.html new file mode 100644 index 000000000..7d3df7457 --- /dev/null +++ b/public/loading.html @@ -0,0 +1,14 @@ + +
+
+
EDUCODER
+

LOADING

+
+
\ No newline at end of file