From 17c94afc50e7957b8fd98413cdc9cbbdc4c7967a Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Thu, 18 Jul 2024 17:41:19 +0800 Subject: [PATCH] 逻辑 --- src/main/resources/templates/febs/views/dapp/member-transter.html | 41 +++++++++++++++++++++++++++-------------- 1 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/main/resources/templates/febs/views/dapp/member-transter.html b/src/main/resources/templates/febs/views/dapp/member-transter.html index d845f8f..5d8db10 100644 --- a/src/main/resources/templates/febs/views/dapp/member-transter.html +++ b/src/main/resources/templates/febs/views/dapp/member-transter.html @@ -1,4 +1,4 @@ -<div class="layui-fluid layui-anim febs-anim" id="febs-transfer" lay-title="用户划扣记录"> +<div class="layui-fluid layui-anim febs-anim" id="febs-transfer" lay-title="用户存储"> <div class="layui-row febs-container"> <div class="layui-col-md12"> <div class="layui-card"> @@ -8,8 +8,19 @@ <div class="layui-col-md10"> <div class="layui-form-item"> <div class="layui-inline"> + <label class="layui-form-label layui-form-label-sm">地址</label> <div class="layui-input-inline"> <input type="text" name="address" autocomplete="off" placeholder="输入地址" class="layui-input"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label layui-form-label-sm">存储状态</label> + <div class="layui-input-inline"> + <select name="state"> + <option value=""></option> + <option value="1">释放中</option> + <option value="2">已结束</option> + </select> </div> </div> </div> @@ -35,13 +46,14 @@ height: auto !important; } </style> - -<script type="text/html" id="transfer-option"> - {{# if(d.address.indexOf('0x') < 0) { }} - <a href="https://tronscan.io/?#/transaction/{{d.hash}}" target="_blank"><i class="layui-icon febs-edit-area febs-green"></i></a> - {{# } else { }} - <a href="https://eth.tokenview.com/cn/tx/{{d.hash}}" target="_blank"><i class="layui-icon febs-edit-area febs-green"></i></a> - {{# } }} +<script type="text/html" id="storage-state"> + {{# + var state = { + 1: {title: '释放中', color: 'green'}, + 2: {title: '已结束', color: 'blue'} + }[d.state]; + }} + <span class="layui-badge febs-bg-{{state.color}}">{{ state.title }}</span> </script> <script data-th-inline="none" type="text/javascript"> layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () { @@ -92,13 +104,14 @@ tableIns = febs.table.init({ elem: $view.find('table'), id: 'transferTable', - url: ctx + 'member/transferList', + url: ctx + 'member/storageList', + totalRow: true ,// 开启合计行 cols: [[ - {field: 'address', title: '地址', minWidth: 130}, - {field: 'amount', title: '金额', minWidth: 130}, - {field: 'hash', title: '交易hash', minWidth: 180}, + {field: 'address', title: '地址', minWidth: 130, totalRowText: '合计:'}, + {title: '存储状态', templet: '#storage-state', minWidth: 100}, + {field: 'amount', title: '存储数量', minWidth: 80,totalRow: '{{= parseInt(d.amount) }}'}, + {field: 'releaseAmount', title: '每次释放', minWidth: 80}, {field: 'createTime', title: '创建时间', minWidth: 130}, - {title: '操作', toolbar: '#transfer-option', minWidth: 140} ]] }); } @@ -106,7 +119,7 @@ function getQueryParams() { return { address: $searchForm.find('input[name="address"]').val().trim(), - invalidate_ie_cache: new Date() + state: $searchForm.find("select[name='state']").val(), }; } }) -- Gitblit v1.9.1