index.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. .ad {display:flex;justify-content:center;align-items:center}
  14. .ad .ad-text {margin-left:5px;color:#666;}
  15. </style>
  16. </block>
  17. <block name="body">
  18. <!--轮播图-->
  19. <van-nav-bar class="bg-pink">
  20. <template #title>
  21. <span style="color:white;">首页</span>
  22. </template>
  23. </van-nav-bar>
  24. <van-swipe :autoplay="3000">
  25. <van-swipe-item v-for="(image, index) in images" :key="index">
  26. <van-image width="100%" :src="image.image"></van-image>
  27. </van-swipe-item>
  28. </van-swipe>
  29. <van-swipe style="height: 30px;background:white;" vertical :autoplay="3000" v-if="select.length > 0">
  30. <van-swipe-item class="ad" v-for="(p, index) in select" :key="index">
  31. <van-icon name="volume-o" color="#FF589B"></van-icon>
  32. <span class="ad-text">恭喜{{p.name1}}和{{p.name2}}配对成功</span>
  33. </van-swipe-item>
  34. <template #indicator>
  35. <div class="custom-indicator"></div>
  36. </template>
  37. </van-swipe>
  38. <div class="split-block"></div>
  39. <!--推荐嘉宾-->
  40. <div style="padding-top:20px;">
  41. <div class="index_title">智能推荐</div>
  42. </div>
  43. <div class="grid_list index_people">
  44. <div class="masonry">
  45. <div class="item" v-for="(item) in list">
  46. <div class="item__content">
  47. <a :href="'{:url('love/userwall/detail')}?id=' + item.id">
  48. <div class="box">
  49. <img class="image"
  50. :src="item.main_image_thumb ? item.main_image_thumb : '__TMPL__/public/assets/images/userwall/no_image_thumb.png'"/>
  51. </div>
  52. </a>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="van-list__finished-text" v-if="list.length == 0">
  57. <!--<div class="van-list__finished-text">暂无推荐,请到缘分大厅寻找缘分</div>-->
  58. <img class="no-image" src="__TMPL__/public/assets/images/no_user.png">
  59. </div>
  60. <div class="clear"></div>
  61. </div>
  62. <van-tabbar v-model="active" active-color="#FF589B" :before-change="tabbarChange">
  63. <van-tabbar-item url="{:url('portal/index/index')}">
  64. <span>首页</span>
  65. <template #icon>
  66. <van-icon name="home-o" size="25px"></van-icon>
  67. </template>
  68. </van-tabbar-item>
  69. <van-tabbar-item url="{:url('love/userwall/index')}">
  70. <span>缘份</span>
  71. <template #icon>
  72. <van-icon name="like-o" size="25px"></van-icon>
  73. </template>
  74. </van-tabbar-item>
  75. <van-tabbar-item url="{:url('love/active/index')}">
  76. <span>活动</span>
  77. <template #icon>
  78. <van-icon name="apps-o" size="25px"></van-icon>
  79. </template>
  80. </van-tabbar-item>
  81. <van-tabbar-item url="{:url('love/message/index')}" :badge="unread_num ? unread_num : ''">
  82. <span>消息</span>
  83. <template #icon>
  84. <van-icon name="comment-o" size="25px"></van-icon>
  85. </template>
  86. </van-tabbar-item>
  87. <van-tabbar-item url="{:url('love/my/index')}">
  88. <span>我的</span>
  89. <template #icon>
  90. <van-icon name="contact" size="25px"></van-icon>
  91. </template>
  92. </van-tabbar-item>
  93. </van-tabbar>
  94. </block>
  95. <block name="script">
  96. <script>
  97. new Vue({
  98. el: '#app',
  99. data() {
  100. return {
  101. images: {$images},
  102. active: 0,
  103. list: {$list},
  104. select: {$select},
  105. unread_num: {$unread_num},
  106. };
  107. },
  108. methods: {
  109. tabbarChange() {
  110. return false;
  111. },
  112. },
  113. });
  114. </script>
  115. </block>