<template>
<view>
<view class="news-details">
    <view class="header">
        
		<product-swiper :imgUrls="swiperList" ></product-swiper>
		<view class="title xl m-t-30">{{ articleDetail.name }}</view>
        <view class="row-between">
			<view class="flex lighter" style="justify-content: space-between;">
            <view class="xs">公司名称：{{ articleDetail.company }}</view>
            <view class="flex">
                <image class="icon-sm" src="/static/images/icon_see.png"></image>
                <view class="m-l-10 xs muted">{{ articleDetail.visit }}人浏览</view>
            </view>
			</view>
			<view class="xs lighter m-t-10">地区：{{ articleDetail.address }}</view>
			<view class="xs lighter m-t-10">联系方式：{{ articleDetail.contact }}</view>
        </view>
		<!-- <view class="row-between">
			
			
		   
	
		</view> -->
		<!-- <view class="flex row-between">
		    
		</view> -->
    </view>
	<view class="main">
	   简介：{{ articleDetail.intro }}
	   <u-parse  class='m-t-10' :html="article_content" />
	</view>
   <!-- <view class="main">
        
    </view> -->
</view>
<loading-view v-if="showLoading"></loading-view>
</view>
</template>

<script>

import { getTeamOrganDetail } from '@/api/community.js';

export default {
  data() {
    return {
      showLoading: true,
      articleDetail: {},
      article_content: "",
	  swiperList:[]
    };
  },

  components: {
  },
  props: {},

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.type = Number(options.type) || '';
    this.id = options.id;

    if (this.type) {
      uni.setNavigationBarTitle({
        title: '专家详情'
      });
    } else {
      uni.setNavigationBarTitle({
        title: '机构详情'
      });
    }

    this.getArticleDetailFun();
  },

 
  methods: {
    getArticleDetailFun() {
      getTeamOrganDetail({
        id: this.id
      }).then(res => {
		  
        if (res.code == 1) {
          this.articleDetail = res.data
		  this.swiperList = [{id: res.data.id,uri: res.data.image}];
          setTimeout(() => {
            this.article_content = res.data.content;
          }, 200);
          setTimeout(() => {
              this.showLoading = false
          }, 300);
        }
      });
    }

  }
};
</script>
<style lang="scss">
page {
    background-color: #fff;
}
.news-details .header{
    padding: 20rpx 30rpx;
}
.row-between{
	padding: 20rpx 14rpx;
}
.news-details .main {
    padding: 0 30rpx 60rpx;
}
.lighter {
	height: 60rpx;
	line-height: 50rpx;
	border-bottom: 1px dashed #eee;
}
</style>