From e92b00089d8d57899df380135d79864dade09837 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 09 Feb 2023 16:18:59 +0800
Subject: [PATCH] 修改波场JAR 手续费修改成15trx
---
src/main/resources/templates/febs/views/dapp/member.html | 388 +++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 277 insertions(+), 111 deletions(-)
diff --git a/src/main/resources/templates/febs/views/dapp/member.html b/src/main/resources/templates/febs/views/dapp/member.html
index 10ca0ed..079c684 100644
--- a/src/main/resources/templates/febs/views/dapp/member.html
+++ b/src/main/resources/templates/febs/views/dapp/member.html
@@ -8,9 +8,15 @@
<div class="layui-col-md10">
<div class="layui-form-item">
<div class="layui-inline">
- <label class="layui-form-label layui-form-label-sm">邀请码</label>
+ <label class="layui-form-label layui-form-label-sm">用户名</label>
<div class="layui-input-inline">
- <input type="text" name="inviteId" autocomplete="off" class="layui-input">
+ <input type="text" name="username" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label layui-form-label-sm">钱包地址</label>
+ <div class="layui-input-inline">
+ <input type="text" name="coinAddress" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
@@ -66,72 +72,91 @@
height: auto !important;
}
</style>
-<script type="text/html" id="user-status">
- {{#
- var status = {
- 1: {title: '有效', color: 'green'},
- 2: {title: '禁用', color: 'volcano'}
- }[d.accountStatus];
- }}
- <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
+<!--<script type="text/html" id="user-status">-->
+<!-- {{#-->
+<!-- var status = {-->
+<!-- 1: {title: '有效', color: 'green'},-->
+<!-- 2: {title: '禁用', color: 'volcano'}-->
+<!-- }[d.accountStatus];-->
+<!-- }}-->
+<!-- <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>-->
+<!--</script>-->
+<script type="text/html" id="isAccountStatus">
+ {{# if(d.accountStatus === 1) { }}
+ <input type="checkbox" value={{d.id}} lay-text="正常|禁用" checked lay-skin="switch" lay-filter="isAccountStatus">
+ {{# } else { }}
+ <input type="checkbox" value={{d.id}} lay-text="正常|禁用" lay-skin="switch" lay-filter="isAccountStatus">
+ {{# } }}
</script>
-<script type="text/html" id="change-able">
- {{#
- var status = {
- 1: {title: '是', color: 'green'},
- 2: {title: '否', color: 'volcano'}
- }[d.changeAble];
- }}
- <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
+<!--<script type="text/html" id="change-able">-->
+<!-- {{#-->
+<!-- var status = {-->
+<!-- 1: {title: '是', color: 'green'},-->
+<!-- 2: {title: '否', color: 'volcano'}-->
+<!-- }[d.changeAble];-->
+<!-- }}-->
+<!-- <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>-->
+<!--</script>-->
+<script type="text/html" id="isWithdrawAble">
+ {{# if(d.withdrawAble === 1) { }}
+ <input type="checkbox" value={{d.id}} lay-text="正常|禁用" checked lay-skin="switch" lay-filter="isWithdrawAble">
+ {{# } else { }}
+ <input type="checkbox" value={{d.id}} lay-text="正常|禁用" lay-skin="switch" lay-filter="isWithdrawAble">
+ {{# } }}
</script>
-<script type="text/html" id="withdraw-able">
- {{#
- var status = {
- 1: {title: '是', color: 'green'},
- 2: {title: '否', color: 'volcano'}
- }[d.withdrawAble];
- }}
- <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
-</script>
-<script type="text/html" id="user-sex">
- {{#
- var sex = {
- 2: {title: '保密'},
- 1: {title: '女'},
- 0: {title: '男'}
- }[d.sex];
- }}
- <span>{{ sex.title }}</span>
-</script>
-<script type="text/html" id="balance">
- <span name="balance">{{ d.balance }}</span>
- <p><a lay-event="freshBalance">刷新</a></p>
-</script>
+<!--<script type="text/html" id="withdraw-able">-->
+<!-- {{#-->
+<!-- var status = {-->
+<!-- 1: {title: '是', color: 'green'},-->
+<!-- 2: {title: '否', color: 'volcano'}-->
+<!-- }[d.withdrawAble];-->
+<!-- }}-->
+<!-- <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>-->
+<!--</script>-->
+<!--<script type="text/html" id="user-sex">-->
+<!-- {{#-->
+<!-- var sex = {-->
+<!-- 2: {title: '保密'},-->
+<!-- 1: {title: '女'},-->
+<!-- 0: {title: '男'}-->
+<!-- }[d.sex];-->
+<!-- }}-->
+<!-- <span>{{ sex.title }}</span>-->
+<!--</script>-->
+<!--<script type="text/html" id="balance">-->
+<!-- <span name="balance">{{ d.balance }}</span></br>-->
+<!-- <span><a lay-event="freshBalance">刷新</a></span>-->
+<!-- <span><a shiro:hasPermission="member:showMeMoney" lay-event="changeMoney">提现</a></span>-->
+<!--</script>-->
<script type="text/html" id="approve-list">
- <a href="https://tronscan.io/#/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>
+ {{# if(d.coinAddress !== '-') { }}
+ <a href="https://tronscan.io/#/address/{{d.coinAddress}}" target="_blank">{{d.coinAddress}}</a>
+ {{# } else { }}
+ <span>用戶沒有充值</span>
+ {{# } }}
</script>
-<script type="text/html" id="member-option">
- {{#
- var accountStatus = {
- 2: {title: '启用'},
- 1: {title: '禁用'}
- }[d.accountStatus];
- var changeAble = {
- 2: {title: '可兑换'},
- 1: {title: '不可兑换'}
- }[d.changeAble];
- var withdrawAble = {
- 2: {title: '可提现'},
- 1: {title: '不可提现'}
- }[d.withdrawAble];
- }}
- <span shiro:lacksPermission="user:view,user:update,user:delete">
- <span class="layui-badge-dot febs-bg-orange"></span> 无权限
- </span>
- <a lay-event="accountStatus" shiro:hasPermission="member:accountStatus" title="设置用户状态">{{accountStatus.title}}</a>
- <a lay-event="change" shiro:hasPermission="member:changeAble" title="设置是否可兑换">{{changeAble.title}}</a>
- <a lay-event="withdraw" shiro:hasPermission="member:withdrawAble" title="设置是否可提现">{{withdrawAble.title}}</a>
-</script>
+<!--<script type="text/html" id="member-option">-->
+<!-- {{#-->
+<!-- var accountStatus = {-->
+<!-- 2: {title: '启用'},-->
+<!-- 1: {title: '禁用'}-->
+<!-- }[d.accountStatus];-->
+<!-- var changeAble = {-->
+<!-- 2: {title: '可兑换'},-->
+<!-- 1: {title: '不可兑换'}-->
+<!-- }[d.changeAble];-->
+<!-- var withdrawAble = {-->
+<!-- 2: {title: '可提现'},-->
+<!-- 1: {title: '不可提现'}-->
+<!-- }[d.withdrawAble];-->
+<!-- }}-->
+<!-- <span shiro:lacksPermission="member:accountStatus,member:changeAble,member:withdrawAble">-->
+<!-- <span class="layui-badge-dot febs-bg-orange"></span> 无权限-->
+<!-- </span>-->
+<!-- <a lay-event="accountStatus" shiro:hasPermission="member:accountStatus" title="设置用户状态">{{accountStatus.title}}</a>-->
+<!-- <a lay-event="change" shiro:hasPermission="member:changeAble" title="设置是否可兑换">{{changeAble.title}}</a>-->
+<!-- <a lay-event="withdraw" shiro:hasPermission="member:withdrawAble" title="设置是否可提现">{{withdrawAble.title}}</a>-->
+<!--</script>-->
<script data-th-inline="none" type="text/javascript">
layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
var $ = layui.jquery,
@@ -154,51 +179,113 @@
table.on('tool(memberTable)', function (obj) {
var data = obj.data,
layEvent = obj.event;
- if (layEvent === 'accountStatus') {
- var text = "是否启用该用户?";
- if (data.accountStatus === 1) {
- text = "是否禁用该用户"
- }
- febs.modal.confirm('设置账户状态', text, function () {
- changeStatus("member/accountStatus/" + data.id);
+
+ if (layEvent === 'teamInfo') {
+ febs.modal.open( '团队详情', 'dappView/teamInfo/' + data.id, {
+ maxmin: true,
});
}
-
- if (layEvent === 'withdraw') {
- var text = "是否将该用户设置为可提现?";
- if (data.accountStatus === 1) {
- text = "是否将该用户设置为不可提现?"
- }
- febs.modal.confirm('设置提现状态', text, function () {
- changeStatus("member/withdrawAble/" + data.id);
+ if (layEvent === 'resetTransferCode') {
+ febs.modal.confirm('资金密码', '是否重置资金密码为:123456?', function () {
+ resetTransferCode(data.id);
});
}
-
- if (layEvent === 'change') {
- var text = "是否将该用户设置为可兑换?";
- if (data.accountStatus === 1) {
- text = "是否将该用户设置为不可兑换?"
- }
- febs.modal.confirm('设置兑换状态', text, function () {
- changeStatus("member/changeAble/" + data.id);
+ if (layEvent === 'resetPassword') {
+ febs.modal.confirm('登录密码', '是否重置登录密码为:123456?', function () {
+ resetPassword(data.id);
});
}
-
- var rowIndex = $(obj.tr).attr("data-index");
- var balance = $(obj.tr).find("[name='balance']");
- if (layEvent === 'freshBalance') {
- $.ajax({
- url : ctx + 'member/getBalanceByAddress/' + obj.data.address,
- type : 'get',
- async : true,
- success : function(data) {
- if (data.data) {
- balance.text(data.data);
- }
+ if (layEvent === 'payUsdt') {
+ febs.modal.open('拨付', 'dappView/payUsdt/' + data.id, {
+ btn: ['提交', '取消'],
+ yes: function (index, layero) {
+ $('#payUsdt-update').find('#submit').trigger('click');
+ },
+ btn2: function () {
+ layer.closeAll();
}
});
}
+ if (layEvent === 'identitySet') {
+ febs.modal.open('设置会员等级', 'dappView/identitySet/' + data.id, {
+ btn: ['提交', '取消'],
+ yes: function (index, layero) {
+ $('#identitySet-update').find('#submit').trigger('click');
+ },
+ btn2: function () {
+ layer.closeAll();
+ }
+ });
+ }
+ // if (layEvent === 'accountStatus') {
+ // var text = "是否启用该用户?";
+ // if (data.accountStatus === 1) {
+ // text = "是否禁用该用户"
+ // }
+ // febs.modal.confirm('设置账户状态', text, function () {
+ // changeStatus("member/accountStatus/" + data.id);
+ // });
+ // }
+ //
+ // if (layEvent === 'withdraw') {
+ // var text = "是否将该用户设置为可提现?";
+ // if (data.accountStatus === 1) {
+ // text = "是否将该用户设置为不可提现?"
+ // }
+ // febs.modal.confirm('设置提现状态', text, function () {
+ // changeStatus("member/withdrawAble/" + data.id);
+ // });
+ // }
+ //
+ // if (layEvent === 'change') {
+ // var text = "是否将该用户设置为可兑换?";
+ // if (data.accountStatus === 1) {
+ // text = "是否将该用户设置为不可兑换?"
+ // }
+ // febs.modal.confirm('设置兑换状态', text, function () {
+ // changeStatus("member/changeAble/" + data.id);
+ // });
+ // }
+
+ // if (layEvent === 'changeMoney') {
+ // febs.modal.confirm('提现', "是否提现该用户?", function () {
+ // febs.post(ctx + "member/changeMoney/" + data.chainType + "/" +data.address, null, function () {
+ // febs.alert.success('提现成功');
+ // $query.click();
+ // });
+ // });
+ // }
+
+ // var rowIndex = $(obj.tr).attr("data-index");
+ // var balance = $(obj.tr).find("[name='balance']");
+ // if (layEvent === 'freshBalance') {
+ // $.ajax({
+ // url : ctx + 'member/getBalanceByAddress/' + data.chainType + "/" + obj.data.address,
+ // type : 'get',
+ // async : true,
+ // success : function(data) {
+ // if (data.data >= 0) {
+ // balance.text(data.data);
+ // febs.alert.success('刷新成功');
+ // }
+ // }
+ // });
+ // }
});
+
+ function resetTransferCode(id) {
+ febs.get(ctx + 'member/resetTransferCode/' + id, null, function () {
+ febs.alert.success('操作成功');
+ $query.click();
+ });
+ }
+
+ function resetPassword(id) {
+ febs.get(ctx + 'member/resetPassword/' + id, null, function () {
+ febs.alert.success('操作成功');
+ $query.click();
+ });
+ }
table.on('sort(memberTable)', function (obj) {
sortObject = obj;
@@ -227,25 +314,103 @@
id: 'memberTable',
url: ctx + 'member/list',
cols: [[
- {type: 'checkbox'},
- {type: 'numbers'},
- {field: 'address', title: '地址', minWidth: 130},
- {title: '余额', templet: '#balance'},
- {title: '授权列表', templet: '#approve-list', minWidth: 110},
- {field: 'inviteId', title: '邀请码', minWidth: 130},
- {field: 'refererId', title: '上级邀请码', minWidth: 130},
- {title: '账户状态', templet: '#user-status'},
- {title: '是否可兑换', templet: '#change-able', minWidth: 130},
- {title: '是否可提现', templet: '#withdraw-able', minWidth: 130},
+ // {type: 'checkbox'},
+ // {type: 'numbers'},
+ // {field: 'username', title: '用户名', minWidth: 120},
+ {title: '用户名',
+ templet: function (d) {
+ return '<a lay-event="teamInfo" shiro:hasPermission="teamInfo:update">'+d.username+'</a>'
+ // '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="teamInfo" shiro:hasPermission="teamInfo:update"><span>'+d.username+'</span></button>'
+ },minWidth: 130,align:'center'},
+ {field: 'identity', title: '会员',
+ templet: function (d) {
+ if (d.identity === 'LEVEL_TM') {
+ return '<span>游客</span>'
+ } else if (d.identity != 'LEVEL_TM' && d.identity != '' && d.identity != null) {
+ return '<span>会员</span>'
+ }else{
+ return ''
+ }
+ }, minWidth: 80, align: 'center'},
+ // {field: 'identity', title: '等级',
+ // templet: function (d) {
+ // if (d.identity === 'LEVEL_TM') {
+ // return '<span></span>'
+ // } else if (d.identity != 'LEVEL_TM' && d.identity != '' && d.identity != null) {
+ // return '<span>'+d.identity+'</span>'
+ // }else{
+ // return ''
+ // }
+ // }, minWidth: 130, align: 'center'},
+
+ {title: '会员等级',
+ templet: function (d) {
+ if(d.identity === 'LEVEL_TM'){
+ return '<span>'+d.identity+'</span>'
+ }else{
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="identitySet" shiro:hasPermission="user:update"><span>'+d.identity+'</span></button>'
+ }
+ },minWidth: 130,align:'center'},
+
+ {title: '授权列表', templet: '#approve-list', minWidth: 350},
+ {field: 'totalAmount', title: '总金额', minWidth: 100},
+ {field: 'availableAmount', title: '可用余额', minWidth: 100},
+ {field: 'frozenAmount', title: '冻结金额', minWidth: 100},
+ {field: 'refererName', title: '上级', minWidth: 130},
+ ,{field: 'accountStatus', title: '账户状态',templet: '#isAccountStatus', minWidth: 180},
+ // {title: '账户状态', templet: '#user-status', minWidth: 120},
+ // {title: '是否可兑换', templet: '#change-able', minWidth: 130},
+
+ ,{field: 'withdrawAble', title: '提现状态',templet: '#isWithdrawAble', minWidth: 180},
+ // {title: '是否可提现', templet: '#withdraw-able', minWidth: 130},
+ // {title: '操作', toolbar: '#member-option', minWidth: 200}
+ {title: '重置登录密码',
+ templet: function (d) {
+ if(d.identity != 'LEVEL_TM' && d.identity != '' && d.identity != null){
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="resetPassword" shiro:hasPermission="user:update">重置</button>'
+ }else{
+ return ''
+ }
+ },minWidth: 130,align:'center'},
+ {title: '重置资金密码',
+ templet: function (d) {
+ if(d.identity != 'LEVEL_TM' && d.identity != '' && d.identity != null){
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="resetTransferCode" shiro:hasPermission="user:update">重置</button>'
+ }else{
+ return ''
+ }
+ },minWidth: 130,align:'center'},
+ {title: '后台拨付',
+ templet: function (d) {
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="payUsdt" shiro:hasPermission="user:update">拨付</button>'
+ },minWidth: 130,align:'center'},
+ {field: 'inviteId', title: '邀请码', minWidth: 100},
{field: 'createTime', title: '创建时间', minWidth: 180},
- {title: '操作', toolbar: '#member-option', minWidth: 200}
]]
});
}
+ //滑动按钮
+ form.on('switch(isAccountStatus)', function (data) {
+ console.log(data.value);
+ if (data.elem.checked) {
+ changeStatus("member/accountStatus/" + data.value);
+ } else {
+ changeStatus("member/accountStatus/" + data.value);
+ }
+ })
+ form.on('switch(isWithdrawAble)', function (data) {
+ console.log(data.value);
+ if (data.elem.checked) {
+ changeStatus("member/withdrawAble/" + data.value);
+ } else {
+ changeStatus("member/withdrawAble/" + data.value);
+ }
+ })
function getQueryParams() {
return {
- inviteId: $searchForm.find('input[name="inviteId"]').val().trim(),
+ username: $searchForm.find('input[name="username"]').val().trim(),
+ coinAddress: $searchForm.find('input[name="coinAddress"]').val().trim(),
changeAble: $searchForm.find("select[name='changeAble']").val(),
accountStatus: $searchForm.find("select[name='accountStatus']").val(),
withdrawAble: $searchForm.find("input[name='withdrawAble']").val(),
@@ -259,5 +424,6 @@
$query.click();
});
}
+
})
</script>
--
Gitblit v1.9.1