app_face.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {extend name='admin@main'}
  2. {block name="content"}
  3. <div class="think-box-shadow">
  4. <a data-dbclick class="layui-btn layui-btn-sm" data-modal='{:url("app_face_add")}'>添加皮肤</a>
  5. <table class="layui-table margin-top-10" lay-skin="line">
  6. {notempty name='list'}
  7. <thead>
  8. <tr>
  9. <th class='text-left nowrap'>ID</th>
  10. <th class='text-left nowrap'>图片</th>
  11. <th class='text-left nowrap'>创建时间</th>
  12. <th class="text-left nowrap">操作</th>
  13. </tr>
  14. </thead>
  15. {/notempty}
  16. <tbody>
  17. {foreach $list as $key=>$vo}
  18. <tr>
  19. <td class='text-left'>{$vo.id}</td>
  20. <td class='text-left'>
  21. <img data-tips-image src="{$vo.path}" style="max-width: 50px;max-height: 50px;" alt="">
  22. </td>
  23. <td class='text-left'>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
  24. <td>
  25. <a class="layui-btn layui-btn-sm layui-btn-info" data-modal='{:url("app_face_add")}?id={$vo.id}'>编辑</a>
  26. <a class="layui-btn layui-btn-sm layui-btn-danger opt-delete" data-delete='{:url("app_face_delete")}?id={$vo.id}'>删除</a>
  27. </td>
  28. </tr>
  29. {/foreach}
  30. </tbody>
  31. </table>
  32. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  33. </div>
  34. <script>
  35. $('.opt-delete').click(function (){
  36. let a=$(this)
  37. layer.confirm('确认删除吗',function (){
  38. $.post(a.data('delete'),function ({code,info}){
  39. if(code){
  40. layer.msg(info)
  41. setTimeout(()=>{
  42. location.reload()
  43. })
  44. }else{
  45. layer.alert(info)
  46. }
  47. })
  48. })
  49. })
  50. </script>
  51. {/block}