From e7a01b236a9f6bee3616ddf2d1d88ada738490a9 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期二, 08 十一月 2022 10:15:28 +0800 Subject: [PATCH] # --- src/main/webapp/views/cstmr/cstmr_more.html | 49 ++++++++++++++++++++++++++++++------------------- 1 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/main/webapp/views/cstmr/cstmr_more.html b/src/main/webapp/views/cstmr/cstmr_more.html index 08c2e05..b0cd688 100644 --- a/src/main/webapp/views/cstmr/cstmr_more.html +++ b/src/main/webapp/views/cstmr/cstmr_more.html @@ -328,26 +328,37 @@ // 琛ㄥ崟鎻愪氦浜嬩欢 form.on('submit(followerSubmit)', function (data) { let selectList = xmSelectIdx.getValue(); - for (let i = 0; i<selectList.length; i++) { - let item = selectList[i]; - // 鏌ヨ鐗╂枡璇︽儏 - // $.ajax({ - // url: baseUrl+"/mat/covert/"+item.value+"/auth", - // headers: {'token': localStorage.getItem('token')}, - // method: 'GET', - // async: false, - // success: function (res) { - // if (res.code === 200){ - // xxDataList.push(res.data); - // insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); - // } else if (res.code === 403){ - // top.location.href = baseUrl+"/"; - // }else { - // layer.msg(res.msg, {icon: 2}) - // } - // } - // }) + if (selectList.length === 0) { + layer.msg("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�", {icon: 3}); + return false; } + console.log(JSON.stringify({ + cstmrId: cstmrId, + followerIds: selectList.map(function (d) { + return d.value; + }) + })) + $.ajax({ + url: baseUrl+"/cstmr/followers/add/auth", + headers: {'token': localStorage.getItem('token')}, + data: { + cstmrId: cstmrId, + followerIds: selectList.map(function (d) { + return d.value; + }) + }, + method: 'POST', + success: function (res) { + if (res.code === 200){ + layer.msg(res.msg, {icon: 1}) + // insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + }else { + layer.msg(res.msg, {icon: 2}) + } + } + }) layer.close(dIndex); return false; }); -- Gitblit v1.9.1