seeme.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {extend name="public/base_human"/}
  2. {block name="css"}
  3. <style>
  4. .lw-list {width:90%;margin:0 auto;}
  5. .lw-item {background: #fff;box-shadow: 0 4px 8px 1px rgba(0,0,0,.03);border-radius: 6px;padding: 13px 8px;margin-top:10px;}
  6. .lw-item .title {display: flex;flex-direction: row;align-items: center;font-size:16px;font-weight: bold;}
  7. .lw-item .tel {font-size:14px;margin-top:10px;border-bottom:1px solid #ddd;padding-bottom: 10px;}
  8. .lw-item .join {display: flex;flex-direction: row;align-items: center;color:#777;font-size:14px;margin-top:10px;}
  9. .lw-item .join .flex-1{flex:1;}
  10. .lw-item .join .mobile{display: flex;flex-direction: row;align-items: center;}
  11. .lw-item .address {color:#777;font-size:14px;margin-top:10px;}
  12. .lw-item .booth {color:var(--red);font-size:16px;margin-top:10px;font-weight: bold;text-align: center;}
  13. .lw-item .tags {margin-top:10px;}
  14. .lw-item .tags .van-tag{margin-right:5px;}
  15. </style>
  16. {/block}
  17. {block name="body"}
  18. <van-sticky>
  19. <van-nav-bar
  20. class="nav-theme"
  21. :fixed="true"
  22. :placeholder="true"
  23. left-text="返回"
  24. left-arrow
  25. @click-left="onBack"
  26. >
  27. <template #title>
  28. <span class="text-white">谁看过我</span>
  29. </template>
  30. </van-nav-bar>
  31. </van-sticky>
  32. <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
  33. <van-list
  34. v-model:loading="loading"
  35. :finished="finished"
  36. finished-text="没有更多了"
  37. @load="onList"
  38. >
  39. <div class="lw-list">
  40. <div class="lw-item" v-for="item in list">
  41. <div class="title">
  42. <div style="width: 6px; height: 6px; background: #dd4250; border-radius: 50%; margin-right: 11px;"><span></span></div>
  43. <div>{{item.name}}</div>
  44. </div>
  45. <div class="join" v-if="item.join">
  46. <div class="flex-1">姓名:{{item.join}}</div>
  47. <div class="flex-1 mobile" v-if="item.join_mobile" @click="call(item.join_mobile)">
  48. <van-icon name="phone" color=" #dd4250"></van-icon>
  49. {{item.join_mobile}}
  50. </div>
  51. </div>
  52. <div class="address">
  53. 查看时间:{{item.create_time}}
  54. </div>
  55. </div>
  56. </div>
  57. </van-list>
  58. </van-pull-refresh>
  59. {/block}
  60. {block name="script"}
  61. <script>
  62. function v_setup() {
  63. let base = {};
  64. base.active = Vue.ref(0);
  65. //列表
  66. base.page = Vue.ref(1);
  67. base.loading = Vue.ref(false);
  68. base.finished = Vue.ref(false);
  69. base.refreshing = Vue.ref(false);
  70. base.list = Vue.reactive([]);
  71. base.onList = () => {
  72. let param = {};
  73. param.page = base.page.value;
  74. base.page.value++;
  75. postJson("human/listSeeme", param).then( ({data}) => {
  76. base.loading.value = false;
  77. if (base.refreshing.value) base.refreshing.value = false;
  78. if (data.length === 0) {
  79. base.finished.value = true;
  80. } else {
  81. base.list.push(...data);
  82. }
  83. });
  84. };
  85. base.onRefresh = () => {
  86. base.list = Vue.reactive([]);
  87. base.page.value = 1;
  88. base.loading.value = true;
  89. base.finished.value = false;
  90. base.onList();
  91. };
  92. base.call = (tel) => {
  93. location.href = "tel://" + tel;
  94. };
  95. base.onBack = () => {
  96. history.back();
  97. };
  98. return base;
  99. }
  100. </script>
  101. {/block}