<template>
	<view class="index">
		<view class="headImg">
			<image :src="data.bjt" mode=""></image>
		</view>
		<view class="con" v-html="xmjs">
			111
		</view>
		<tabBar :pagePath="'/pages/index/index'"></tabBar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: {},
				current: 0,
				list: [

				],
				xmjs: ''
			}
		},
		onLoad(option) {
			this.configInfo()
			this.getUserInfo()
		},
		methods: {
			getUserInfo() {
				this.$http.getUserInfo().then(res => {
					if (res.data.code == 200) {
						// 是否信息完整
						if (res.data.result.completeInformation != 2) {
							// uni.navigateTo({
							// 	url: '/pages/login/perfect',
							// })
							uni.reLaunch({
								url: '/pages/login/login'
							});
						}
					}
				})
			},
			configInfo() {
				this.$http.configInfo()
					.then(res => {
						if (res.data.code == 200) {
							console.log(res)
							this.data = res.data.result
							let str = res.data.result.xmjs
							this.xmjs = str.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ').replace(/\<p>/gi, '<p style="word-break:break-all;">');
							// console.log(this.data)
						}
					})
			},
			onChange(index) {
				uniLinkTo(this.vuex_tab_page[index], 'tab')
			}
		}
	}
</script>

<style lang="scss">
	.index {
		padding-bottom: 120rpx;

		.headImg {
			width: 100%;
			height: 350rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.con {
			width: 680rpx;
			margin: 24rpx auto;
			padding: 32rpx;
			background-color: #fff;
			border-radius: 24rpx;
		}
	}
</style>