/**
 * meta 参数说明
 * form:表单路由，存在或ture,也要后台配置，前端校验
 * mode:功能入口路由，存在或ture,也要后台配置，前端校验
 */
const routesGuest = [
	/***访客***/
	{
		path: '/guest',
		component: () => import('../views/Layout.vue'),
		children: [
			//邀请者
			{
				path: 'from',
				component: () => import('../views/Layout.vue'),
				children: [
					//邀请记录
					{
						path: 'list',
						name: 'GuestFromList',
						component: () => import('../views/Guest/From/List.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '邀请记录',
						}
					},
					//邀请访客
					{
						path: 'add',
						name: 'GuestFromAdd',
						component: () => import('../views/Guest/From/Add.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '邀请访客',
							form: true
						}
					},
					//邀请函详情
					{
						path: 'info',
						name: 'GuestFromInfo',
						component: () => import('../views/Guest/From/Info.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '访客详情',
						}
					},//访客审批
                    {
                        path: 'approval',
                        name: 'GuestFromApproval',
                        component: () => import('../views/Guest/From/Approval.vue'),
                        meta: {
                            requireAuth: false,
                            role: [],
                            title: '访客审批',
                        }
                    },

				]
			},
			//受邀者
			{
				path: 'to',
				component: () => import('../views/Layout.vue'),
				children: [
					//访问邀请函
					{
						path: 'info',
						name: 'GuestToInfo',
						component: () => import('../views/Guest/To/Info.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '访问邀请函',
						}
					},

				]
			},
			//扫码通行
			{
				path: 'current',
				component: () => import('../views/Layout.vue'),
				children: [
					//扫码通行
					{
						path: 'info',
						name: 'GuestCurrentInfo',
						component: () => import('../views/Guest/Current/Info.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '访问邀请函',
						}
					},

					//访客身份信息(注册)
					{
						path: 'add',
						name: 'GuestCurrentAdd',
						component: () => import('../views/Guest/Current/Add.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '访客身份信息',
						}
					},
                    //访客身份信息(注册)
                    {
                        path: 'list',
                        name: 'GuestCurrentList',
                        component: () => import('../views/Guest/Current/List.vue'),
                        meta: {
                            requireAuth: false,
                            role: [],
                            title: '访客列表',
                        }
                    },
				]
			},
		],
	}
]

export default routesGuest
