index.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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: '/user',
  17. component: () => import('../views/Layout.vue'),
  18. children: [
  19. //登录
  20. {
  21. path: 'login',
  22. name: 'UserLogin',
  23. component: () => import('../views/User/Login.vue'),
  24. meta: {
  25. title: '登录',
  26. }
  27. },
  28. //上传照片
  29. {
  30. path: 'uploadPhoto',
  31. name: 'UserUploadPhoto',
  32. component: () => import('../views/User/UploadPhoto.vue'),
  33. meta: {
  34. title: '上传照片',
  35. }
  36. },
  37. //选择身份
  38. {
  39. path: 'role',
  40. name: 'UserRole',
  41. component: () => import('../views/User/Role.vue'),
  42. meta: {
  43. title: '选择身份',
  44. }
  45. },
  46. ]
  47. },
  48. //微信页面
  49. {
  50. path: '/wx',
  51. component: () => import('../views/Layout.vue'),
  52. children: [
  53. //活动中心
  54. {
  55. path: 'activity',
  56. component: () => import('../views/Layout.vue'),
  57. children: [
  58. //活动中心列表
  59. {
  60. path: 'list',
  61. name: 'WxActivityList',
  62. component: () => import('../views/Wx/Activity/List.vue'),
  63. meta: {
  64. requireAuth: false,
  65. role: [],
  66. title: '活动中心列表',
  67. }
  68. },
  69. //活动中心详情
  70. {
  71. path: 'info',
  72. name: 'WxActivityInfo',
  73. component: () => import('../views/Wx/Activity/Info.vue'),
  74. meta: {
  75. requireAuth: false,
  76. role: [],
  77. title: '活动中心详情',
  78. }
  79. },
  80. //我发布的活动
  81. {
  82. path: 'myList',
  83. name: 'WxActivityMyList',
  84. component: () => import('../views/Wx/Activity/MyList.vue'),
  85. meta: {
  86. requireAuth: false,
  87. role: [],
  88. title: '我发布的活动',
  89. }
  90. },
  91. //发布的活动
  92. {
  93. path: 'form',
  94. name: 'WxActivityForm',
  95. component: () => import('../views/Wx/Activity/Form.vue'),
  96. meta: {
  97. requireAuth: false,
  98. role: [],
  99. title: '发布的活动',
  100. }
  101. },
  102. ]
  103. },
  104. //关于我们
  105. {
  106. path: 'about',
  107. component: () => import('../views/Layout.vue'),
  108. children: [
  109. //联系我们
  110. {
  111. path: 'contact',
  112. name: 'WxAboutContact',
  113. component: () => import('../views/Wx/About/Contact.vue'),
  114. meta: {
  115. requireAuth: false,
  116. role: [],
  117. title: '联系我们',
  118. }
  119. },
  120. ]
  121. },
  122. ]
  123. },
  124. //多场景注册
  125. {
  126. path: '/register',
  127. component: () => import('../views/Layout.vue'),
  128. children: [
  129. //选择行业
  130. {
  131. path: 'home',
  132. name: 'RegisterHome',
  133. component: () => import('../views/Register/Home.vue'),
  134. meta: {
  135. requireAuth: false,
  136. role: [],
  137. title: '选择行业',
  138. }
  139. },
  140. //工厂园区员工
  141. {
  142. path: 'business',
  143. component: () => import('../views/Layout.vue'),
  144. children: [
  145. //选择单位
  146. {
  147. path: 'step1',
  148. name: 'RegisterBusinessStep1',
  149. component: () => import('../views/Register/Business/Step1.vue'),
  150. meta: {
  151. requireAuth: false,
  152. role: [],
  153. title: '选择单位',
  154. }
  155. },
  156. //选择地区
  157. {
  158. path: 'step2',
  159. name: 'RegisterBusinessStep2',
  160. component: () => import('../views/Register/Business/Step2.vue'),
  161. meta: {
  162. requireAuth: false,
  163. role: [],
  164. title: '选择地区',
  165. }
  166. },
  167. //选择部门-养老员工也可用
  168. {
  169. path: 'step3',
  170. name: 'RegisterBusinessStep3',
  171. component: () => import('../views/Register/Business/Step3.vue'),
  172. meta: {
  173. requireAuth: false,
  174. role: [],
  175. title: '选择部门',
  176. }
  177. },
  178. //填写信息-养老员工也可用
  179. {
  180. path: 'step4',
  181. name: 'RegisterBusinessStep4',
  182. component: () => import('../views/Register/Business/Step4.vue'),
  183. meta: {
  184. requireAuth: false,
  185. role: [],
  186. title: '填写信息',
  187. }
  188. },
  189. ],
  190. },
  191. //社区住宅
  192. {
  193. path: 'residence',
  194. component: () => import('../views/Layout.vue'),
  195. children: [
  196. //选择小区
  197. {
  198. path: 'step1',
  199. name: 'RegisterResidenceStep1',
  200. component: () => import('../views/Register/Residence/Step1.vue'),
  201. meta: {
  202. requireAuth: false,
  203. role: [],
  204. title: '选择小区',
  205. }
  206. },
  207. //选择地区
  208. {
  209. path: 'step2',
  210. name: 'RegisterResidenceStep2',
  211. component: () => import('../views/Register/Residence/Step2.vue'),
  212. meta: {
  213. requireAuth: false,
  214. role: [],
  215. title: '选择地区',
  216. }
  217. },
  218. //选择房号
  219. {
  220. path: 'step3',
  221. name: 'RegisterResidenceStep3',
  222. component: () => import('../views/Register/Residence/Step3.vue'),
  223. meta: {
  224. requireAuth: false,
  225. role: [],
  226. title: '选择房号',
  227. }
  228. },
  229. //填写信息
  230. {
  231. path: 'step4',
  232. name: 'RegisterResidenceStep4',
  233. component: () => import('../views/Register/Residence/Step4.vue'),
  234. meta: {
  235. requireAuth: false,
  236. role: [],
  237. title: '填写信息',
  238. }
  239. },
  240. ],
  241. },
  242. //养老长者
  243. {
  244. path: 'pension',
  245. component: () => import('../views/Layout.vue'),
  246. children: [
  247. //选择养老
  248. {
  249. path: 'step1',
  250. name: 'RegisterPensionStep1',
  251. component: () => import('../views/Register/Pension/Step1.vue'),
  252. meta: {
  253. requireAuth: false,
  254. role: [],
  255. title: '选择养老',
  256. }
  257. },
  258. //养老机构筛选
  259. {
  260. path: 'step2',
  261. name: 'RegisterPensionStep2',
  262. component: () => import('../views/Register/Pension/step2.vue'),
  263. meta: {
  264. requireAuth: false,
  265. role: [],
  266. title: '养老机构筛选',
  267. }
  268. },
  269. //选择房号
  270. {
  271. path: 'step3',
  272. name: 'RegisterPensionStep3',
  273. component: () => import('../views/Register/Pension/step3.vue'),
  274. meta: {
  275. requireAuth: false,
  276. role: [],
  277. title: '选择房号',
  278. }
  279. },
  280. //填写信息
  281. {
  282. path: 'step4',
  283. name: 'RegisterPensionStep4',
  284. component: () => import('../views/Register/Pension/Step4.vue'),
  285. meta: {
  286. requireAuth: false,
  287. role: [],
  288. title: '填写信息',
  289. }
  290. },
  291. ],
  292. },
  293. ],
  294. }
  295. ]
  296. const router = new VueRouter({
  297. //base: process.env.BASE_URL,
  298. routes
  299. })
  300. export default router