KKSU
2024-07-15 4a347c0ab4b88fd792d24d30bed36b1fa769d3a2
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);