From 3d49a48107c1e31a4afcfdf6181199906a0f259a Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Thu, 30 May 2019 11:39:40 +0800 Subject: [PATCH] =?UTF-8?q?vnc=E5=85=8D=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/games_service.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/services/games_service.rb b/app/services/games_service.rb index 0b04ffbf..b65cb7e7 100644 --- a/app/services/games_service.rb +++ b/app/services/games_service.rb @@ -45,7 +45,7 @@ class GamesService # 高性能取上一关、下一关 prev_game = Game.prev_identifier(shixun.id, game.myshixun_id, game_challenge.position) - next_game = if current_user.is_certification_teacher || shixun_manager(shixun, current_user) || game.status || shixun.task_pass + next_game = if shixun.vnc || current_user.is_certification_teacher || shixun_manager(shixun, current_user) || game.status || shixun.task_pass Game.next_game(shixun.id, game.myshixun_id, game_challenge.position).try(:identifier) end @@ -87,11 +87,12 @@ class GamesService if res && res['code'].to_i != 0 raise("实训云平台繁忙(繁忙等级:99)") end - url = service_host +":#{res['port']}/vnc.html" + url = service_host +":#{res['port']}/vnc_lite.html" + container = container.merge(:vnc_url => url, :test => "666") rescue Exception => e Rails.logger.error(e.message) end - container = container.merge(:vnc_url => url) + end