<template>
	<view class="page">
		<cu-custom :isBack="true" title="我的机构">
		</cu-custom>
		<scroll-view scroll-x="false" scroll-y="true" :style="'height:calc(100vh -'+topHeader+'px)'">
			<view class="cu-card" v-for="ins in list" :key="ins.id">
				<view class="cu-item shadow">
						<view class="image card-img">
							<image src="/static/imgs/mine/teacher4.png" mode="widthFix" style="width:100%;"></image>
							<view class="flex card-main align-center">
								<image mode="scaleToFill" :src="ins.image||defaultAvatar" class="avatar md"></image>
								 <view class="text-xl text-white margin-left-sm">{{ins.name}}</view>
							</view>
						</view>
					  <rich-text :nodes="ins.content"></rich-text>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
import { _getInstitution } from '@/api/auth'
export default {
  data() {
    return {
      topHeader: this.globalCustomBarHeight,
      list: [],
      defaultAvatar: 'http://parent.kehoubaike.com/static/img/7f4e775d2e04234d1e1994b13146f6b.e5c47f3.png'
    }
  },
  onLoad() {
    this.get_list()
  },
  methods: {
    get_list() {
      _getInstitution().then(res => {
        this.list = res.data.edu_agency_data
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.page{
	height:100vh;
	background-color:#fff;
}
.card-img{
	position:relative;
}
.card-main{
	position:absolute;
	top:20rpx;
	left:20rpx;
}
</style>
