guobie.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <a href="{:U('Goods/addguobie')}" class="btn btn-primary">新增</a>
  5. </div>
  6. <div class="row">
  7. <div class="col-xs-12">
  8. <div class="alert alert-block alert-success">
  9. LOGO显示在海淘首页顶部<br/>
  10. 被推荐的国别,才会在海淘页面显示。<br/>
  11. banner为国别详情列表页顶部的一张图。
  12. </div>
  13. </div>
  14. <div class="col-xs-12">
  15. <div class="table-responsive">
  16. <table class="table table-striped table-bordered table-hover">
  17. <thead>
  18. <tr>
  19. <th>ID</th>
  20. <th>名称</th>
  21. <th>LOGO</th>
  22. <th>国家标志</th>
  23. <th>是否推荐</th>
  24. <th>操作</th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. <volist name="list" id="data" empty="$empty">
  29. <tr>
  30. <td>{$data.id}</td>
  31. <td>{$data.name}</td>
  32. <td>
  33. <img src="Uploads/image/{$data.logo}" width="80" />
  34. </td>
  35. <td>
  36. <img src="Uploads/image/{$data.icon}" width="50" />
  37. </td>
  38. <td>
  39. <label class="inline">
  40. <input gid="{$data.id}" <?php if($data['is_index'] == 1){ ?> checked <?php } ?> type="checkbox" class="index_show id-pills-stacked ace ace-switch ace-switch-5">
  41. <span class="lbl middle"></span>
  42. </label>
  43. </td>
  44. <td>
  45. <a class="btn btn-xs btn-info" href='{:U("Goods/editguobie",array("id"=>$data["id"]))}'>
  46. <i class="icon-edit bigger-120"></i>
  47. </a>
  48. <a class="delete btn btn-xs btn-danger" href='{:U("Goods/delguobie",array("id"=>$data["id"]))}' >
  49. <i class="icon-trash bigger-120"></i>
  50. </a>
  51. </td>
  52. </tr>
  53. </volist>
  54. <tr>
  55. <td colspan="20" class="page">{$page}</td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. </div>
  60. </div>
  61. </div>
  62. </block>
  63. <block name="javascript">
  64. <script>
  65. $(function(){
  66. $('.index_show').on('click', function(){
  67. var gid = $(this).attr('gid');
  68. $.ajax({
  69. url:"{:U('Goods/toggle_guobie_show')}",
  70. type:'post',
  71. data:{gid:gid},
  72. dataType:'json',
  73. success:function(res){
  74. //code
  75. }
  76. })
  77. });
  78. })
  79. </script>
  80. </block>