android.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. {extend name="layout/content" /}
  2. {block name="header"}
  3. <title>安卓SDK版本配置表</title>
  4. <link rel="stylesheet" href="__STATIC__/css/admin/bootstrap.min.css">
  5. <style>
  6. .layui-form-item .layui-input-inline {
  7. float: none;
  8. margin-left: 10px;
  9. }
  10. .view_content{
  11. cursor: pointer;
  12. }
  13. </style>
  14. {/block}
  15. {block name="content"}
  16. <div class="x-body">
  17. <form class="layui-form">
  18. <div style="float:left">
  19. <a href="{:url('setting/sdkAdd')}" class="layui-btn "><i class="layui-icon">&#xe654;</i>新增SDK</a>
  20. </div>
  21. <div style="float: right;">
  22. <div class="layui-inline">
  23. <label>SDK版本号:</label>
  24. <div class="layui-input-inline">
  25. <input class="layui-input" name="version" value="{$Request.get.version}" autocomplete="off" placeholder="请输入版本号">
  26. </div>
  27. </div>
  28. <div class="layui-inline">
  29. <button class="layui-btn layui-btn-radius" lay-submit>查询</button>
  30. </div>
  31. </div>
  32. <table class="layui-table">
  33. <thead>
  34. <tr>
  35. <th>ID</th>
  36. <th>版本号</th>
  37. <th>构造号</th>
  38. <th>文件地址</th>
  39. <th>更新内容</th>
  40. <th>编辑时间</th>
  41. <th>创建时间</th>
  42. <th>操作</th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46. {volist name="list" id="vo"}
  47. <tr>
  48. <td>{$vo.id}</td>
  49. <td>{$vo.version}</td>
  50. <td>{$vo.num}</td>
  51. <td>{if condition="$vo.filename" }{$Think.STATIC_DOMAIN}{$vo.filename}{else}-{/if}</td>
  52. <!-- <td class="view_content" data-content="{$vo.content}">查看内容</td> -->
  53. <td>{$vo.content}</td>
  54. <td>{$vo.update_time|date='Y-m-d H:i:s',###}</td>
  55. <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
  56. <td class="td-manage">
  57. <a href="{:url('sdkedit',['id'=>$vo.id])}" class="layui-btn layui-btn-sm"><i class="layui-icon">&#xe642;</i>编辑</a>
  58. </td>
  59. </tr>
  60. {/volist}
  61. {empty name="list"}
  62. <tr>
  63. <td colspan="8">暂无数据</td>
  64. </tr>
  65. {/empty}
  66. </tbody>
  67. </table>
  68. <div class="pager-container" style="margin-top:10px;">
  69. <span>{$list->total()}条记录</span>
  70. {$page}
  71. <div class="layui-inline" style="margin:0;margin-left:10px;width:80px;">
  72. <input type="text" style="height: 30px;" class="layui-input" placeholder="跳转至" name="page" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
  73. </div>
  74. </div>
  75. </form>
  76. </div>
  77. {/block}
  78. {block name="footer"}
  79. <script>
  80. /*更新SDK*/
  81. function update_sdk(obj, url) {
  82. layer.confirm('确定要更新吗?', {shade: 0.4}, function (index) {
  83. $.getJSON(url, function (res) {
  84. if (res.code) {
  85. layer.msg(res.msg, {
  86. icon: 1,
  87. shade: 0.4,
  88. time: 1000
  89. }, function () {
  90. location.href = res.url;
  91. });
  92. } else {
  93. layer.msg(res.msg, {
  94. icon: 1,
  95. shade: 0.4,
  96. time: 1000
  97. });
  98. }
  99. });
  100. });
  101. }
  102. $('.view_content').on('click', function () {
  103. var _content = $(this).data('content');
  104. if (! _content.length) {
  105. _content = '无更新内容';
  106. }
  107. layer.open({
  108. title: '更新内容'
  109. ,content: _content
  110. });
  111. });
  112. </script>
  113. {/block}