From ed3c4a0edc0fd52217541b1097408191259d60dc Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Fri, 12 Jul 2024 16:37:57 +0800
Subject: [PATCH] 逻辑

---
 src/main/resources/templates/febs/views/dapp/member.html |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/templates/febs/views/dapp/member.html b/src/main/resources/templates/febs/views/dapp/member.html
index f61da9a..faaa447 100644
--- a/src/main/resources/templates/febs/views/dapp/member.html
+++ b/src/main/resources/templates/febs/views/dapp/member.html
@@ -43,6 +43,13 @@
     <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="switchPartner">
     {{# } }}
 </script>
+<script type="text/html" id="switchAccountStatus">
+    {{# if(d.accountStatus === 1) { }}
+    <input type="checkbox" value={{d.id}} lay-text="正常|禁用" checked lay-skin="switch" lay-filter="switchAccountStatus">
+    {{# } else { }}
+    <input type="checkbox" value={{d.id}} lay-text="正常|禁用" lay-skin="switch" lay-filter="switchAccountStatus">
+    {{# } }}
+</script>
 <script data-th-inline="none" type="text/javascript">
     layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
         var $ = layui.jquery,
@@ -101,6 +108,7 @@
                     {field: 'usdtBalance', title: '额度', minWidth: 100,totalRow: '{{= parseInt(d.usdtBalance) }}'},
                     {field: 'inviteId', title: '邀请码', minWidth: 100},
                     {field: 'refererId', title: '上级邀请码', minWidth: 100},
+                    {field: 'accountStatus', title: '状态', templet:'#switchAccountStatus', minWidth: 120},
                     {field: 'nodeType', title: '节点', templet:'#switchPartner', minWidth: 120},
                     {field: 'createTime', title: '创建时间', minWidth: 180},
                 ]]
@@ -115,6 +123,21 @@
             };
         }
 
+        form.on('switch(switchAccountStatus)', function (data) {
+            if (data.elem.checked) {
+                changeAccountStatus(data.value);
+            } else {
+                changeAccountStatus(data.value);
+            }
+        })
+
+        function changeAccountStatus(id) {
+            febs.get(ctx + 'member/accountStatus/'+ id, null, function () {
+                febs.alert.success('设置成功');
+                $query.click();
+            });
+        }
+
         form.on('switch(switchPartner)', function (data) {
             if (data.elem.checked) {
                 changeIdentityYes(4, data.value);

--
Gitblit v1.9.1