From 9b9e8b871a85ead7402caf38ed2b19677de57d88 Mon Sep 17 00:00:00 2001 From: horizonlin Date: Tue, 11 Dec 2018 14:37:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0urlprotocol=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加urlprotocol处理 --- server/www/teleport/static/js/tp-assist.js | 46 +++++++++++++--------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/server/www/teleport/static/js/tp-assist.js b/server/www/teleport/static/js/tp-assist.js index 0f0811e..0fa26f0 100644 --- a/server/www/teleport/static/js/tp-assist.js +++ b/server/www/teleport/static/js/tp-assist.js @@ -121,25 +121,35 @@ $assist.do_teleport = function (args, func_success, func_error) { // console.log('---', data); var args_ = encodeURIComponent(JSON.stringify(data)); - $.ajax({ - type: 'GET', - timeout: 5000, - //url: 'http://localhost:50022/ts_op/' + args_, - url: $assist.api_url + '/run/' + args_, - jsonp: 'callback', - dataType: 'json', - success: function (ret) { - console.log('ret', ret); - if (ret.code === TPE_OK) { - func_success(); - } else { - func_error(ret.code, ret.message); + //判断是否使用urlprocotol处理方式 + if ($app.options.url_proto){ + + if(!$("#urlproto").length) { + var _html = "