mining_must.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('赠送金币')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 search-collapse">
  10. <form id="role-form">
  11. <div class="select-list">
  12. <div class="form-group">
  13. <label for="ernos" class="col-sm-2 control-label">卿卿号(多个卿卿号用英文逗号分隔):</label>
  14. <div class="col-sm-10" style="margin-bottom: 20px;">
  15. <textarea class="form-control" name="erNos" id="erNos" style="height:100px;resize:none;"></textarea>
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label for="giftId" class="col-sm-2 control-label">砸蛋礼物:</label>
  20. <div class="col-sm-10" style="margin-bottom: 20px;">
  21. <select name="giftId" id="giftId" th:with="type=${gifts}">
  22. <option th:each="gift : ${type}" th:text="${gift.giftName}" th:value="${gift.giftId}"></option>
  23. </select>
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label class="col-sm-2 control-label"></label>
  28. <div class="col-sm-10">
  29. <a class="btn btn-primary btn-rounded btn-sm" onclick="querySearch()"><i class="fa fa-search"></i>&nbsp;查询</a>
  30. <a class="btn btn-warning btn-rounded btn-sm" onclick="confirmGift()"><i class="fa fa-check"></i>&nbsp;确认</a>
  31. </div>
  32. </div>
  33. </div>
  34. </form>
  35. </div>
  36. <div class="col-sm-12 select-table table-striped">
  37. <table class="table table-bordered">
  38. <thead><tr>
  39. <th style="width: 50px">头像</th>
  40. <th style="width:200px;">卿卿号</th>
  41. <th style="width:300px;">昵称</th>
  42. <th style="width:300px;">礼物Id</th>
  43. <th style="width:300px;">礼物名称</th>
  44. <th>金币</th>
  45. </tr></thead>
  46. <tbody id="tbody">
  47. </tbody>
  48. </table>
  49. </div>
  50. </div>
  51. </div>
  52. <th:block th:include="include :: footer" />
  53. <script th:inline="javascript">
  54. var prefix = ctx + "operation/mining/must";
  55. function querySearch() {
  56. if(!$('#erNos').val()){
  57. $.modal.alertError("请输入卿卿号");
  58. return;
  59. }
  60. $.operate.get(prefix + "/getUserOrGiftInfo?erNos=" + $('#erNos').val() + "&giftId=" + $("#giftId").val(),function (result) {
  61. if(result.code == 0){
  62. var str = '';
  63. for(var i=0; i < result.data.length; i++) {
  64. var bean = result.data[i];
  65. str += "<tr>\n" +
  66. " <th style=\"width: 100px\"><img src='"+bean.avatar+"' width='50'/></th>\n" +
  67. " <th style='width:200px;'>" + bean.erbanNo + "</th>\n" +
  68. " <th style='width:300px;'>" + bean.nick + "</th>\n" +
  69. " <th style='width:300px;'>" + bean.giftId + "</th>\n" +
  70. " <th style='width:300px;'>" + bean.giftName + "</th>\n" +
  71. " <th>" + bean.goldNum + "</th>\n" +
  72. " </tr>";
  73. }
  74. $('#tbody').html(str);
  75. }
  76. })
  77. }
  78. function confirmGift(){
  79. if(!$('#erNos').val()){
  80. $.modal.alertError("请输入卿卿号!");
  81. return;
  82. }
  83. var erNos = $('#erNos').val();
  84. var giftId = $('#giftId').val();
  85. $.operate.post(prefix + "/site",{"erNos":erNos,"giftId":giftId})
  86. }
  87. </script>
  88. </body>
  89. </html>