/**
 * meta 参数说明
 * form:表单路由，存在或ture,也要后台配置，前端校验
 * mode:功能入口路由，存在或ture,也要后台配置，前端校验
 */
const routesMaster = [
	/***主人***/
	{
		path: '/master',
		component: () => import('../views/Layout.vue'),
		children: [
			//主页
			{
				path: '',
				name: 'Master',
				component: () => import('../views/Master/Home.vue'),
				meta: {
					requireAuth: false,
					role: [],
					title: '主人主页',
				}
			},
			//所有功能
			{
				path: 'allFun',
				name: 'MasterAllFun',
				component: () => import('../views/Master/AllFun.vue'),
				meta: {
					requireAuth: false,
					role: [],
					title: '所有功能',
				}
			},
			//主页长者模式
			{
				path: 'homeBigFont',
				name: 'MasterHomeBigFont',
				component: () => import('../views/Master/HomeBigFont.vue'),
				meta: {
					requireAuth: false,
					role: [],
					title: '主页长者模式',
				}
			},
			//切换角色
			{
				path: 'exchangeRole',
				name: 'MasterExchangeRole',
				component: () => import('../views/Master/ExchangeRole.vue'),
				meta: {
					requireAuth: false,
					role: [],
					title: '切换角色',
				}
			},

			//我的
			{
				path: 'mine',
				component: () => import('../views/Layout.vue'),
				children: [
					//个人中心
					{
						path: 'center',
						name: 'MasterMineCenter',
						component: () => import('../views/Master/Mine/Center.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '个人中心',
						}
					},
					//消息
					{
						path: 'message',
						name: 'MasterMineMessage',
						component: () => import('../views/Master/Mine/Message.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '消息',
						}
					},
					//修改个人信息
					{
						path: 'editInfo',
						name: 'MasterMineEditInfo',
						component: () => import('../views/Master/Mine/EditInfo.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '修改个人信息',
						}
					},
					//设置
					{
						path: 'config',
						name: 'MasterMineConfig',
						component: () => import('../views/Master/Mine/Config.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '设置',
						}
					},
					//绑定手机
					{
						path: 'bindPhone',
						name: 'MasterMineBindPhone',
						component: () => import('../views/Master/Mine/BindPhone.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '绑定手机',
						}
					},
					//关于小鹏管家
					{
						path: 'about',
						name: 'MasterMineAbout',
						component: () => import('../views/Master/Mine/About.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '关于小鹏管家',
						}
					},
					//问题反馈
					{
						path: 'feedback',
						name: 'MasterMineFeedback',
						component: () => import('../views/Master/Mine/Feedback.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '问题反馈',
						}
					},


					//我的账单
					{
						path: 'bill',
						component: () => import('../views/Layout.vue'),
						children: [
							//账单缴费
							{
								path: 'pay',
								name: 'MasterMineBillPay',
								component: () => import('../views/Master/Mine/Bill/Pay.vue'),
								meta: {
									requireAuth: false,
									role: [],
									title: '账单缴费',
								}
							},
							//账单列表
							{
								path: 'list',
								name: 'MasterMineBillList',
								component: () => import('../views/Master/Mine/Bill/List.vue'),
								meta: {
									requireAuth: false,
									role: [],
									title: '账单列表',
								}
							},
							//账单记录
							{
								path: 'record',
								name: 'MasterMineBillRecord',
								component: () => import('../views/Master/Mine/Bill/Record.vue'),
								meta: {
									requireAuth: false,
									role: [],
									title: '账单记录',
								}
							},
							//账单详情
							{
								path: 'info',
								name: 'MasterMineBillInfo',
								component: () => import('../views/Master/Mine/Bill/Info.vue'),
								meta: {
									requireAuth: false,
									role: [],
									title: '账单详情',
								}
							},
						],
					},

					//我的订单
					{
						path: 'order',
						component: () => import('../views/Layout.vue'),
						children: [
							//订单列表
							{
								path: 'list',
								name: 'MasterMineOrderList',
								component: () => import('../views/Master/Mine/Order/List.vue'),
								meta: {
									requireAuth: false,
									role: [],
									title: '订单列表',
								}
							},
							//订单详情
							{
								path: 'info',
								name: 'MasterMineOrderInfo',
								component: () => import('../views/Master/Mine/Order/Info.vue'),
								meta: {
									requireAuth: false,
									role: [],
									title: '订单详情',
								}
							},
						],
					},
				],
			},

			//健康手环
			{
				path: 'health',
				component: () => import('../views/Layout.vue'),
				children: [
					//健康档案
					{
						path: 'archives',
						name: 'MasterHealthArchives',
						component: () => import('../views/Master/Health/Archives.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '健康档案',
							mode: true
						}
					},
					//参数详情
					{
						path: 'chart',
						name: 'MasterHealthChart',
						component: () => import('../views/Master/Health/Chart.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '参数详情',
						}
					},
					//坐标地图轨迹详情
					{
						path: 'chartMap',
						name: 'MasterHealthChartMap',
						component: () => import('../views/Master/Health/ChartMap.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '坐标地图轨迹详情',
						}
					},
					//预警参数设置
					{
						path: 'warningSet',
						name: 'MasterHealthWarningSet',
						component: () => import('../views/Master/Health/WarningSet.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '预警参数设置',
						}
					},
				],
			},

			//服务
			{
				path: 'serve',
				component: () => import('../views/Layout.vue'),
				children: [
					//服务主页
					{
						path: '',
						name: 'MasterServe',
						component: () => import('../views/Master/Serve/Home.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '服务主页',
							mode: true
						}
					},
				],
			},

			//我的亲属
			{
				path: 'relatives',
				component: () => import('../views/Layout.vue'),
				children: [
					//亲属列表
					{
						path: '',
						name: 'MasterRelatives',
						component: () => import('../views/Master/Relatives/Home.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '亲属列表',
							mode: true
						}
					},
					//亲属详情
					{
						path: 'info',
						name: 'MasterRelativesInfo',
						component: () => import('../views/Master/Relatives/Info.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '亲属详情',
						}
					},
				],
			},

			//就医记录
			{
				path: 'hospital',
				component: () => import('../views/Layout.vue'),
				children: [
					//就医记录
					{
						path: '',
						name: 'MasterHospital',
						component: () => import('../views/Master/Hospital/Home.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '就医记录主页',
							mode: true
						}
					},
					//就医记录新增编辑记录
					{
						path: 'form',
						name: 'MasterHospitalForm',
						component: () => import('../views/Master/Hospital/Form.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '就医记录新增编辑记录',
							form: true
						}
					},
					//编辑就医档案
					{
						path: 'archives',
						name: 'MasterHospitalArchives',
						component: () => import('../views/Master/Hospital/Archives.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '编辑就医档案',
						}
					},
				],
			},

			//用药提醒
			{
				path: 'drug',
				component: () => import('../views/Layout.vue'),
				children: [
					//用药提醒
					{
						path: '',
						name: 'MasterDrug',
						component: () => import('../views/Master/Drug/Home.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '用药提醒',
							mode: true
						}
					},
					//添加用药提醒
					{
						path: 'add',
						name: 'MasterDrugAdd',
						component: () => import('../views/Master/Drug/Add.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '用药提醒',
						}
					},
					//添加用药提醒完成
					{
						path: 'addSuccess',
						name: 'MasterDrugAddSuccess',
						component: () => import('../views/Master/Drug/AddSuccess.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '添加用药提醒完成',
						}
					},
				],
			},

			//用户相关
			{
				path: 'user',
				component: () => import('../views/Layout.vue'),
				children: [
					//我的二维码
					{
						path: 'myCode',
						name: 'MasterUserMyCode',
						component: () => import('../views/Master/User/MyCode.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '我的二维码',
							mode: true
						}
					},
					//关联长者,未注册第一步,这里不能配限制权限，开放
					{
						path: 'relationPersonRegister',
						name: 'MasterUserRelationPersonRegister',
						component: () => import('../views/Master/User/RelationPersonRegister.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '关联长者,未注册第一步',
						}
					},
					//关联长者,已注册,这里不能配限制权限，开放，入口页不能配
					{
						path: 'relationPerson',
						name: 'MasterUserRelationPerson',
						component: () => import('../views/Master/User/RelationPerson.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '关联长者,已注册',
						}
					},
				],
			},

			//直播
			{
				path: 'live',
				component: () => import('../views/Layout.vue'),
				children: [
					//直播主页
					{
						path: 'info',
						name: 'MasterLiveInfo',
						component: () => import('../views/Master/Live/Info.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '直播主页',
							mode: true
						}
					},
					//产品介绍
					{
						path: 'show',
						name: 'MasterLiveShow',
						component: () => import('../views/Master/Live/Show.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '产品介绍',
						}
					},
					//直播房间
					{
						path: 'room',
						name: 'MasterLiveRoom',
						component: () => import('../views/Master/Live/Room.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '直播房间',
						}
					},
					//收银台
					{
						path: 'pay',
						name: 'MasterLivePay',
						component: () => import('../views/Master/Live/Pay.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '收银台',
						}
					},
					//支付成功
					{
						path: 'paySuccess',
						name: 'MasterLivePaySuccess',
						component: () => import('../views/Master/Live/PaySuccess.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '支付成功',
						}
					},

				],
			},

		],
	},
]

export default routesMaster
