You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
3.3 KiB
128 lines
3.3 KiB
<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 m-t-10">所属地区:{{ articleDetail.address }}</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 v-if="type == 1" class="xs lighter m-t-10">所属企业:{{ articleDetail.company }}</view>
|
|
<view class="xs lighter m-t-10">联系方式:{{ articleDetail.contact }}</view>
|
|
<view v-if="type == 1 " class="xs lighter m-t-10">专家简介:{{ articleDetail.intro }}</view>
|
|
<view v-if="type == 0 " class="xs lighter m-t-10">机构位置:{{ articleDetail.address_detail == null ? "":articleDetail.address_detail}}</view>
|
|
<view v-if="type == 0 " class="xs lighter m-t-10">检测站:{{ articleDetail.intro == null ? "":articleDetail.intro}}</view>
|
|
<view v-if="type == 0" class="xs lighter m-t-10">检测站联系方式:{{ articleDetail.company == null ? "":articleDetail.company}}</view>
|
|
<view v-if="type == 0" class="xs lighter m-t-10">检测站位置:{{ articleDetail.jcz_address == null ? "":articleDetail.jcz_address}}</view>
|
|
</view>
|
|
<!-- <view class="row-between">
|
|
|
|
|
|
|
|
|
|
</view> -->
|
|
<!-- <view class="flex row-between">
|
|
|
|
</view> -->
|
|
</view>
|
|
<view class="main">
|
|
<!-- 简介:{{ articleDetail.intro }} <br> -->
|
|
<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:[],
|
|
type:0
|
|
};
|
|
},
|
|
|
|
components: {
|
|
},
|
|
props: {},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
this.type = Number(options.type) || '';
|
|
this.id = options.id;
|
|
|
|
if (this.type) {
|
|
|
|
uni.setNavigationBarTitle({
|
|
title: '专家详情'
|
|
});
|
|
} else {
|
|
this.type = 0
|
|
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>
|