<template>
	<view class="page">
		<customHead mode='searchNav' :title='headtitle'></customHead>
		<view class="my-top">

			<!-- 用户信息 -->
			<view class="user-info">
				<view class="portrait">
					<image :src="userInfo.headIcon==null? '../../static/img/head.jpg':(BASE_URL+userinfo.headIcon)">
					</image>
				</view>
				<view class="info">
					<view class="nickname">
						<text>{{userInfo.name || userInfo.accent}}</text>
					</view>
					<view class="rank">
						<text>{{userInfo.accent}}</text>
					</view>
				</view>
				<view class="user-right">
					<image src="../../static/right.png"></image>
				</view>
			</view>
		</view>

		<view class="main">
			<view class="my-banner" @click="GoFindWork">
				<image src="../../static/my1.png" mode="widthFix"></image>
			</view>
			<view class="message-list">
				<view class="titleall-box">
					<view class="titleall-left">
						<view class="titleall-left-line"></view>服务与工具
					</view>
				</view>
				<view class="list" @click="GoFindWork">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon1.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>个人信息</text>
							</view>
						</view>
					</view>
					<view class="more">
						<text class="iconfont icon-more"></text>
					</view>
				</view>
				<view class="list" @click="GoOpinion">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon3.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>意见反馈</text>
							</view>
						</view>
					</view>
					<view class="more">
						<text class="iconfont icon-more"></text>
					</view>
				</view>
				<view class="list" @click="GetDetail('389271103194793221')">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon4.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>防骗指南</text>
							</view>
						</view>
					</view>
					<view class="more">
						<text class="iconfont icon-more"></text>
					</view>
				</view>
				<view class="list" @click="GetDetail('389270722012251397')">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon5.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>关于我们</text>
							</view>
						</view>
					</view>
					<view class="more">
						<text class="iconfont icon-more"></text>
					</view>
				</view>
				<view class="list" @click="GetDetail('389271127152657669')">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon6.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>合作单位</text>
							</view>
						</view>
					</view>
					<view class="more">
						<text class="iconfont icon-more"></text>
					</view>
				</view>
				<view class="list" @click="GetDetail('389271160438654213')">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon7.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>关注公众号</text>
							</view>
						</view>
					</view>
					<view class="more">
						<text class="iconfont icon-more"></text>
					</view>
				</view>
				<view class="list" @click="Getlogin">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon1.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>退出</text>
							</view>
						</view>
					</view>
					<view class="more">
						<text class="iconfont icon-more"></text>
					</view>
				</view>
				<view class="list" v-if="false">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon8.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>分享给朋友</text>
							</view>
						</view>
					</view>
					<view class="more">
						<text class="iconfont icon-more"></text>
					</view>
				</view>
			</view>
			<view class="my-phone">
				<view>客服电话：654564</view>
				<view>彭州市人社局监督电话：541516</view>
				<view>备案号：6556121212</view>
			</view>
		</view>
		<!-- tabbar -->
		<TabBar :tabBarShow="3"></TabBar>
	</view>
</template>

<script>
	import BASE_URL from '@/common/config.js'
	import service from '@/service/service.js'
	import customHead from "@/components/xy-customhead/xy-customhead.vue";
	import TabBar from '../../components/TabBar/TabBar.vue';
	export default {
		components: {
			TabBar,
			customHead
		},
		data() {
			return {
				BASE_URL,
				headtitle: '铭钛招聘',
				scrollTop: 0,
				isHotline: false,
				userInfo: {},
			};
		},
		onReady() {
			uni.hideTabBar();
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		onLoad() {
			this.userInfo = service.getUser();
		},
		methods: {
			Getlogin(){
				uni.navigateTo({
					url: '/pages/Login/index'
				})
			},
			GoFindWork() {
				uni.navigateTo({
					url: '/pages/FindWord/FindWord'
				})
			},
			GoOpinion() {
				uni.navigateTo({
					url: '/pages/Opinion/Opinion'
				})
			},
			/**
			 * 详情页面
			 */
			GetDetail(id) {
				uni.navigateTo({
					url: '/pages/Detail/Detail?id=' + id,
				})
			},
			/**
			 * 跳转点击
			 * @param {String} type 跳转类型
			 */
			onSkip(type) {
				switch (type) {
					case 'goods':
						uni.navigateTo({
							url: '/pages/GoodsDetails/GoodsDetails',
							animationType: 'zoom-fade-out',
							animationDuration: 200
						})
						break;
				}
			},
			/**
			 * 用户信息点击
			 * @param {Number} type
			 */
			onUserInfo() {
				uni.navigateTo({
					url: '/pages/login/login'
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	@import 'my.scss';
</style>
