123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template style="background: #F6F6F6;">
- <view style="width: 100%;height: 100%;padding: 20rpx 28rpx;">
- <u-collapse :item-style="itemStyle" accordion ref="collapse">
- <u-collapse-item open="true">
- <!-- 标题 -->
- <view slot="title" style="font-size: 30rpx;">
- <text style="font-weight: bold;margin-right: 20rpx;">关注医生</text>
- <text style="color: #666666;">{{followList.length}}</text>
- </view>
- <!-- 面板内容 -->
- <view v-for="(item, index) in followList" :key="index" style="display: flex;align-items: center;padding: 10rpx 0;">
- <!-- <image :src="item.docter.avatar" mode="aspectFit" style="height: 68rpx;width: 68rpx;border-radius: 50%;margin-right: 20rpx;"></image> -->
- <u-avatar :src="item.docter.avatar" mode="circle"></u-avatar>
- <text style="font-size: 28rpx;margin: 28rpx;color: #000000;">{{item.docter.name}}</text>
- <text style="font-size: 28rpx;margin-left: 10rpx;" v-for="(itm,idx) in item.docter.label_texts" :key="idx">{{itm.label_name}}</text>
- </view>
- </u-collapse-item>
- </u-collapse>
- <u-no-network></u-no-network>
- </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: [],
- pageindex: 1
- }
- },
- mounted() {
- this.getfollow()
- },
- methods: {
- //关注
- follow(e) {
- console.log(this.tcTeam[e.currentTarget.dataset.index])
- },
- getfollow: async function() {
- let res = await this.$request.post("/api/v1/collection/collectList", {
- page: this.pageindex,
- type: 1
- })
- console.log(res)
- if (res.status == 0) {
- this.followList = res.data.data
- this.$nextTick(()=>{
- this.$refs.collapse.init()
- })
- }
- }
- },
- 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>
|