Closed GMYXDS closed 1 year ago
function submitform(action, url, postdata) {
postsubmit = false;
switch (action) {
case 'start':
case 'stop':
case 'delete':
var langobj = languages['content']['confirm'][action];
action = (langobj[languages['current']] || langobj[languages['default']] || 'Are you sure you want to ' + action + ' it?');
if (! confirm(action)) return;
postsubmit = true;
case 'add':
case 'edit':
$.ajax({
type: "POST",
url: url,
data: postdata,
success: function (res) {
alert(langreply(res.msg));
if (res.status) {
if (postsubmit) {document.location.reload();}else{history.back(-1);}
}
}
});
case 'global':
$.ajax({
type: "POST",
url: url,
data: postdata,
success: function (res) {
alert(langreply(res.msg));
if (res.status) {
document.location.reload();
}
}
});
}
}
猜测问题可能是,触发add之后,同时走了edit 和 global
已修复
Describe the bug 点击新增客户端,会提示2次增加成功,然后然后客户端列表,发现刚才新增了2个重复的客户端
To Reproduce 如上
Expected behavior 点击新增只增加一个客户端
Screenshots or logs 无
Server (please complete the following information):
Client (please complete the following information):
Additional context 无