人人商城

service.html 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {template 'common/header'}
  2. <script type="text/javascript">
  3. require(['bootstrap.switch'], function($){
  4. $(function(){
  5. $(':checkbox').bootstrapSwitch();
  6. $(':checkbox').on('switchChange.bootstrapSwitch', function(e, state){
  7. var rids = [];
  8. $(':checkbox:checked').each(function(){
  9. rids.push($(this).val());
  10. });
  11. $.post(location.href, {'rids': rids.toString()}, function(data){
  12. console.dir(data)
  13. });
  14. });
  15. });
  16. });
  17. </script>
  18. <ul class="nav nav-tabs">
  19. <li class="active"><a href="{url 'platform/service/switch'}">常用服务接入</a></li>
  20. </ul>
  21. <div class="panel panel-default">
  22. <div class="table-responsive panel-body">
  23. <table class="table table-hover">
  24. <thead class="navbar-inner">
  25. <tr>
  26. <th style="width:100px;">服务名称</th>
  27. <th style="width:200px;">功能说明</th>
  28. <th style="width:120px;">状态</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. {loop $ds $row}
  33. <tr>
  34. <td>{$row['title']}</td>
  35. <td>{$row['description']}</td>
  36. <td>
  37. <input type="checkbox" value="{$row['rid']}" {$row['switch']}/>
  38. </td>
  39. </tr>
  40. {/loop}
  41. </tbody>
  42. </table>
  43. </div>
  44. </div>
  45. {template 'common/footer'}