1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
- <head>
- <th:block th:include="include :: header('赠送金币')" />
- </head>
- <body class="gray-bg">
- <div class="container-div">
- <div class="row">
- <div class="col-sm-12 search-collapse">
- <form id="role-form">
- <div class="select-list">
- <div class="form-group">
- <label for="ernos" class="col-sm-2 control-label">卿卿号(多个卿卿号用英文逗号分隔):</label>
- <div class="col-sm-10" style="margin-bottom: 20px;">
- <textarea class="form-control" name="erNos" id="erNos" style="height:100px;resize:none;"></textarea>
- </div>
- </div>
- <div class="form-group">
- <label for="giftId" class="col-sm-2 control-label">砸蛋礼物:</label>
- <div class="col-sm-10" style="margin-bottom: 20px;">
- <select name="giftId" id="giftId" th:with="type=${gifts}">
- <option th:each="gift : ${type}" th:text="${gift.giftName}" th:value="${gift.giftId}"></option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label"></label>
- <div class="col-sm-10">
- <a class="btn btn-primary btn-rounded btn-sm" onclick="querySearch()"><i class="fa fa-search"></i> 查询</a>
- <a class="btn btn-warning btn-rounded btn-sm" onclick="confirmGift()"><i class="fa fa-check"></i> 确认</a>
- </div>
- </div>
- </div>
- </form>
- </div>
-
- <div class="col-sm-12 select-table table-striped">
- <table class="table table-bordered">
- <thead><tr>
- <th style="width: 50px">头像</th>
- <th style="width:200px;">卿卿号</th>
- <th style="width:300px;">昵称</th>
- <th style="width:300px;">礼物Id</th>
- <th style="width:300px;">礼物名称</th>
- <th>金币</th>
- </tr></thead>
- <tbody id="tbody">
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <th:block th:include="include :: footer" />
- <script th:inline="javascript">
- var prefix = ctx + "operation/mining/must";
- function querySearch() {
- if(!$('#erNos').val()){
- $.modal.alertError("请输入卿卿号");
- return;
- }
- $.operate.get(prefix + "/getUserOrGiftInfo?erNos=" + $('#erNos').val() + "&giftId=" + $("#giftId").val(),function (result) {
- if(result.code == 0){
- var str = '';
- for(var i=0; i < result.data.length; i++) {
- var bean = result.data[i];
- str += "<tr>\n" +
- " <th style=\"width: 100px\"><img src='"+bean.avatar+"' width='50'/></th>\n" +
- " <th style='width:200px;'>" + bean.erbanNo + "</th>\n" +
- " <th style='width:300px;'>" + bean.nick + "</th>\n" +
- " <th style='width:300px;'>" + bean.giftId + "</th>\n" +
- " <th style='width:300px;'>" + bean.giftName + "</th>\n" +
- " <th>" + bean.goldNum + "</th>\n" +
- " </tr>";
- }
- $('#tbody').html(str);
- }
- })
- }
- function confirmGift(){
- if(!$('#erNos').val()){
- $.modal.alertError("请输入卿卿号!");
- return;
- }
- var erNos = $('#erNos').val();
- var giftId = $('#giftId').val();
- $.operate.post(prefix + "/site",{"erNos":erNos,"giftId":giftId})
- }
- </script>
- </body>
- </html>
|