pay.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {extend name="base"/}
  2. {block name="resources"}
  3. {/block}
  4. {block name="main"}
  5. <!-- 列表 -->
  6. <table id="pay_list" lay-filter="pay_list"></table>
  7. <!-- 支付方式 -->
  8. <script type="text/html" id="payment">
  9. <div class="table-title">
  10. <div class="title-pic">
  11. <img layer-src src="{{ns.img(d.logo.split(',')[0])}}"/>
  12. </div>
  13. <div class="title-content">
  14. {{d.pay_type_name}}
  15. </div>
  16. </div>
  17. </script>
  18. <!-- 操作 -->
  19. <script type="text/html" id="operation">
  20. <div class="table-btn">
  21. <a class="layui-btn" lay-event="edit" href="{{ns.url(d.shop_url)}}">配置</a>
  22. </div>
  23. </script>
  24. {/block}
  25. {block name="script"}
  26. <script>
  27. var table = new Table({
  28. elem: '#pay_list',
  29. url: ns.url("shop/config/pay"),
  30. page: false,
  31. parseData: function(data) { //res 即为原始返回的数据
  32. return {
  33. "code": data.code,
  34. "msg": data.message,
  35. "data": data.data,
  36. };
  37. },
  38. cols: [
  39. [{
  40. field: 'pay_type_name',
  41. title: '支付方式名称',
  42. width: '30%',
  43. unresize: 'false',
  44. templet: '#payment'
  45. }, {
  46. field: 'desc',
  47. title: '支付方式描述',
  48. width: '60%',
  49. unresize: 'false'
  50. }, {
  51. title: '操作',
  52. toolbar: '#operation',
  53. unresize: 'false',
  54. align:'right'
  55. }]
  56. ],
  57. });
  58. </script>
  59. {/block}