<template>
	<view class="page">
		<uni-nav-bar @clickLeft="goto(1, 1)" left-icon="back"  :border="false" :shadow="false" :fixed="true"
		:title="$t('about.title')" backgroundColor="#fff"></uni-nav-bar>
		<view style="padding: 60rpx 20rpx;">
			<view style="text-align: center;">
				<image src="/static/images/logo1.png" mode="cover" style="width: 300rpx; height: 300rpx; border: 2rpx solid #fff; border-radius: 20rpx; margin: auto;"></image>
			</view>
			<view style="font-size: 36rpx; font-weight: 600; color: #333; text-align: center; line-height: 80rpx;">MT</view>
			<view style="font-weight: 500; font-size: 28rpx; color: #999; text-align: center;">Version: {{init.version}}</view>
		</view>
		<view class="cell_list" @click="onPageJump('/pages/about/Version')">
			<view class="cell_left txt">{{$t('about.text1')}}</view>
			<view class="cell_right arrow"></view>
		</view>
		<view class="cell_list" @click="onPageJump('/pages/about/details?id=service_agreement')">
			<view class="cell_left txt">{{$t('about.text2')}}</view>
			<view class="cell_right arrow"></view>
		</view>
		<view class="cell_list" @click="onPageJump('/pages/about/details?id=aboutus')">
			<view class="cell_left txt">{{$t('about.text3')}}</view>
			<view class="cell_right arrow"></view>
		</view>

	</view>
</template>

<script>
	import zPrompt from '@/components/common/prompt';
	import Popup from '@/components/common/popup';
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		components: {
			Popup,
			zPrompt
		},
		data() {
			return {
				list:[],
				init: {}
			};
		},
		computed: {
		},
		//第一次加载
		onLoad(e) {
			this.getabout();
			this.$http.get('/api/common/init?lang=' + this.$i18n.locale).then(res => {
				this.init = res.data;
			});
		},
		//页面显示
		onShow() {},
		//方法
		methods: {
			...mapMutations(['setUserInfo']),
			getabout(){
				let data = {
					category_id: 8,
					page: 1,
					limit: 1,
					lang: this.$i18n.locale
				}
				this.$http.post('/api/article/list', data).then(res => {
					if(res.code == 0){
						this.list = res.data.data.filter(item => item.status == 1);
					}
				});
			},
			goto(url, type) {
			    if (type == 2) {
			        return uni.switchTab({ url: url })
			    }
			    if (type == 1) {
			        return uni.navigateBack({ delta: url });
			    }
			    uni.navigateTo({
			        url: url
			    })
			},
			onPageJump(url) {
				uni.navigateTo({
					url: url
				});
			},
			onTokenJump(url) {
				this.judgeLogin(() => {
					uni.navigateTo({
						url: url
					});
				});
			},
			handleClose(done) {
				this.dialogVisible = false;
			}
		},
		//页面隐藏
		onHide() {},
		//页面卸载
		onUnload() {},
		//页面下来刷新
		onPullDownRefresh() {},
		//页面上拉触底
		onReachBottom() {},
		//用户点击分享
		onShareAppMessage(e) {
			return this.wxShare();
		}
	};
</script>
<style lang="scss" scoped>
	@import '@/style/mixin.scss';
	body{background-color: #F8F8F8;}
	.page{min-height: 100vh;position: relative; background-color: #F8F8F8;}
	.cell_list {
		padding: 40rpx 30rpx;
		margin: 0rpx 30rpx;
		border-bottom: 2rpx solid #ddd;
	}
	.txt{
		font-weight: 500;
		font-size: 32rpx;
		color: #3d3d3d
	}
	.cell_right image {
		width: 140rpx;
		height: 140rpx;
		border-radius: 50%;
	}
</style>