<template>
	<view class="padding fireBashDetailWrapper">
		<view class="margin-bottom fireD-tit">{{this.getData.title}}</view>
		<view class="flex justify-between align-center">
			<view>
				<!-- <view class="cu-avatar round" style="background-image:url(../../static/fireBase.png)"></view> -->
				
				<image class=" cu-avatar round" src="/static/fireBase.png" />
				
				<text class="margin-left-sm margin-right-sm text-sm">{{this.getData.author}}</text>
				<text>{{this.getData.release_time}}</text>
			</view>
			<view style="color:#999">阅读：{{this.getData.frequency}}</view>
		</view>

		<view class="fireD-content margin-top padding-top-xs">
			<view class="">
				<view v-html="this.getData.content"></view>
			</view>
		</view>

		<view class="preAndNext" style="display:none">
			<view class="flex align-top">
				<view style="width:120rpx">上一篇：</view>
				<view style="width:calc(100% - 120rpx)">火灾逃生十大要诀</view>
			</view>
			<view class="flex align-top">
				<view style="width:120rpx">下一篇：</view>
				<view style="width:calc(100% - 120rpx)">火灾逃生十大要诀</view>
			</view>
		</view>


		<!-- <view class="share grid col-3">
			<view class="share-item align">
				<text class="icon iconfont margin-right-xs margin-left-lg">&#xe60c;</text>
				分享
			</view>
			<view class="share-item" @click="clickPraise()" :class="[praise?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg"  >&#xe62a;</text>收藏</view>
			<view class="share-item"  @click="clickZan()" :class="[zan?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg">&#xe600;</text>点赞</view>
		</view> -->




	</view>

</template>

<script>
	export default {
		data() {
			return {
				praise: false,
				zan: false,
				getData: {}
			}
		},

		onLoad: function(option) {
			this.getFireBaseDetail({
				'company_code': uni.getStorageSync('selectedCode'),
				"id": option.id
			})
			console.log('option')
			console.log(option)
			uni.setNavigationBarTitle({
				title:option.title
			});
		},

		methods: {

			// 详情页数据请求
			async getFireBaseDetail(params = {}) {
				const res = await this.$myRequest({
					url: 'KnowledgeBase/getKnowledgeBaseDetails',
					data: params,
					showLoading: true
				})
				this.getData = res.data.data[0];
				console.log(this.getData)
			},


			clickPraise() {

				this.praise = !this.praise;
			},
			clickZan() {

				this.zan = !this.zan;
			},

		}
	}
</script>

<style>

</style>
