<template>
	<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
		<myNav :title="i18n.newWord.details"></myNav>
		<view class="listBox">
			<view class="height-110 flex align-center justify-between">
				<view class="height-100b flex align-center">
					<image class="width-96 height-96 radiu-50b margin-r-16" :src="obj.avatar" mode=""></image>
					<view class="height-78 flex direction-column align-start justify-between">
						<text class="font-28 bold-font">{{obj.nickname}}</text>
						<text class="font-24 color-C7C7C7 nummedium-font">{{obj.addtime}}</text>
					</view>
				</view>
				<text class="font-24 color-C7C7C7 bold-font">{{obj.look_num}}{{i18n.newWord.look}}</text>
			</view>
			
			<view class="font-28 nummedium-font padding-c-10">
				{{obj.title}}
			</view>
			<view class="nummedium-font padding-c-10" v-html="obj.content"></view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				obj:{},
				theme:''
			}
		},
		computed: {
			i18n() {
				return this.$t('message');
			},
		},
		onLoad(e) {
			this.getInfo(e.id)
		},
		onShow() {
			if (uni.getStorageSync("theme") == "dark") {
				this.theme = this.$store.state.darkTheme
			} else {
				this.theme = this.$store.state.lightTheme
			}
		},
		methods: {
			getInfo(id){
				this.post('/index/zixun_con',{
					id:id
				}).then(res => {
					console.log(res)
					if(res.code == 1){
						this.obj = res.data
					}
				})
			}
			
		}
	}
</script>

<style lang="scss">
	.listBox {
		width: 100%;
		// height: 544rpx;
		// background-color: #FFFFFF;
		margin-bottom: 8rpx;
		padding: 10rpx 24rpx;
	}
</style>
