Commit 287e6af3 by 前端

修改功能权限添加防抖

1 parent 5866eca2
......@@ -2827,6 +2827,7 @@ loadSuperiorMerchants(currentPage).then(function(list) {
}
})
var isRequestInProgress = false;
function submitAuth() {
var loadingSubmitIndex = layer.load(1, {shade: [0.5, '#fff']}); // shade属性是可选的
var accountLevel = $('#accountLevelElTab').val();
......@@ -2853,7 +2854,6 @@ loadSuperiorMerchants(currentPage).then(function(list) {
return;
}
if (!accountInfo && merchantAccountLevel == 4 && qs('status') == 1 && !merchantForm.effectiveStarttime) {
layer.msg('请去“修改基本信息”填写账户有效期', {
icon: 2
......@@ -2861,6 +2861,10 @@ loadSuperiorMerchants(currentPage).then(function(list) {
return
}
getAuthList()
if(isRequestInProgress) {
return;
}
isRequestInProgress = true;
if (requestList.length != 0) {
var params = {
merchantId: merchantId,
......@@ -2879,7 +2883,11 @@ loadSuperiorMerchants(currentPage).then(function(list) {
} else {
params.status = merchantForm.status
}
request(params, function (res) {
// 请求完成后,将标志变量设置回 false
isRequestInProgress = false;
layer.close(loadingSubmitIndex);
if (res.code == '0') {
layer.msg('操作成功', {
......
......@@ -809,7 +809,6 @@
params,
function (res) {
// 请求完成后,将标志变量设置回 false
isRequestInProgress = false;
// 关闭loading效果
layer.close(loadingIndex);
if(res.code == 0){
......@@ -823,9 +822,11 @@
updateTemplateLink(res.data, '下载失败模版', true);
}
}
}
},
)
layer.close(loadingIndex);
setTimeout(function(){
layer.close(loadingIndex);
},3000)
$(layero).find('#fileInput').on('change', function(){
var originalTemplateUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/批量创建商户导入模版.xlsx';
updateTemplateLink(originalTemplateUrl, '下载模板', false);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!