From f4184f358030bed3fb57108d47640ceeaf5ecd03 Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Fri, 15 Apr 2022 22:37:45 +0800
Subject: [PATCH] add bsc and improve code
---
src/main/resources/templates/febs/views/dapp/user.html | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/templates/febs/views/dapp/user.html b/src/main/resources/templates/febs/views/dapp/user.html
index c21037d..a3aeff9 100644
--- a/src/main/resources/templates/febs/views/dapp/user.html
+++ b/src/main/resources/templates/febs/views/dapp/user.html
@@ -28,6 +28,8 @@
<option value="1">有效</option>
</select>
</div>
+
+ <input id="copyShare" type="text" hidden />
</div>
</div>
</div>
@@ -51,7 +53,7 @@
</div>
</div>
</div>
-<script type="text/html" id="user-status">
+<script type="text/html" id="admin-status">
{{#
var status = {
1: {title: '有效', color: 'green'},
@@ -64,7 +66,8 @@
<span shiro:lacksPermission="admin:view,admin:update,admin:delete">
<span class="layui-badge-dot febs-bg-orange"></span> 无权限
</span>
- <a lay-event="del" shiro:hasPermission="admin:delete"><i class="layui-icon febs-edit-area febs-red"></i></a>
+ <a lay-event="share" shiro:hasPermission="admin:delete"><i class="layui-icon febs-edit-area febs-blue"></i></a>
+ <a lay-event="del" shiro:hasPermission="admin:delete" title="邀请链接"><i class="layui-icon febs-edit-area febs-red"></i></a>
</script>
<script data-th-inline="none" type="text/javascript">
layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
@@ -140,7 +143,7 @@
}
}
if (name === 'simulate') {
- febs.modal.open('生成模拟数据', 'dappView/admin/simulate', {
+ febs.modal.open('生成虚拟收益', 'dappView/admin/simulate', {
btn: ['提交', '重置'],
area: $(window).width() <= 750 ? '95%' : '50%',
offset: '30px',
@@ -168,7 +171,7 @@
perms: 'admin:reset'
}, {
name: 'simulate',
- title: '模拟数据',
+ title: '生成虚拟收益',
perms: 'admin:simulate'
}]
});
@@ -193,6 +196,17 @@
layer.closeAll();
}
});
+ }
+
+ if (layEvent === 'share') {
+ var url = "https://antethvip.com/?code=" + data.inviteId;
+ var $copyShare = $("#copyShare")
+ $copyShare.show();
+ $copyShare.val(url);
+ $copyShare.select();
+ document.execCommand("copy");
+ $copyShare.hide();
+ febs.alert.success('复制成功');
}
});
@@ -226,7 +240,7 @@
{type: 'checkbox'},
{field: 'username', title: '用户名', minWidth: 100},
{field: 'inviteId', title: '邀请码', minWidth: 100},
- {title: '状态', templet: '#user-status'},
+ {title: '状态', templet: '#admin-status'},
{field: 'lastLoginTime', title: '上次登录时间', minWidth: 100},
{field: 'createTime', title: '创建时间', minWidth: 180, sort: true},
{title: '操作', toolbar: '#user-option', minWidth: 140}
--
Gitblit v1.9.1