policy1.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {extend name="public/base_jfm"/}
  2. {block name="css"}
  3. <style>
  4. .policy-item{width:90%;border:1px solid #eee;margin:20px auto 0 auto;padding:10px 10px;border-radius:10px;box-shadow: 0 0 10px #ccc;box-sizing: border-box;}
  5. .policy-header {font-size:15px;font-weight:bold;padding-bottom:10px;}
  6. .policy-footer {font-size:12px;display:flex;color:#8C8C8C;border-top:1px solid #ccc;padding-top:10px;}
  7. .policy-footer-left {white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width:calc(100% - 110px);}
  8. .policy-footer-right {margin-left:auto;width:100px;text-align:right;}
  9. </style>
  10. {/block}
  11. {block name="body"}
  12. <van-nav-bar
  13. class="nav-theme"
  14. :fixed="true"
  15. :placeholder="true"
  16. left-text="返回"
  17. left-arrow
  18. @click-left="onBack"
  19. >
  20. <template #title>
  21. <span class="text-white">服务事项</span>
  22. </template>
  23. </van-nav-bar>
  24. <div class="policy-list">
  25. <div class="policy-item" v-for="item in list" @click="toDetail(item.id)">
  26. <div class="policy-header">
  27. <van-image src="__MIMAGES__/icon_policy.png" height="14px" width="13px"></van-image>
  28. {{item.title}}
  29. </div>
  30. <div class="policy-footer">
  31. <div class="policy-footer-left">{{item.government}}</div>
  32. <div class="policy-footer-right">{{item.publish_time}}</div>
  33. </div>
  34. </div>
  35. </div>
  36. {/block}
  37. {block name="script"}
  38. <script>
  39. function v_setup() {
  40. let base = {};
  41. base.list = {$list};
  42. base.toDetail = (id) => {
  43. location.href = "{:url('jfm/policyDetail')}?id="+id;
  44. };
  45. base.onBack = () => {
  46. history.back();
  47. };
  48. return base;
  49. }
  50. </script>
  51. {/block}