index.js 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. if (!window.VueRouter) Vue.use(VueRouter)
  4. const routes = [
  5. //选择场景
  6. {
  7. path: '/',
  8. name: 'Home',
  9. component: () => import('../views/Home.vue'),
  10. meta: {
  11. title: '首页',
  12. }
  13. },
  14. //微信支付成功回跳处理页面
  15. {
  16. path: '/wxPayBack',
  17. name: 'WxPayBack',
  18. component: () => import('../views/WxPayBack.vue'),
  19. meta: {
  20. title: '微信支付成功回跳处理页面',
  21. }
  22. },
  23. //用户基础页面
  24. {
  25. path: '/user',
  26. component: () => import('../views/Layout.vue'),
  27. children: [
  28. //登录
  29. {
  30. path: 'login',
  31. name: 'UserLogin',
  32. component: () => import('../views/User/Login.vue'),
  33. meta: {
  34. title: '登录',
  35. }
  36. },
  37. //上传照片
  38. {
  39. path: 'uploadPhoto',
  40. name: 'UserUploadPhoto',
  41. component: () => import('../views/User/UploadPhoto.vue'),
  42. meta: {
  43. title: '上传照片',
  44. }
  45. },
  46. //选择身份
  47. {
  48. path: 'role',
  49. name: 'UserRole',
  50. component: () => import('../views/User/Role.vue'),
  51. meta: {
  52. title: '选择身份',
  53. }
  54. },
  55. ]
  56. },
  57. //邀请者
  58. {
  59. path: '/guest',
  60. component: () => import('../views/Layout.vue'),
  61. children: [
  62. //访客审批
  63. {
  64. path: 'approval',
  65. name: 'GuestApproval',
  66. component: () => import('../views/Guest/Approval.vue'),
  67. meta: {
  68. requireAuth: false,
  69. role: [],
  70. title: '访客审批',
  71. }
  72. },
  73. ]
  74. },
  75. //微信页面
  76. {
  77. path: '/wx',
  78. component: () => import('../views/Layout.vue'),
  79. children: [
  80. //活动中心
  81. {
  82. path: 'activity',
  83. component: () => import('../views/Layout.vue'),
  84. children: [
  85. //活动中心列表
  86. {
  87. path: 'list',
  88. name: 'WxActivityList',
  89. component: () => import('../views/Wx/Activity/List.vue'),
  90. meta: {
  91. requireAuth: false,
  92. role: [],
  93. title: '活动中心列表',
  94. }
  95. },
  96. //活动中心详情
  97. {
  98. path: 'info',
  99. name: 'WxActivityInfo',
  100. component: () => import('../views/Wx/Activity/Info.vue'),
  101. meta: {
  102. requireAuth: false,
  103. role: [],
  104. title: '活动中心详情',
  105. }
  106. },
  107. //我发布的活动
  108. {
  109. path: 'myList',
  110. name: 'WxActivityMyList',
  111. component: () => import('../views/Wx/Activity/MyList.vue'),
  112. meta: {
  113. requireAuth: false,
  114. role: [],
  115. title: '我发布的活动',
  116. }
  117. },
  118. //发布的活动
  119. {
  120. path: 'form',
  121. name: 'WxActivityForm',
  122. component: () => import('../views/Wx/Activity/Form.vue'),
  123. meta: {
  124. requireAuth: false,
  125. role: [],
  126. title: '发布的活动',
  127. }
  128. },
  129. ]
  130. },
  131. //关于我们
  132. {
  133. path: 'about',
  134. component: () => import('../views/Layout.vue'),
  135. children: [
  136. //关于我们
  137. {
  138. path: 'info',
  139. name: 'WxAboutInfo',
  140. component: () => import('../views/Wx/About/Info.vue'),
  141. meta: {
  142. requireAuth: false,
  143. role: [],
  144. title: '关于我们',
  145. }
  146. },
  147. ]
  148. },
  149. ]
  150. },
  151. //多场景注册
  152. {
  153. path: '/register',
  154. component: () => import('../views/Layout.vue'),
  155. children: [
  156. //选择行业
  157. {
  158. path: '',
  159. name: 'RegisterHome',
  160. component: () => import('../views/Register/Home.vue'),
  161. meta: {
  162. requireAuth: false,
  163. role: [],
  164. title: '选择行业',
  165. }
  166. },
  167. //注册协议
  168. {
  169. path: 'agreement',
  170. name: 'RegisterAgreement',
  171. component: () => import('../views/Register/Agreement.vue'),
  172. meta: {
  173. requireAuth: false,
  174. role: [],
  175. title: '注册协议',
  176. }
  177. },
  178. //工厂园区员工
  179. {
  180. path: 'business',
  181. component: () => import('../views/Layout.vue'),
  182. children: [
  183. //选择单位
  184. {
  185. path: 'step1',
  186. name: 'RegisterBusinessStep1',
  187. component: () => import('../views/Register/Business/Step1.vue'),
  188. meta: {
  189. requireAuth: false,
  190. role: [],
  191. title: '选择单位',
  192. }
  193. },
  194. //选择地区
  195. {
  196. path: 'step2',
  197. name: 'RegisterBusinessStep2',
  198. component: () => import('../views/Register/Business/Step2.vue'),
  199. meta: {
  200. requireAuth: false,
  201. role: [],
  202. title: '选择地区',
  203. }
  204. },
  205. //选择部门-养老员工也可用
  206. {
  207. path: 'step3',
  208. name: 'RegisterBusinessStep3',
  209. component: () => import('../views/Register/Business/Step3.vue'),
  210. meta: {
  211. requireAuth: false,
  212. role: [],
  213. title: '选择部门',
  214. }
  215. },
  216. //填写信息-养老员工也可用
  217. {
  218. path: 'step4',
  219. name: 'RegisterBusinessStep4',
  220. component: () => import('../views/Register/Business/Step4.vue'),
  221. meta: {
  222. requireAuth: false,
  223. role: [],
  224. title: '填写信息',
  225. }
  226. },
  227. ],
  228. },
  229. //社区住宅
  230. {
  231. path: 'residence',
  232. component: () => import('../views/Layout.vue'),
  233. children: [
  234. //选择小区
  235. {
  236. path: 'step1',
  237. name: 'RegisterResidenceStep1',
  238. component: () => import('../views/Register/Residence/Step1.vue'),
  239. meta: {
  240. requireAuth: false,
  241. role: [],
  242. title: '选择小区',
  243. }
  244. },
  245. //选择地区
  246. {
  247. path: 'step2',
  248. name: 'RegisterResidenceStep2',
  249. component: () => import('../views/Register/Residence/Step2.vue'),
  250. meta: {
  251. requireAuth: false,
  252. role: [],
  253. title: '选择地区',
  254. }
  255. },
  256. //选择房号
  257. {
  258. path: 'step3',
  259. name: 'RegisterResidenceStep3',
  260. component: () => import('../views/Register/Residence/Step3.vue'),
  261. meta: {
  262. requireAuth: false,
  263. role: [],
  264. title: '选择房号',
  265. }
  266. },
  267. //填写信息
  268. {
  269. path: 'step4',
  270. name: 'RegisterResidenceStep4',
  271. component: () => import('../views/Register/Residence/Step4.vue'),
  272. meta: {
  273. requireAuth: false,
  274. role: [],
  275. title: '填写信息',
  276. }
  277. },
  278. ],
  279. },
  280. //养老长者
  281. {
  282. path: 'pension',
  283. component: () => import('../views/Layout.vue'),
  284. children: [
  285. //选择养老
  286. {
  287. path: 'step1',
  288. name: 'RegisterPensionStep1',
  289. component: () => import('../views/Register/Pension/Step1.vue'),
  290. meta: {
  291. requireAuth: false,
  292. role: [],
  293. title: '选择养老',
  294. }
  295. },
  296. //养老机构筛选
  297. {
  298. path: 'step2',
  299. name: 'RegisterPensionStep2',
  300. component: () => import('../views/Register/Pension/Step2.vue'),
  301. meta: {
  302. requireAuth: false,
  303. role: [],
  304. title: '养老机构筛选',
  305. }
  306. },
  307. //居家养老场景4选择小区
  308. {
  309. path: 'step2_4',
  310. name: 'RegisterPensionStep2_4',
  311. component: () => import('../views/Register/Pension/Step2_4.vue'),
  312. meta: {
  313. requireAuth: false,
  314. role: [],
  315. title: '居家养老场景4选择小区',
  316. }
  317. },
  318. //居家养老场景4选择管理机构
  319. {
  320. path: 'step3_4',
  321. name: 'RegisterPensionStep3_4',
  322. component: () => import('../views/Register/Pension/Step3_4.vue'),
  323. meta: {
  324. requireAuth: false,
  325. role: [],
  326. title: '居家养老场景4选择管理机构',
  327. }
  328. },
  329. //选择房号
  330. {
  331. path: 'step3',
  332. name: 'RegisterPensionStep3',
  333. component: () => import('../views/Register/Pension/Step3.vue'),
  334. meta: {
  335. requireAuth: false,
  336. role: [],
  337. title: '选择房号',
  338. }
  339. },
  340. //填写信息
  341. {
  342. path: 'step4',
  343. name: 'RegisterPensionStep4',
  344. component: () => import('../views/Register/Pension/Step4.vue'),
  345. meta: {
  346. requireAuth: false,
  347. role: [],
  348. title: '填写信息',
  349. }
  350. },
  351. ],
  352. },
  353. ],
  354. }
  355. ]
  356. const router = new VueRouter({
  357. //base: process.env.BASE_URL,
  358. routes
  359. })
  360. export default router