me_follow.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template style="background: #F6F6F6;">
  2. <view style="width: 100%;height: 100%;padding: 20rpx 28rpx;">
  3. <u-collapse v-for="(item, index) in followList" :item-style="itemStyle" :key="index" accordion >
  4. <u-collapse-item>
  5. <!-- 标题 -->
  6. <view slot="title" style="font-size: 30rpx;">
  7. <text style="font-weight: bold;margin-right: 20rpx;">{{item.title}}</text>
  8. <text style="color: #666666;">{{item.sum}}</text>
  9. </view>
  10. <!-- 面板内容 -->
  11. <view v-for="(nitem,nindex) in item.content" style="display: flex;align-items: center;padding: 10rpx 0;">
  12. <image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png" mode="aspectFit" style="height: 68rpx;width: 68rpx;border-radius: 50%;margin-right: 20rpx;"></image>
  13. <text style="font-size: 28rpx;margin: 28rpx;color: #000000;">{{nitem.name}}</text>
  14. <text style="font-size: 28rpx;">{{nitem.position}}</text>
  15. </view>
  16. </u-collapse-item>
  17. </u-collapse>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. itemStyle: {
  25. marginBottom: '20rpx',
  26. background: '#FFFFFF',
  27. padding: '28rpx',
  28. boxshadow: '0px 2px 12px 0px rgba(0, 0, 0, 0.04)',
  29. borderRadius: '12px',
  30. },
  31. followList: [{
  32. title: '关注医生',
  33. sum: '',
  34. content: [{
  35. name: '张三',
  36. position: '牙科医生'
  37. }, {
  38. name: '张三',
  39. position: '牙科医生'
  40. }, {
  41. name: '张三',
  42. position: '牙科医生'
  43. }]
  44. }, {
  45. title: '服务包医生',
  46. sum: '',
  47. content: [{
  48. name: '张三',
  49. position: '牙科医生'
  50. }, {
  51. name: '张三',
  52. position: '牙科医生'
  53. }, {
  54. name: '张三',
  55. position: '牙科医生'
  56. }]
  57. }, {
  58. title: '关注医生',
  59. sum: '',
  60. content: [{
  61. name: '张三',
  62. position: '牙科医生'
  63. }, {
  64. name: '张三',
  65. position: '牙科医生'
  66. }, {
  67. name: '张三',
  68. position: '牙科医生'
  69. }]
  70. }, {
  71. title: '关注医生',
  72. sum: '',
  73. content: [{
  74. name: '张三',
  75. position: '牙科医生'
  76. }, {
  77. name: '张三',
  78. position: '牙科医生'
  79. }, {
  80. name: '张三',
  81. position: '牙科医生'
  82. }]
  83. }]
  84. }
  85. },
  86. methods: {
  87. //关注
  88. follow(e) {
  89. console.log(this.tcTeam[e.currentTarget.dataset.index])
  90. }
  91. },
  92. onShow() {
  93. for (var a = 0; a < this.followList.length; a++) {
  94. // console.log(this.followList[a]);
  95. this.followList[a].sum = this.followList[a].content.length
  96. console.log(this.followList[a].sum)
  97. }
  98. }
  99. }
  100. </script>
  101. <style>
  102. .list {
  103. margin-bottom: 20rpx;
  104. background-color: #FFFFFF;
  105. padding: 28rpx;
  106. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.04);
  107. border-radius: 12px;
  108. }
  109. </style>