<input type="text" type="hidden" id="hidsharprotocol" name="hidsharprotocol" class="form-control col-sm-9" th:value="${resMainInfo.sharprotocol}" />
|
<form class="form-horizontal" id="jkfwform" method="post" xmlns:th="http://www.w3.org/1999/xhtml">
|
<div class="portlet box ltblue">
|
<div class="portlet-title">
|
接口服务信息
|
<div class="caption">
|
<i class="fa fa-reorder"></i>
|
</div>
|
<div class="tools">
|
<a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
|
</div>
|
</div>
|
<div class="portlet-body">
|
<div class="row">
|
<div class="col-sm-6">
|
<div class="control-group">
|
<label class="control-label">服务分类<span style="color: red;">*</span></label>
|
<div class="controls input-icon">
|
<select id="servertype" name="servertype" class="form-control col-sm-9" required="">
|
<option value="">--请选择--</option>
|
<option th:selected="(${Res_ExtInterFaceService.servertype}=='WebService')?'true':'false'" value="WebService">WebService</option>
|
<option th:selected="(${Res_ExtInterFaceService.servertype}=='WEBAPI')?'true':'false'" value="WEBAPI">WEBAPI</option>
|
</select>
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="row">
|
<div class="col-sm-12">
|
<div class="control-group">
|
<label class="control-label">服务地址</label>
|
<div class="controls input-icon">
|
<input th:value="${Res_ExtInterFaceService.serverurl}" id="serverurl" name="serverurl" class="form-control col-sm-10" maxchar="100"/>
|
<a th:if="${Res_ExtInterFaceService.esbid}==null and ${Res_ExtInterFaceService.resourceid} != null" name="esbbtn" style="cursor: pointer;vertical-align:sub;" onclick="showEsbInfo()"><span>注册</span></a>
|
<a th:if="${Res_ExtInterFaceService.esbid}!=null" style="cursor: pointer;vertical-align:sub;" onclick="showEsbInfo()"><span>更新</span></a>
|
<input type="hidden" id="esbid" th:value="${Res_ExtInterFaceService.esbid}" />
|
<input type="hidden" id="zyjc" th:value="${resMainInfo.abbreviation}" />
|
<input type="hidden" id="hidcontextpath" th:value="${Res_ExtInterFaceService.contextpath}" />
|
<input type="hidden" id="hidagentserverurl" th:value="${Res_ExtInterFaceService.agentserverurl}" />
|
<input type="hidden" id="hidservertype" th:value="${Res_ExtInterFaceService.servertype}" />
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="row" style="display: none">
|
<div class="col-sm-6">
|
<div class="control-group">
|
<label class="control-label">TOKEN</label>
|
<div class="controls input-icon">
|
<input type="text" id="token" name="token" class="form-control col-sm-9" th:value="${resMainInfo.token}" />
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="row" >
|
<div class="col-sm-6">
|
<div class="control-group">
|
<label class="control-label">是否代理<span style="color: red;">*</span></label>
|
<div class="controls input-icon">
|
<select type="text" id="espproxy" name="espproxy" class="form-control col-sm-9" required="">
|
<option value="">--请选择--</option>
|
<option th:selected="(${resMainInfo.espproxy}==0)?'true':'false'" value="0">否</option>
|
<option th:selected="(${resMainInfo.espproxy}==1)?'true':'false'" value="1">是</option>
|
</select>
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
|
<div class="col-sm-6 expiration" style="display: none">
|
<div class="control-group">
|
<label class="control-label">token持续时间</label>
|
<div class="controls input-icon">
|
<input type="text" id="expiration" name="expiration" th:value="${resMainInfo.expiration}" class="form-control col-sm-9" maxchar="50" />
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
|
|
</div>
|
</div>
|
<div class="row">
|
<div class="col-sm-12">
|
<div class="control-group">
|
<label class="control-label">帮助说明文档</label>
|
<div class="controls">
|
<!-- 加载编辑器的容器 -->
|
<script id="contents" name="contents" type="text/plain" class="col-sm-11" style="z-index: 0;" ></script>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="form-actions navbar-fixed-bottom" style="z-index: 0;">
|
<div style="float: left;">
|
<button class="btn btn-primary" id="addJKFWSave" type="button">
|
<i class="fa fa-check"></i> 保存
|
</button>
|
<button th:if="${not #lists.isEmpty(resMainInfoId)}" class="btn btn-danger" id="JKFWDelete" type="button">
|
<i class="fa fa-trash-o"></i> 删除
|
</button>
|
<button class="btn btn-warning" type="button" onclick="window.close()">
|
<i class="fa fa-remove"></i> 关闭
|
</button>
|
<button th:if="${not #lists.isEmpty(resMainInfoId) and resMainInfo.auditstatus eq 2}" class="btn btn-primary" id="copyRes" type="button" onclick="reflayerCopy()">
|
<i class="fa fa-copy"></i> 复制
|
</button>
|
</div>
|
</div>
|
</form>
|
<div id="resCopyInfo" style="display:none;padding:10px;">
|
<div class="col-sm-10">
|
<div class="control-group">
|
<label class="control-label">资源名称:</label>
|
<div class="controls input-icon">
|
<input id="copyname" name="copyname" class="form-control col-sm-10" value="" maxchar="50" />
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-10">
|
<div class="control-group">
|
<label class="control-label">服务地址:</label>
|
<div class="controls input-icon">
|
<input id="copyurl" name="copyurl" class="form-control col-sm-10" value="" maxchar="500" />
|
<span class="input-warning tooltips" data-original-title="">
|
<i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
|
</span>
|
</div>
|
</div>
|
</div>
|
<div style="margin-top:25px;float:right;">
|
<button class="btn btn-primary" onclick="copyRes()" type="button">
|
<i class="fa fa-check"></i> 保存
|
</button>
|
<button class="btn btn-warning" type="button" onclick="colseLayer()">
|
<i class="fa fa-remove"></i> 关闭
|
</button>
|
</div>
|
</div>
|
<div id="resEsbInfo" style="display:none;padding:10px;" xmlns:th="http://www.w3.org/1999/xhtml">
|
<div class="col-sm-12">
|
<div class="control-group" style="height: 55px;">
|
<label class="control-label" style="padding-right:0;">上下文地址:<br />(全局唯—,必须以/开头)</label>
|
<div class="controls input-icon">
|
<input id="contexturl" name="contexturl" class="form-control col-sm-12" value=""/>
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-12">
|
<div class="control-group">
|
<label class="control-label" style="line-height:38px;">代理服务地址:</label>
|
<div class="controls input-icon">
|
<input id="fuwuurl" name="fuwuurl" class="form-control col-sm-12" />
|
<input type="hidden" id="wsService" />
|
<input type="hidden" id="wsServiceTNS" />
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-12" id="selectPort">
|
<div class="control-group">
|
<label class="control-label" style="line-height:38px;">选择版本:</label>
|
<div class="controls input-icon">
|
<select class="form-control col-sm-12" id="wsPort">
|
</select>
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-12">
|
<div class="control-group">
|
<label class="control-label" style="line-height:38px;">TOKEN:</label>
|
<div class="controls input-icon">
|
<input id="servicetoken" readonly="readonly" name="servicetoken" class="form-control col-sm-12" />
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-12">
|
<div class="control-group">
|
<label class="control-label" style="line-height:38px;">代理前资源路径:</label>
|
<div class="controls input-icon">
|
<input id="oldserverurl" name="oldserverurl" class="form-control col-sm-12" th:value="${Res_ExtInterFaceService.oldserverurl}" />
|
</div>
|
</div>
|
</div>
|
<div class="col-sm-12">
|
<div class="control-group">
|
<label class="control-label" style="line-height:38px;">代理后资源路径:</label>
|
<div class="controls input-icon">
|
<input id="dailihouurl" readonly="readonly" name="dailihouurl" class="form-control col-sm-12" />
|
</div>
|
</div>
|
</div>
|
<input type="hidden" id="hidesbid" />
|
<div style="margin-top:25px;float:right;">
|
<button class="btn btn-primary" name="esbAgentbtn" onclick="esbSave()" type="button">
|
<i class="fa fa-check"></i> 保存
|
</button>
|
<button class="btn btn-warning" type="button" onclick="colseLayer()">
|
<i class="fa fa-remove"></i> 关闭
|
</button>
|
</div>
|
</div>
|
<script th:inline="javascript">
|
/*<![CDATA[*/
|
var resMainInfoId = [[${resMainInfoId}]];
|
/*]]>*/
|
$(function () {
|
var content = [[${content}]];
|
if(content == null) content = "";
|
cheackForm("jkfwform");
|
initEditor(content != "" ? htmlDecodeByRegExp(content) : "");
|
});
|
|
//复制弹框
|
function reflayerCopy() {
|
//弹出一个页面层
|
layer.open({
|
type: 1,
|
title: '复制',
|
shadeClose: true,
|
shade: false,
|
maxmin: false, //开启最大化最小化按钮
|
area: ['650px', '215px'],
|
content: jQuery("#resCopyInfo")
|
});
|
}
|
|
//关闭复制弹框
|
function colseLayer(){
|
$(".layui-layer-close1").click();
|
}
|
|
//实例化编辑器
|
function initEditor(content) {
|
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
|
UE.Editor.prototype.getActionUrl = function(action){
|
if(action == 'uploadimage' || action == 'uploadfile'){
|
return "/res/common/uploadueditorfile";
|
}else{
|
return this._bkGetActionUrl.call(this,action);
|
}
|
}
|
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
|
var ue = UE.getEditor('contents', {
|
toolbars: [
|
[
|
'source',
|
'undo', //撤销
|
'redo', //重做
|
'|',
|
'bold', //加粗
|
'italic', //斜体
|
'strikethrough', //删除线
|
'underline', //下划线
|
'|',
|
'forecolor', //字体颜色
|
'backcolor', //背景色
|
'|',
|
'insertorderedlist', //有序列表
|
'insertunorderedlist', //无序列表
|
'|',
|
'fontfamily', //字体
|
'fontsize', //字号
|
'|',
|
'justifyleft', //居左对齐
|
'justifyright', //居右对齐
|
'justifycenter', //居中对齐
|
'justifyjustify', //两端对齐
|
'|',
|
'link', //超链接
|
'unlink', //取消链接
|
'|',
|
'simpleupload' //单图上传
|
]
|
],
|
initialContent: content, //初始化显示内容
|
initialFrameHeight: 300, //初始化高度
|
enableAutoSave: false //是否启用自动保存
|
});
|
}
|
|
//解码
|
function htmlDecodeByRegExp(str){
|
var s = "";
|
if(str.length == 0) return "";
|
s = str.replace(/&/g,"&");
|
s = s.replace(/</g,"<");
|
s = s.replace(/>/g,">");
|
s = s.replace(/ /g," ");
|
s = s.replace(/'/g,"\'");
|
s = s.replace(/"/g,"\"");
|
return s;
|
}
|
|
var admin = [[${admin}]];
|
var auditstatus = [[${resMainInfo.auditstatus}]];
|
$('#addJKFWSave').on('click', function() {
|
var content = UE.getEditor('contents').getContent();
|
//判断当前用户是否是管理员,是管理员或是未提交的资源才可以修改资源相关信息
|
if(admin == true || auditstatus == 0 || auditstatus == null) {
|
if($('#jkfwform').valid()){
|
$('#jkfwform').ajaxSubmit({
|
url: '/res/resExtInterFaceService/insertSelectiveAndUpdate?resourceid=' +resMainInfoId,
|
type: 'post',
|
dataType: 'text',
|
data: {
|
helpurl:htmlEncodeByRegExp(content)
|
},
|
success: function (data) {
|
if(data == "1") {
|
alert("保存成功!");
|
UE.getEditor('contents').destroy();
|
// parent.FTabPages.resetTab();
|
reloadExt("ExtInterFaceService");
|
} else {
|
alert("保存失败!");
|
}
|
},
|
error: function (e) {
|
alert(e.message);
|
}
|
});
|
}
|
else {
|
// alert("您输入的信息存在错误,请更正后再提交!");
|
}
|
}
|
else {
|
alert("注销后才可以对该资源进行修改!");
|
}
|
});
|
|
//转码
|
function htmlEncodeByRegExp(str){
|
var s = "";
|
if(str.length == 0) return "";
|
s = str.replace(/&/g,"&");
|
s = s.replace(/</g,"<");
|
s = s.replace(/>/g,">");
|
s = s.replace(/ /g," ");
|
s = s.replace(/\'/g,"'");
|
s = s.replace(/\"/g,""");
|
return s;
|
}
|
|
$("#JKFWDelete").click(function() {
|
if(confirm("删除扩展信息,确定删除吗?")){
|
$.ajax({
|
url: '/res/resExtInterFaceService/deleteByPrimaryKey?resourceid=' + resMainInfoId,
|
type: 'post',
|
dataType: 'json',
|
data: {},
|
success: function (data) {
|
if (data == "1") {
|
delService();//addbydsh 2018/12/13
|
UE.getEditor('contents').destroy();
|
alert("删除成功!");
|
//parent.FTabPages.resetTab();
|
reloadExt("ExtInterFaceService");
|
} else {
|
alert("删除失败!");
|
}
|
},
|
error: function (e) {
|
alert(e.message)
|
}
|
});
|
}
|
});
|
|
//复制
|
function copyRes(){
|
if($("#copyname").val() == ""){
|
alert("资源名称不能为空!");
|
return false;
|
}
|
if($("#copyurl").val() == ""){
|
alert("服务地址不能为空!");
|
return false;
|
}
|
$.ajax({
|
url: '/res/ZiYuan/copyMainInfoAndKZ',
|
type: 'post',
|
dataType: 'json',
|
data: {
|
"resourceid":resMainInfoId,
|
"copyname":$("#copyname").val(),
|
"copyurl":$("#copyurl").val(),
|
"type":"ExtInterFaceService"
|
},
|
success: function (data) {
|
if(data != 0){
|
alert("复制成功!")
|
parent.location.href = "/res/ResManage/ResRegister/ResEdit?resMainInfoId=" + data;
|
}
|
},
|
error: function (e) {
|
alert(e.message)
|
}
|
});
|
}
|
</script>
|
<script th:inline="javascript">
|
var esbWebServiceHost = [[${esbWebServiceHost}]];
|
var esbHost = [[${esbHost}]];
|
var esbUrl = [[${esbUrl}]];
|
|
//弹出ESB代理
|
function showEsbInfo () {
|
if ($("#servertype").val() == "") {
|
alert("请选择服务分类!");
|
return false;
|
}
|
if ($("#serverurl").val() == "") {//addbydsh 2018/12/13
|
alert("请输入服务地址!");
|
return false;
|
}
|
$("#resEsbInfo input").val("");//清空文本框
|
$("[name=esbAgentbtn]").show();//按钮显示
|
var isService = $("#servertype").val() == "WebService" ? true : false;
|
var oldserverurl = $("#oldserverurl").attr("value");//代理前路径
|
layer.open({
|
type: 1,
|
title: 'ESB代理',
|
shadeClose: true,
|
shade: false,
|
maxmin: false, //开启最大化最小化按钮
|
area: ['720px', '470px'],
|
content: jQuery("#resEsbInfo")
|
});
|
$("#servicetoken").val($("#token").val());
|
var isChangeType = $("#servertype").val() != $("#hidservertype").val() ? true : false;
|
$("#oldserverurl").val(oldserverurl);
|
if (oldserverurl == "" || isChangeType || (isService && oldserverurl.indexOf("wsdl")==-1)) {
|
$("#oldserverurl").val($("#serverurl").val());
|
$("#fuwuurl").val($("#serverurl").val());
|
} else {
|
$("#fuwuurl").val(oldserverurl);
|
}
|
if ($("#hidagentserverurl").val() != "" && !isChangeType && (isService && oldserverurl.indexOf("wsdl")!=-1)) {
|
$("#fuwuurl").val($("#hidagentserverurl").val());
|
}
|
if (isService) {
|
$("#selectPort").show();
|
getWsPort($("#oldserverurl").val());
|
} else {
|
$("#selectPort").hide();
|
}
|
//上下文地址
|
if ($("#hidcontextpath").val() != "" && !isChangeType && (isService && oldserverurl.indexOf("wsdl")!=-1)) {
|
$("#contexturl").val($("#hidcontextpath").val());
|
} else {
|
if(isService) {
|
var surl = oldserverurl.indexOf("wsdl")!=-1?oldserverurl:$("#serverurl").val();
|
$("#contexturl").val("/" + resMainInfoId + "/" + surl.substring(surl.lastIndexOf('/') + 1, surl.lastIndexOf(".")));
|
}else{
|
var surl = $("#oldserverurl").val();
|
var url = surl.indexOf("//")!=-1?surl.split("://")[1].substring(surl.split("://")[1].indexOf("/"),surl.split("://")[1].length):surl.substring(surl.indexOf("/"),surl.length);
|
$("#contexturl").val((url.indexOf(resMainInfoId) != -1 ?"":("/" + resMainInfoId)) + url);
|
}
|
}
|
}
|
//ESB代理注册、更新
|
function esbSave(){
|
if ($("#contexturl").val() == "") {
|
alert("上下文地址不能为空!");
|
return false;
|
}
|
if($("#contexturl").val().substring(0,1) != "/"){
|
alert("请输入正确的上下文地址!");
|
return false;
|
}
|
var isService = $("#servertype").val() == "WebService" ? true : false;
|
if(isService && $("#wsPort").val() == ""){
|
alert("请选择版本!");
|
return false;
|
}
|
if(isService){
|
if($("#oldserverurl").val().indexOf(esbWebServiceHost) != -1){
|
alert("代理前资源路径错误,请重新输入!");
|
return false;
|
}
|
}else{
|
if($("#oldserverurl").val().indexOf(esbHost) != -1){
|
alert("代理前资源路径错误,请重新输入!");
|
return false;
|
}
|
}
|
//检验上下文地址是否唯一(若为更新,上下文地址与原来一样则不用校验)
|
if($("#esbid").val() =="" || ($("#esbid").val() != "" && $("#contexturl").val() != $("#hidcontextpath").val())){
|
$.ajax({
|
url: '/res/resExtInterFaceService/isExistContextPath',
|
type: 'post',
|
dataType: 'text',
|
data: {
|
'contextpath': deleteSprit($("#contexturl").val()),
|
},
|
success: function (data) {
|
if(data > 0){
|
alert("上下文地址已存在,请检查!");
|
return false;
|
}else{
|
submit();
|
}
|
}
|
});
|
}else{
|
submit();
|
}
|
}
|
//提交
|
function submit(){
|
var lasturl = $("#oldserverurl").val().replace($("#fuwuurl").val(), "");
|
lasturl += (lasturl.indexOf("?wsdl") == -1) ?("?wsdl"):"";
|
var newurl = "";
|
if($("#servertype").val() == "WebService"){
|
newurl = esbWebServiceHost + $("#contexturl").val() + lasturl;
|
}else{
|
newurl = esbHost + $("#contexturl").val();
|
}
|
var url = esbUrl + "/esb/";
|
var isPublic = $("#hidsharprotocol").val() == "完全公开" ? 1 : 0;
|
if($("#esbid").val() != ""){
|
if($("#servertype").val() == "WebService"){
|
url += "updateArcgisServer?esbId="+$("#esbid").val()+"&zyid="+$("#resMainInfoId").val()
|
+"&serverUrl="+encodeURI($("#oldserverurl").val()) +"&zyjc="+encodeURI($("#zyjc").val())+"&arcgisToken="
|
+encodeURI($("#servicetoken").val())+"&contextPath="+encodeURI($("#contexturl").val())+"&urlid=&sublayer=&isWS=1&wsPort="
|
+$("#wsPort").val()+"&wsService="+$("#wsService").val()+"&wsServiceTNS="+$("#wsServiceTNS").val()+"&isPublic="+isPublic;
|
}else{
|
url += "updateArcgisServer?esbId="+$("#esbid").val()+"&zyid="+$("#resMainInfoId").val()
|
+"&serverUrl="+encodeURI(deleteSprit($("#oldserverurl").val())) +"&zyjc="+encodeURI($("#zyjc").val())+"&arcgisToken="
|
+encodeURI($("#servicetoken").val())+"&contextPath="+encodeURI(deleteSprit($("#contexturl").val()))+"&urlid=&isPublic="+isPublic+"&isWS=0&sublayer=";
|
}
|
}else{
|
if($("#servertype").val() == "WebService"){
|
url += "addArcgisServer?zyid="+$("#resMainInfoId").val()+"&serverUrl="+encodeURI($("#oldserverurl").val()) +"&zyjc="+encodeURI($("#zyjc").val())
|
+"&arcgisToken="+encodeURI($("#servicetoken").val())+"&contextPath="+encodeURI($("#contexturl").val())
|
+"&urlid=&sublayer=&isWS=1&wsPort="+$("#wsPort").val()+"&wsService="+$("#wsService").val()+"&wsServiceTNS="+$("#wsServiceTNS").val()+"&isPublic="+isPublic;
|
}else{
|
url += "addArcgisServer?zyid="+$("#resMainInfoId").val()+"&serverUrl="+encodeURI(deleteSprit($("#oldserverurl").val())) +"&zyjc="+encodeURI($("#zyjc").val())
|
+"&arcgisToken="+encodeURI($("#servicetoken").val())+"&contextPath="+encodeURI(deleteSprit($("#contexturl").val()))
|
+"&urlid=&isPublic="+isPublic+"&isWS=0&sublayer=";
|
}
|
}
|
$.ajax({
|
url: url,
|
type: "GET",
|
dataType: 'jsonp',
|
callback: "callback",
|
success:function(data){
|
$("[name=esbAgentbtn]").hide();
|
if(data.result == 0){
|
var esbid = data.esbId;
|
$("#dailihouurl").val(deleteSprit(newurl));
|
$("#serverurl").val(deleteSprit(newurl));
|
updateEsbinfo(resMainInfoId,newurl,esbid);
|
}else{
|
alert($("#esbid").val() != ""?"更新失败":"注册失败");
|
}
|
},
|
error: function (e) {
|
console.log(e);
|
}
|
});
|
}
|
//获取webservice
|
function getWsPort(oldserverurl){
|
$.ajax({
|
url: "/res/webservice/getWebServiceInfo?webServiceUrl=" + oldserverurl,
|
type: 'get',
|
async: false,
|
success: function (result) {
|
if (result != "") {
|
var data = eval("(" + result + ")");
|
var wsports = data.wsports;
|
$("#wsPort").empty().append("<option value=\"\">--请选择--</option>");
|
for (var i = 0; i < wsports.split(",").length; i++) {
|
$("#wsPort").append("<option>" + wsports.split(",")[i] + "</option>");
|
}
|
$("#wsService").val(data.servicename);
|
$("#wsServiceTNS").val(data.tns);
|
}
|
},
|
error: function (e) {
|
console.log("error");
|
}
|
});
|
}
|
//更新esb信息
|
function updateEsbinfo(resMainInfoId,newurl,esbid){
|
$.ajax({
|
url: '/res/resExtInterFaceService/insertSelectiveAndUpdate?resourceid=' +resMainInfoId,
|
type: 'post',
|
data: {
|
serverurl:deleteSprit(newurl),
|
oldserverurl:deleteSprit($("#oldserverurl").val()),
|
esbid:esbid,
|
token:$("#servicetoken").val(),
|
contextpath:deleteSprit($("#contexturl").val()),
|
agentserverurl:deleteSprit($("#fuwuurl").val())
|
},
|
success: function (data) {
|
if(data == "1") {
|
alert($("#esbid").val() != ""?"更新成功":"注册成功");
|
$("#hidcontextpath").val($("#contexturl").val());
|
$("#hidagentserverurl").val($("#fuwuurl").val());
|
UE.getEditor('contents').destroy();
|
// parent.FTabPages.resetTab();
|
reloadExt("ExtInterFaceService");
|
}
|
},
|
error: function (e) {
|
alert(e.message);
|
}
|
});
|
}
|
//WEBAPI注册取掉斜杠
|
function deleteSprit(str){
|
var restr = str;
|
if(str != "" && str.length != 0 && str.substring(str.length-1,str.length) == "/"){
|
restr = str.substring(0,str.length-1);
|
}
|
return restr;
|
}
|
//删除esb服务 addbydsh 2018/12/13
|
function delService(){
|
if($("#esbid").val() != ""){
|
$.ajax({
|
url: esbUrl + "/esb/delService?esbId="+$("#esbid").val(),
|
type: "GET",
|
dataType: 'jsonp',
|
callback: "callback",
|
success:function(data){
|
console.log(data);
|
},
|
error: function (e) {
|
}
|
});
|
}
|
}
|
</script>
|