index2.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="width-100 height-100 view-page">
  3. <view class="p-10 dis-flex flex-y-center flex-x-between">
  4. <view class="width-100">
  5. <u-search :clearabled="true" height="35px" placeholder="请输入搜索关键字" v-model="keyword" shape="round"
  6. search="doSearch" @custom="doSearch" bg-color="#e9f0f8" placeholder-color="#65371b"></u-search>
  7. </view>
  8. </view>
  9. <view>
  10. </view>
  11. <u-tabs ref="tabs" :list="tabList" :scrollable="false" :current="currentTab" @change="tabChange" lineColor="#65371b"
  12. :activeStyle="{color:'#65371b'}" inactiveStyle="{color:'#65371b'}"></u-tabs>
  13. <view class="info-list">
  14. <view class="dis-flex flex-x-between info-item" v-for="(item, index) in 10" :key="index">
  15. <view class="info-pic"></view>
  16. <view class="info-view">
  17. <view class="info-title">
  18. 标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题
  19. </view>
  20. <view class="dis-flex info-bottom">
  21. <view style="margin-right: 20rpx;">10月07日</view>
  22. <u-icon name="thumb-up" color="#7f7f7f" size="18"></u-icon>
  23. <view style="margin-right: 20rpx;">点赞</view>
  24. <u-icon name="eye" color="#7f7f7f" size="18"></u-icon>
  25. <view>阅读量</view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import themeMixins from '@/pages/yuecai/mixins/themeMixins.js';
  34. export default {
  35. mixins: [themeMixins],
  36. data() {
  37. return {
  38. keyword: '',
  39. page: {},
  40. list: [],
  41. tabList: [{
  42. name: '专业风采'
  43. }, {
  44. name: '名菜'
  45. }, {
  46. name: '名店',
  47. }, {
  48. name: '名点',
  49. }],
  50. currentTab: 0
  51. }
  52. },
  53. onLoad(options) {},
  54. onShow() {},
  55. methods: {
  56. tabChange(index) {
  57. this.current = index;
  58. },
  59. clickInfo(index) {
  60. if (index < 0) {
  61. return;
  62. }
  63. uni.navigateTo({
  64. url: "/pages/yuecai/information/detail/index?id=" + this.bannerList[index].id,
  65. })
  66. },
  67. doSearch() {
  68. }
  69. },
  70. }
  71. </script>
  72. <style scoped lang="scss">
  73. .search-left-btn {
  74. width: 35px;
  75. min-width: 35px;
  76. height: 35px;
  77. margin-right: 5px;
  78. box-sizing: border-box;
  79. }
  80. .icon-circle {
  81. border-radius: 50%;
  82. border: 4rpx solid #65371b;
  83. display: flex;
  84. justify-content: center;
  85. align-items: center;
  86. }
  87. .nav-btns {
  88. border-bottom: 1rpx solid #65371b;
  89. margin-bottom: 20rpx;
  90. padding-bottom: 50rpx;
  91. .nav-btn {
  92. width: 150rpx;
  93. .nav-btn-icon {
  94. margin: auto;
  95. width: 110rpx;
  96. height: 110rpx;
  97. }
  98. .nav-btn-text {
  99. width: 100%;
  100. color: #65371b;
  101. margin-top: 5rpx;
  102. font-weight: bolder;
  103. text-align: center;
  104. }
  105. }
  106. }
  107. .info-list {
  108. height: calc(100% - 95px);
  109. overflow: auto;
  110. background-color: #f4f6f8;
  111. .info-item {
  112. padding: 20rpx;
  113. border-bottom: 2rpx solid white;
  114. .info-pic {
  115. width: 175rpx;
  116. height: 175rpx;
  117. background: bisque;
  118. }
  119. .info-view {
  120. width: calc(100% - 195rpx);
  121. .info-title {
  122. color: #65371b;
  123. font-size: 24rpx;
  124. font-weight: 300;
  125. line-height: 47rpx;
  126. word-spacing: 2rpx;
  127. overflow: hidden;
  128. text-overflow: -o-ellipsis-lastline;
  129. overflow: hidden;
  130. text-overflow: ellipsis;
  131. display: -webkit-box;
  132. -webkit-line-clamp: 3;
  133. line-clamp: 3;
  134. -webkit-box-orient: vertical;
  135. }
  136. .info-bottom {
  137. color: #7f7f7f;
  138. font-size: 24rpx;
  139. margin-top: 10rpx;
  140. }
  141. }
  142. }
  143. }
  144. </style>