index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <view>
  3. <u-search :showAction="true" actionText="取消"/>
  4. <!-- tab表格 -->
  5. <!-- <u-tabs v-if="isAllReply" :list="list" :is-scroll="false" :current="current" @change="change" /> -->
  6. <u-tabs :list="list" lineWidth="40" lineColor="#5992bb" :is-scroll="false" :current="current" @change="change"
  7. :activeStyle="{
  8. color: '#303133',
  9. fontWeight: 'bold',
  10. transform: 'scale(1.05)',
  11. }"
  12. :inactiveStyle="{
  13. color: '#606266',
  14. transform: 'scale(1)',
  15. }"
  16. itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;"
  17. />
  18. <view>
  19. <view class="album">
  20. <view class="album__avatar">
  21. <image src="/static/uview/common/logo.png" style="width: 32px; height: 32px"></image>
  22. </view>
  23. <view class="album__content">
  24. <u--text :text="niackName" bold size="17"></u--text>
  25. <u--text
  26. margin="0 0 8px 0"
  27. style="padding-top: 7px"
  28. text="全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水"
  29. >
  30. </u--text>
  31. <u-album :urls="urls2"></u-album>
  32. </view>
  33. </view>
  34. <view class="reply-info">
  35. <view class="reply-left">
  36. <u-icon name="red-packet" size="30px"></u-icon>
  37. <u--text :text="followNum" size="22px"></u--text>
  38. </view>
  39. <view class="reply-right">
  40. <u-icon name="thumb-up-fill" size="30px"></u-icon>
  41. <u-icon name="chat-fill" size="30px" @click="allReply"></u-icon>
  42. <u-icon name="share-fill" size="30px"></u-icon>
  43. </view>
  44. </view>
  45. </view>
  46. <view v-if="showAllCom">
  47. <view class="all-comments">
  48. <view>
  49. <u--text size="15px" text="全部评论"> </u--text>
  50. </view>
  51. <view class="comment-order">
  52. <u-subsection fontSize="15px" :list="subsectionList" :current="subsectionListCurrent" @change="changeCom"></u-subsection>
  53. </view>
  54. </view>
  55. <view class="album">
  56. <view class="album__avatar">
  57. <image src="/static/logo.png" style="width: 32px; height: 32px"></image>
  58. </view>
  59. <view class="album__content">
  60. <u--text :text="niackName" bold size="17"></u--text>
  61. <u--text
  62. margin="0 0 8px 0"
  63. style="padding-top: 9px"
  64. text="全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水"
  65. >
  66. </u--text>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. list: [{ name: '关注' }, { name: '推荐' }],
  77. current: 0,
  78. subsectionListCurrent: 0,
  79. subsectionList: ['最新', '推荐'],
  80. isAllReply: true,
  81. showAllCom: false,
  82. searching: false,
  83. isSearch: true,
  84. followNum: 111111,
  85. urls2: [
  86. 'https://cdn.uviewui.com/uview/album/1.jpg',
  87. 'https://cdn.uviewui.com/uview/album/2.jpg',
  88. 'https://cdn.uviewui.com/uview/album/3.jpg',
  89. 'https://cdn.uviewui.com/uview/album/4.jpg',
  90. 'https://cdn.uviewui.com/uview/album/5.jpg',
  91. 'https://cdn.uviewui.com/uview/album/6.jpg',
  92. 'https://cdn.uviewui.com/uview/album/7.jpg',
  93. 'https://cdn.uviewui.com/uview/album/8.jpg',
  94. 'https://cdn.uviewui.com/uview/album/9.jpg',
  95. 'https://cdn.uviewui.com/uview/album/10.jpg',
  96. ],
  97. niackName: '昵称昵称昵称',
  98. followInfo: '昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称',
  99. keyword: '123',
  100. searchCon: '',
  101. src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
  102. };
  103. },
  104. methods: {
  105. change(index) {
  106. this.current = index;
  107. },
  108. backTop() {
  109. this.isAllReply = true;
  110. this.showAllCom = true;
  111. },
  112. searchTop() {
  113. // this.isSearch = false;
  114. // this.searching = true;
  115. uni.navigateTo({
  116. url: '/client/CommunitySearch/index',
  117. });
  118. },
  119. allReply() {
  120. uni.navigateTo({
  121. url: '/client/allComments/index',
  122. });
  123. },
  124. changeCom(index) {
  125. this.subsectionListCurrent = index;
  126. },
  127. getFocus() {},
  128. cancelSearch() {
  129. this.isSearch = true;
  130. this.searching = false;
  131. },
  132. },
  133. };
  134. </script>
  135. <style lang="scss" scoped>
  136. .top-nav {
  137. width: 100%;
  138. height: 50px;
  139. display: flex;
  140. justify-content: space-between;
  141. }
  142. .nav-left {
  143. display: flex;
  144. }
  145. .left-text {
  146. font-size: 15px;
  147. padding-top: 22%;
  148. padding-left: 5px;
  149. }
  150. .album {
  151. display: flex;
  152. }
  153. .album__avatar {
  154. padding: 5px;
  155. border-radius: 3px;
  156. }
  157. .album__content {
  158. margin-left: 10px;
  159. flex: 1;
  160. }
  161. .reply-info {
  162. margin-top: 15px;
  163. margin-left: 15px;
  164. display: flex;
  165. justify-content: space-between;
  166. }
  167. .reply-left {
  168. display: flex;
  169. }
  170. .reply-right {
  171. display: flex;
  172. }
  173. .all-comments {
  174. margin: 15px 0 10px 12px;
  175. display: flex;
  176. justify-content: space-between;
  177. }
  178. .comment-order {
  179. width: 100px;
  180. }
  181. .comment-order .u-subsection__item {
  182. display: flex;
  183. justify-content: center;
  184. }
  185. .comment-order .u-subsection--button {
  186. border: 0.2px solid;
  187. border-radius: 55px;
  188. }
  189. .search-content {
  190. display: flex;
  191. }
  192. .search-tags {
  193. display: flex;
  194. justify-content: space-around;
  195. }
  196. </style>