<template>
	<div style="width: 100vw;">
		<tabbar></tabbar>
		<HomePage></HomePage>
	</div>
</template>

<script>

import HomePage from './components/HomePage.vue'
import My from './components/My.vue'
import { getSysUserInfoByUserIdAPI } from '../api/index'
export default {
	name: 'email',
	components: {
		HomePage,
		My
	},
	data() {
		return {
			active: 0,
		}
	},
	created() {
		console.log('走开头了============')
		// 微信网页登录
		// this.getOpenid()
	},
	mounted() {
		this.getUser()
	},
	methods: {
		my() {
			this.$router.push('My')
		},
		async getUser() {
			const res = await getSysUserInfoByUserIdAPI({ userId: localStorage.getItem("courierUserId") })
			this.$store.state.user = res.sysUserInfo
			console.log(this.$store.state.user, 'this.$state.state.user')
		}
	}
}
</script>

<style scoped lang="less"></style>
