index.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <extend name="public@base"/>
  2. <block name="css">
  3. <link rel="stylesheet" href="__TMPL__/public/assets/css/index.css?v=1">
  4. <link rel="stylesheet" href="__TMPL__/public/assets/css/userwall.css">
  5. <style>
  6. #app {
  7. padding-bottom: 50px;
  8. }
  9. .masonry {
  10. padding-top:0;
  11. }
  12. .no-image {width:100%;}
  13. </style>
  14. </block>
  15. <block name="body">
  16. <!--轮播图-->
  17. <van-nav-bar class="bg-pink">
  18. <template #title>
  19. <span style="color:white;">首页</span>
  20. </template>
  21. </van-nav-bar>
  22. <van-swipe :autoplay="3000">
  23. <van-swipe-item v-for="(image, index) in images" :key="index">
  24. <van-image width="100%" :src="image.image"></van-image>
  25. </van-swipe-item>
  26. </van-swipe>
  27. <div class="split-block"></div>
  28. <!--推荐嘉宾-->
  29. <div style="padding-top:20px;">
  30. <div class="index_title">智能推荐</div>
  31. </div>
  32. <div class="grid_list index_people">
  33. <div class="masonry">
  34. <div class="item" v-for="(item) in list">
  35. <div class="item__content">
  36. <a :href="'{:url('love/userwall/detail')}?id=' + item.id">
  37. <div class="box">
  38. <img class="image"
  39. :src="item.main_image_thumb ? item.main_image_thumb : '__TMPL__/public/assets/images/userwall/no_image_thumb.png'"/>
  40. </div>
  41. </a>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="van-list__finished-text" v-if="list.length == 0">
  46. <!--<div class="van-list__finished-text">暂无推荐,请到缘分大厅寻找缘分</div>-->
  47. <img class="no-image" src="__TMPL__/public/assets/images/no_user.png">
  48. </div>
  49. <div class="clear"></div>
  50. </div>
  51. <van-tabbar v-model="active" active-color="#FF589B" :before-change="tabbarChange">
  52. <van-tabbar-item url="{:url('portal/index/index')}">
  53. <span>首页</span>
  54. <template #icon>
  55. <van-icon name="home-o" size="25px"></van-icon>
  56. </template>
  57. </van-tabbar-item>
  58. <van-tabbar-item url="{:url('love/userwall/index')}">
  59. <span>缘份</span>
  60. <template #icon>
  61. <van-icon name="like-o" size="25px"></van-icon>
  62. </template>
  63. </van-tabbar-item>
  64. <van-tabbar-item url="{:url('love/active/index')}">
  65. <span>活动</span>
  66. <template #icon>
  67. <van-icon name="apps-o" size="25px"></van-icon>
  68. </template>
  69. </van-tabbar-item>
  70. <van-tabbar-item url="{:url('love/message/index')}" :badge="unread_num ? unread_num : ''">
  71. <span>消息</span>
  72. <template #icon>
  73. <van-icon name="comment-o" size="25px"></van-icon>
  74. </template>
  75. </van-tabbar-item>
  76. <van-tabbar-item url="{:url('love/my/index')}">
  77. <span>我的</span>
  78. <template #icon>
  79. <van-icon name="contact" size="25px"></van-icon>
  80. </template>
  81. </van-tabbar-item>
  82. </van-tabbar>
  83. </block>
  84. <block name="script">
  85. <script>
  86. new Vue({
  87. el: '#app',
  88. data() {
  89. return {
  90. images: {$images},
  91. active: 0,
  92. list: {$list},
  93. unread_num: {$unread_num},
  94. };
  95. },
  96. methods: {
  97. tabbarChange() {
  98. return false;
  99. },
  100. },
  101. });
  102. </script>
  103. </block>