Authored by bblu

修改

... ... @@ -169,44 +169,46 @@
}, {
text: "提交",
className: "btn-success",
onclick: function () {
var toSendAjaxFlag = false;
var openLimitFlow = $("#open_limit_flow_a").find("input").val();
var limitConfig = [];
$("#limit_config_a").find("input").each(function () {
var config = $(this).val();
if (undefined !== config && null !== config && "" !== config) {
limitConfig.push(config);
}
});
var limitServiceConfig = [];
$("#limit_service_config_a").find("input").each(function () {
var config = $(this).val();
if (undefined !== config && null !== config && "" !== config) {
limitServiceConfig.push(config);
}
});
if (undefined === openLimitFlow || null === openLimitFlow || "" === openLimitFlow) {
prompt("提示", "限流开关不能为空!")
} else {
toSendAjaxFlag = true;
}
if (toSendAjaxFlag) {
var param = {
openLimitFlow: openLimitFlow,
limitConfig: JSON.stringify(limitConfig),
limitServiceConfig: JSON.stringify(limitServiceConfig)
};
sendAjax("post", "viewToChangeLimitConf", param, "text", viewToChangeSuccess, errorFunc);
}
}
onclick: toSubmit
}]
}).find(".modal-body").css({
height: "650px"
});
}
function toSubmit() {
var toSendAjaxFlag = false;
var openLimitFlow = $("#open_limit_flow_a").find("input").val();
var limitConfig = [];
$("#limit_config_a").find("input").each(function () {
var config = $(this).val();
if (undefined !== config && null !== config && "" !== config) {
limitConfig.push(config);
}
});
var limitServiceConfig = [];
$("#limit_service_config_a").find("input").each(function () {
var config = $(this).val();
if (undefined !== config && null !== config && "" !== config) {
limitServiceConfig.push(config);
}
});
if (undefined === openLimitFlow || null === openLimitFlow || "" === openLimitFlow) {
prompt("提示", "限流开关不能为空!")
} else {
toSendAjaxFlag = true;
}
if (toSendAjaxFlag) {
var param = {
openLimitFlow: openLimitFlow,
limitConfig: JSON.stringify(limitConfig),
limitServiceConfig: JSON.stringify(limitServiceConfig)
};
sendAjax("post", "viewToChangeLimitConf", param, "text", viewToChangeSuccess, errorFunc);
}
}
function viewToChangeSuccess(resp) {
$(dialog1).dialog("hide");
... ...