fix bug
This commit is contained in:
@@ -2,13 +2,23 @@ $(function () {
|
||||
|
||||
});
|
||||
function saveStep1(e) {
|
||||
var servermqtt = $("input[name='servermqtt']").val();
|
||||
if (servermqtt === "") {
|
||||
alert("Hãy nhập thông tin!");
|
||||
return;
|
||||
}
|
||||
var url = $("input[name='url']").val();
|
||||
if (url === "") {
|
||||
alert("Hãy nhập thông tin!");
|
||||
return;
|
||||
}
|
||||
common.modalBlock(true);
|
||||
$.ajax({
|
||||
url: $(e).attr("data-href"),
|
||||
type: 'POST',
|
||||
data: {
|
||||
servermqtt: $("input[name='servermqtt']").val(),
|
||||
url: $("input[name='url']").val()
|
||||
servermqtt: servermqtt,
|
||||
url: url
|
||||
},
|
||||
success: function (data) {
|
||||
setInterval(function () {
|
||||
@@ -16,8 +26,14 @@ function saveStep1(e) {
|
||||
url: data,
|
||||
type: 'POST',
|
||||
success: function (data) {
|
||||
if (data.status)
|
||||
if (data.status) {
|
||||
window.location = data.url;
|
||||
} else {
|
||||
if (data.text !== "") {
|
||||
alert(data.text);
|
||||
window.location.reload(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
common.ajaxError();
|
||||
|
||||
Reference in New Issue
Block a user