my.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='我的' bgColor="transparent" :showback="false"></cus-header>
  4. <div class="info adffcacjc">
  5. <div class="i_avatar"></div>
  6. <div class="i_name">{{'龙傲天'}}</div>
  7. <div class="i_phone">手机号:{{'18888888888'}}</div>
  8. </div>
  9. <div class="box">
  10. <div class="tabs adf">
  11. <div class="pre" :class="{'active':tidx===1}" @tap="changeTab(1)">收藏</div>
  12. <div class="pre" :class="{'active':tidx===2}" @tap="changeTab(2)">评论</div>
  13. </div>
  14. <div class="list" :style="{'height':'calc(100vh - '+(356+mt)+'px)'}">
  15. <block v-if="tidx===1">
  16. <u-list @scrolltolower="stCollect">
  17. <u-list-item v-for="(item, index) in collectList" :key="index">
  18. <div class="l_item adfacjb">
  19. <div class="li_l">
  20. <div class="title">{{'撰写企业管理方案'}}</div>
  21. <div class="intro">{{'帮我写一篇关于企业管理的方案'}}</div>
  22. <div class="date">{{'4/25'}}</div>
  23. </div>
  24. <div class="li_r"></div>
  25. </div>
  26. </u-list-item>
  27. </u-list>
  28. </block>
  29. <block v-else-if="tidx===2">
  30. <div class="l_item" v-for="(item,index) in commentList" :key="index">
  31. </div>
  32. <u-list @scrolltolower="stComment">
  33. <u-list-item v-for="(item, index) in commentList" :key="index">
  34. </u-list-item>
  35. </u-list>
  36. </block>
  37. </div>
  38. </div>
  39. <Tabbar :tabbarIndex="2"></Tabbar>
  40. </view>
  41. </template>
  42. <script>
  43. import Tabbar from '@/components/CusTabbar/index.vue'
  44. export default {
  45. components:{ Tabbar },
  46. data(){
  47. return {
  48. tidx:1,
  49. collectList:[1],
  50. commentList:[1]
  51. }
  52. },
  53. methods:{
  54. changeTab(index){
  55. this.tidx = index;
  56. }
  57. }
  58. }
  59. </script>
  60. <style scoped lang="less">
  61. .page{
  62. box-sizing: border-box;
  63. background: linear-gradient( 270deg, #EEEFF8 0%, #F6ECF4 100%, #F6ECF4 100%);
  64. .info{
  65. width: 100%;
  66. height: 410rpx;
  67. box-sizing: border-box;
  68. padding-bottom: 64rpx;
  69. .i_avatar{
  70. width: 188rpx;
  71. height: 188rpx;
  72. border-radius: 50%;
  73. background: #FFFFFF;
  74. margin-top: 30rpx;
  75. }
  76. .i_name{
  77. font-family: PingFang-SC, PingFang-SC;
  78. font-weight: bold;
  79. font-size: 40rpx;
  80. color: #252525;
  81. line-height: 40rpx;
  82. margin-top: 40rpx;
  83. }
  84. .i_phone{
  85. font-family: PingFangSC, PingFang SC;
  86. font-weight: 400;
  87. font-size: 28rpx;
  88. color: #6B7280;
  89. line-height: 28rpx;
  90. margin-top: 20rpx;
  91. }
  92. }
  93. .box{
  94. width: 100%;
  95. border-radius: 32rpx 32rpx 0 0;
  96. background: #FFFFFF;
  97. .tabs{
  98. padding: 38rpx calc((100% - 500rpx) / 2) 40rpx;
  99. border-bottom: 1rpx solid #E5E7EB;
  100. .pre{
  101. width: 250rpx;
  102. font-family: PingFang-SC, PingFang-SC;
  103. font-weight: bold;
  104. font-size: 32rpx;
  105. color: #252525;
  106. line-height: 32rpx;
  107. text-align: center;
  108. position: relative;
  109. &.active{
  110. color: #761E6A;
  111. &::after{
  112. content:'';
  113. width: 120rpx;
  114. height: 4rpx;
  115. background: #833478;
  116. border-radius: 2rpx;
  117. position: absolute;
  118. left: 50%;
  119. margin-left: -60rpx;
  120. bottom: -40rpx;
  121. }
  122. }
  123. }
  124. }
  125. .list{
  126. overflow-y: auto;
  127. .l_item{
  128. padding: 30rpx 36rpx;
  129. border-bottom: 1rpx solid #E5E7EB;
  130. .li_l{
  131. width: calc(100% - 186rpx);
  132. .title{
  133. font-family: PingFang-SC, PingFang-SC;
  134. font-weight: bold;
  135. font-size: 32rpx;
  136. color: #252525;
  137. line-height: 32rpx;
  138. overflow: hidden;
  139. white-space: nowrap;
  140. text-overflow: ellipsis;
  141. }
  142. .intro{
  143. font-family: PingFangSC, PingFang SC;
  144. font-weight: 400;
  145. font-size: 28rpx;
  146. color: #252525;
  147. line-height: 32rpx;
  148. margin-top: 20rpx;
  149. overflow: hidden;
  150. white-space: nowrap;
  151. text-overflow: ellipsis;
  152. }
  153. .date{
  154. font-family: PingFangSC, PingFang SC;
  155. font-weight: 400;
  156. font-size: 26rpx;
  157. color: #999999;
  158. line-height: 32rpx;
  159. margin-top: 28rpx;
  160. }
  161. }
  162. .li_r{
  163. width: 166rpx;
  164. height: 166rpx;
  165. }
  166. }
  167. }
  168. }
  169. }
  170. </style>