123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <template style="background: #F6F6F6;">
- <view style="width: 100%;height: 100%;padding: 20rpx 28rpx;">
- <u-collapse v-for="(item, index) in followList" :item-style="itemStyle" :key="index" accordion >
- <u-collapse-item>
- <!-- 标题 -->
- <view slot="title" style="font-size: 30rpx;">
- <text style="font-weight: bold;margin-right: 20rpx;">{{item.title}}</text>
- <text style="color: #666666;">{{item.sum}}</text>
- </view>
- <!-- 面板内容 -->
- <view v-for="(nitem,nindex) in item.content" style="display: flex;align-items: center;padding: 10rpx 0;">
- <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>
- <text style="font-size: 28rpx;margin: 28rpx;color: #000000;">{{nitem.name}}</text>
- <text style="font-size: 28rpx;">{{nitem.position}}</text>
- </view>
- </u-collapse-item>
- </u-collapse>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- itemStyle: {
- marginBottom: '20rpx',
- background: '#FFFFFF',
- padding: '28rpx',
- boxshadow: '0px 2px 12px 0px rgba(0, 0, 0, 0.04)',
- borderRadius: '12px',
- },
- followList: [{
- title: '关注医生',
- sum: '',
- content: [{
- name: '张三',
- position: '牙科医生'
- }, {
- name: '张三',
- position: '牙科医生'
- }, {
- name: '张三',
- position: '牙科医生'
- }]
- }, {
- title: '服务包医生',
- sum: '',
- content: [{
- name: '张三',
- position: '牙科医生'
- }, {
- name: '张三',
- position: '牙科医生'
- }, {
- name: '张三',
- position: '牙科医生'
- }]
-
- }, {
- title: '关注医生',
- sum: '',
- content: [{
- name: '张三',
- position: '牙科医生'
- }, {
- name: '张三',
- position: '牙科医生'
- }, {
- name: '张三',
- position: '牙科医生'
- }]
-
- }, {
- title: '关注医生',
- sum: '',
- content: [{
- name: '张三',
- position: '牙科医生'
- }, {
- name: '张三',
- position: '牙科医生'
- }, {
- name: '张三',
- position: '牙科医生'
- }]
-
- }]
- }
- },
- methods: {
- //关注
- follow(e) {
- console.log(this.tcTeam[e.currentTarget.dataset.index])
- }
- },
- onShow() {
- for (var a = 0; a < this.followList.length; a++) {
- // console.log(this.followList[a]);
- this.followList[a].sum = this.followList[a].content.length
- console.log(this.followList[a].sum)
- }
- }
- }
- </script>
- <style>
- .list {
- margin-bottom: 20rpx;
- background-color: #FFFFFF;
- padding: 28rpx;
- box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.04);
- border-radius: 12px;
- }
- </style>
|