| | |
| | | <a lay-event="edit" shiro:hasPermission="user:update"><i |
| | | class="layui-icon febs-edit-area febs-blue"></i></a> |
| | | </script> |
| | | <!--<script type="text/html" id="switchIsRobot">--> |
| | | <!-- {{# if(d.isRobot === 1) { }}--> |
| | | <!-- <input type="checkbox" value={{d.userId}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchIsRobot">--> |
| | | <!-- {{# } else { }}--> |
| | | <!-- <input type="checkbox" value={{d.userId}} lay-text="是|否" lay-skin="switch" lay-filter="switchIsRobot">--> |
| | | <!-- {{# } }}--> |
| | | <!--</script>--> |
| | | <script type="text/html" id="switchGetBoom"> |
| | | {{# if(d.getBoom === 1) { }} |
| | | <input type="checkbox" value={{d.userId}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchGetBoom"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.userId}} lay-text="是|否" lay-skin="switch" lay-filter="switchGetBoom"> |
| | | {{# } }} |
| | | </script> |
| | | <style> |
| | | .layui-form-onswitch { |
| | | background-color: #5FB878 !important; |
| | |
| | | {field: 'groupRedBagNum', title: '群红包数', minWidth: 80,align:'left'}, |
| | | {field: 'redBagTotalAmount', title: '红包总额', minWidth: 80,align:'left'}, |
| | | {field: 'redBagAvaAmount', title: '未领取', minWidth: 80,align:'left'}, |
| | | // {field: 'isRobot', title: '机器人', templet: '#switchIsRobot', minWidth: 80,align:'center'}, |
| | | {field: 'getBoom', title: '中雷', templet: '#switchGetBoom', minWidth: 80,align:'center'}, |
| | | {field: 'createTime', title: '注册时间', minWidth: 180,align:'center'}, |
| | | ]] |
| | | }); |
| | |
| | | }); |
| | | } |
| | | |
| | | form.on('switch(switchIsRobot)', function (data) { |
| | | form.on('switch(switchGetBoom)', function (data) { |
| | | if (data.elem.checked) { |
| | | openSwitchIsRobot(data.value); |
| | | openSwitchGetBoom(data.value); |
| | | } else { |
| | | closeSwitchIsRobot(data.value); |
| | | closeSwitchGetBoom(data.value); |
| | | } |
| | | }) |
| | | function openSwitchIsRobot(userId) { |
| | | febs.get(ctx + 'admin/chat/openSwitchIsRobot/' + userId, null, function () { |
| | | function openSwitchGetBoom(userId) { |
| | | febs.get(ctx + 'admin/chat/openSwitchGetBoom/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | function closeSwitchIsRobot(userId) { |
| | | febs.get(ctx + 'admin/chat/closeSwitchIsRobot/' + userId, null, function () { |
| | | function closeSwitchGetBoom(userId) { |
| | | febs.get(ctx + 'admin/chat/closeSwitchGetBoom/' + userId, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $reset.click(); |
| | | }); |