index.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. import Vue from 'vue';
  2. import VueRouter from 'vue-router';
  3. import layout from '@/layout/index.vue';
  4. const originalPush = VueRouter.prototype.push;
  5. VueRouter.prototype.push = function push(location) {
  6. return originalPush.call(this, location).catch((err) => err);
  7. };
  8. Vue.use(VueRouter);
  9. const router = new VueRouter({
  10. // mode:"history",
  11. // mode:process.env.NODE_ENV !==
  12. // "production" ? "hash" : "history",
  13. mode: 'history',
  14. scrollBehavior(to, from, savedPosition) {
  15. if (savedPosition) {
  16. return savedPosition;
  17. } else {
  18. return { x: 0, y: 0 };
  19. }
  20. },
  21. base: '/mobile/',
  22. routes: [
  23. {
  24. path: '/',
  25. component: layout,
  26. redirect: '/home',
  27. children: [
  28. {
  29. path: '/home',
  30. name: 'home',
  31. component: () => import('@/views/home/index.vue'),
  32. },
  33. {
  34. path: '/reportingRate',
  35. name: 'reportingRate',
  36. component: () => import('@/views/home/reportingRate.vue'),
  37. },
  38. {
  39. path: '/err',
  40. name: 'err',
  41. component: () => import('@/views/home/err.vue'),
  42. },
  43. {
  44. path: '/login',
  45. name: 'login',
  46. component: () => import('@/views/home/login.vue'),
  47. },
  48. {
  49. path: '/logincs',
  50. name: 'logincs',
  51. component: () => import('@/views/home/logincs.vue'),
  52. },
  53. {
  54. path: '/noVisit',
  55. name: 'noVisit',
  56. meta: { title: '未拜访门店' },
  57. component: () => import('@/views/home/hintTabPage/noVisit.vue'),
  58. },
  59. {
  60. path: '/hintDetail',
  61. name: 'hintDetail',
  62. meta: { title: '提示类-拜访(实时) ' },
  63. component: () => import('@/views/home/hintTabPage/hintDetail.vue'),
  64. },
  65. {
  66. path: '/pantoneNoGet',
  67. name: 'pantoneNoGet',
  68. meta: { title: '提示类-业务员未领取色卡门店 ' },
  69. component: () => import('@/views/home/hintTabPage/pantoneNoGet.vue'),
  70. },
  71. {
  72. path: '/unCreateStore',
  73. name: 'unCreateStore',
  74. meta: { title: '提示类-业务员建店未完成页面' },
  75. component: () => import('@/views/home/hintTabPage/unCreateStore.vue'),
  76. meta: {
  77. title: '提示类-业务员建店未完成页面',
  78. },
  79. },
  80. ],
  81. },
  82. {
  83. path: '/storemanagementlist',
  84. component: layout,
  85. redirect: '/storemanagement/index',
  86. children: [
  87. {
  88. path: '/storemanagement/index',
  89. name: 'storeManagement',
  90. component: () => import('@/views/storeManagement/index.vue'),
  91. },
  92. {
  93. path: '/storeDetail',
  94. name: 'storeDetail',
  95. component: () => import('@/views/storeManagement/storeDetail.vue'),
  96. },
  97. {
  98. path: '/storeAdd',
  99. name: 'storeAdd',
  100. component: () => import('@/views/storeManagement/storeAdd.vue'),
  101. },
  102. {
  103. path: '/storeAddress',
  104. name: 'storeAddress',
  105. component: () => import('@/views/storeManagement/storeAddress.vue'),
  106. },
  107. {
  108. path: '/odersuccess',
  109. name: 'storeAdd',
  110. component: () => import('@/views/deviceOutside/oderSuccess.vue'),
  111. },
  112. {
  113. path: '/storeEdit',
  114. name: 'storeEdit',
  115. component: () => import('@/views/storeManagement/storeEdit.vue'),
  116. },
  117. {
  118. path: '/success',
  119. name: 'success',
  120. component: () => import('@/views/storeManagement/success.vue'),
  121. },
  122. {
  123. path: '/chainMaintain',
  124. name: 'chainMaintain',
  125. component: () => import('@/views/storeManagement/chainMaintain.vue'),
  126. },
  127. {
  128. path: '/addDesignerPage',
  129. name: 'addDesignerPage',
  130. component: () => import('@/views/storeManagement/addDesignerPage.vue'),
  131. meta: { title: '设计师招募', keepAlive: true },
  132. },
  133. {
  134. path: '/addDesignerDetail',
  135. name: 'addDesignerDetail',
  136. component: () => import('@/views/storeManagement/addDesignerDetail.vue'),
  137. meta: { title: '设计师招募详情', keepAlive: true },
  138. },
  139. {
  140. path: '/addDesignerEdit',
  141. name: 'addDesignerEdit',
  142. component: () => import('@/views/storeManagement/addDesignerEdit.vue'),
  143. meta: { title: '设计师招募编辑', keepAlive: true },
  144. },
  145. ],
  146. },
  147. {
  148. path: '/outsidelist',
  149. component: layout,
  150. redirect: '/outsidelist/index',
  151. children: [
  152. {
  153. path: '/outsidelist/index',
  154. name: 'outsidelist',
  155. component: () => import('@/views/deviceOutside/index.vue'),
  156. },
  157. {
  158. path: '/ai',
  159. name: 'ai',
  160. component: () => import('@/views/intelligence/index.vue'),
  161. },
  162. {
  163. path: '/topStore',
  164. name: 'topStore',
  165. component: () => import('@/views/deviceOutside/topStore.vue'),
  166. },
  167. {
  168. path: '/pItem',
  169. name: 'pItem',
  170. component: () => import('@/views/deviceOutside/productItem.vue'),
  171. },
  172. {
  173. path: '/suishenbangOutstoreVisit',
  174. name: 'suishenbangOutstoreVisit',
  175. component: () => import('@/views/deviceOutside/suishenbangOutstoreVisit.vue'),
  176. },
  177. {
  178. path: '/projectOut',
  179. name: 'projectOut',
  180. component: () => import('@/views/deviceOutside/projectOut.vue'),
  181. },
  182. {
  183. path: '/rangeStore',
  184. name: 'rangeStore',
  185. component: () => import('@/views/deviceOutside/rangeStore.vue'),
  186. },
  187. {
  188. path: '/outstoreVisit',
  189. name: 'outstoreVisit',
  190. component: () => import('@/views/deviceOutside/outstoreVisit.vue'),
  191. },
  192. {
  193. path: '/taskList',
  194. name: 'taskList',
  195. component: () => import('@/views/deviceOutside/taskList.vue'),
  196. },
  197. {
  198. path: '/storeGroup',
  199. name: 'storeGroup',
  200. component: () => import('@/views/deviceOutside/storeGroup.vue'),
  201. },
  202. {
  203. path: '/outabnormalVisit',
  204. name: 'outabnormalVisit',
  205. component: () => import('@/views/deviceOutside/outabnormalVisit.vue'),
  206. },
  207. ],
  208. },
  209. {
  210. path: '/historicalVisit',
  211. component: layout,
  212. redirect: '/historicalVisit/index',
  213. children: [
  214. {
  215. path: '/historicalVisit/index',
  216. name: 'historicalVisit',
  217. component: () => import('@/views/historicalVisit/index.vue'),
  218. },
  219. {
  220. path: '/historAllVisit',
  221. name: 'historAllVisit',
  222. component: () => import('@/views/historicalVisit/historAllVisit.vue'),
  223. },
  224. {
  225. path: '/historicalDetails',
  226. name: 'historicalDetails',
  227. component: () => import('@/views/historicalVisit/historicalDetails.vue'),
  228. },
  229. {
  230. path: '/historiStoreVisit',
  231. name: 'historiStoreVisit',
  232. component: () => import('@/views/historicalVisit/hisvistdeils.vue'),
  233. },
  234. ],
  235. },
  236. {
  237. path: '/deviceWithin',
  238. component: layout,
  239. redirect: '/deviceWithin/index',
  240. children: [
  241. {
  242. path: '/deviceWithin/index',
  243. name: 'deviceWithin',
  244. component: () => import('@/views/deviceWithin/index.vue'),
  245. },
  246. {
  247. path: '/storeVisitpage',
  248. name: 'storeVisitpage',
  249. component: () => import('@/views/deviceWithin/storeVisit.vue'),
  250. },
  251. {
  252. path: '/addStoreVisit',
  253. name: 'addStoreVisit',
  254. component: () => import('@/views/deviceWithin/addStoreVisit.vue'),
  255. },
  256. {
  257. path: '/addStoreVisitd',
  258. name: 'addStoreVisitd',
  259. component: () => import('@/views/deviceWithin/addStoreVisitd.vue'),
  260. },
  261. {
  262. path: '/addStoreVisitP',
  263. name: 'addStoreVisitP',
  264. component: () => import('@/views/deviceWithin/addStoreVisitP.vue'),
  265. },
  266. {
  267. path: '/abnormalVisit',
  268. name: 'abnormalVisit',
  269. component: () => import('@/views/deviceWithin/abnormalVisit.vue'),
  270. },
  271. {
  272. path: '/sign',
  273. name: 'sign',
  274. component: () => import('@/views/sign/index.vue'),
  275. },
  276. {
  277. path: '/signApprovalList',
  278. name: 'signApproval',
  279. component: () => import('@/views/signApproval/index.vue'),
  280. },
  281. {
  282. path: '/signApproval',
  283. name: 'signApproval',
  284. component: () => import('@/views/signApproval/signApproval.vue'),
  285. },
  286. // 同城店铺建店审批
  287. {
  288. path: '/newStoreApprovalList',
  289. name: 'newStoreApprovalList',
  290. component: () => import('@/views/signApproval/newStoreApprovalList.vue'),
  291. },
  292. {
  293. path: '/newStoreApprovalDetail',
  294. name: 'newStoreApprovalDetail',
  295. component: () => import('@/views/signApproval/newStoreApprovalDetail.vue'),
  296. },
  297. ],
  298. },
  299. {
  300. path: '/My',
  301. component: layout,
  302. redirect: '/My/index',
  303. children: [
  304. {
  305. path: '/My/index',
  306. name: 'MyList',
  307. component: () => import('@/views/week/index.vue'),
  308. },
  309. {
  310. path: '/myInventory',
  311. name: 'myInventory',
  312. component: () => import('@/views/my/myInventory.vue'),
  313. },
  314. {
  315. path: '/material',
  316. name: 'material',
  317. component: () => import('@/views/my/material.vue'),
  318. },
  319. {
  320. path: '/subordinateHistoricalDaily',
  321. name: 'subordinateHistoricalDaily',
  322. component: () => import('@/views/week/dailyHistorical.vue'),
  323. },
  324. {
  325. path: '/subordinateHistoricalWeekly',
  326. name: 'subordinateHistoricalWeekly',
  327. component: () => import('@/views/week/weeklyHistorical.vue'),
  328. },
  329. {
  330. path: '/myHistoricalDaily',
  331. name: 'myHistoricalDaily',
  332. component: () => import('@/views/week/myHistoricalDaily.vue'),
  333. },
  334. {
  335. path: '/weeklyApproval',
  336. name: 'weeklyApproval',
  337. component: () => import('@/views/week/weeklyApproval.vue'),
  338. },
  339. {
  340. path: '/weeklyApprovalDetils',
  341. name: 'weeklyApprovalDetils',
  342. component: () => import('@/views/week/weeklyApprovalDetils.vue'),
  343. },
  344. {
  345. path: '/myComment',
  346. name: 'myComment',
  347. component: () => import('@/views/week/myComment.vue'),
  348. },
  349. {
  350. path: '/doubleWeeklyDetils',
  351. name: 'doubleWeeklyDetils',
  352. component: () => import('@/views/week/doubleWeeklyDetils.vue'),
  353. },
  354. {
  355. path: '/daily',
  356. name: 'daily',
  357. component: () => import('@/views/week/daily.vue'),
  358. },
  359. {
  360. path: '/dailyApprovalList',
  361. name: 'dailyApprovalList',
  362. component: () => import('@/views/week/dailyApprovalList.vue'),
  363. },
  364. {
  365. path: '/dailyApproval',
  366. name: 'dailyApproval',
  367. component: () => import('@/views/week/dailyApproval.vue'),
  368. },
  369. {
  370. path: '/dailyDetails',
  371. name: 'dailyDetails',
  372. component: () => import('@/views/week/dailyDetails.vue'),
  373. },
  374. {
  375. path: '/weeklyApproval',
  376. name: 'weeklyApproval',
  377. component: () => import('@/views/week/weeklyApproval.vue'),
  378. },
  379. {
  380. path: '/weekly',
  381. name: 'weekly',
  382. component: () => import('@/views/week/weekly.vue'),
  383. },
  384. {
  385. path: '/doubleWeekly',
  386. name: 'doubleWeekly',
  387. component: () => import('@/views/week/doubleWeekly.vue'),
  388. },
  389. {
  390. path: '/doubleWeeklyApproval',
  391. name: 'doubleWeeklyApproval',
  392. component: () => import('@/views/week/doubleWeeklyApproval.vue'),
  393. },
  394. {
  395. path: '/doubleWeeklyHistorical',
  396. name: 'doubleWeeklyHistorical',
  397. component: () => import('@/views/week/doubleWeeklyHistorical.vue'),
  398. },
  399. {
  400. path: '/dailyHistoricalDetails',
  401. name: 'dailyHistoricalDetails',
  402. component: () => import('@/views/week/dailyHistoricalDetails.vue'),
  403. },
  404. {
  405. path: '/doubleHistoricalWeeklyDetils',
  406. name: 'doubleHistoricalWeeklyDetils',
  407. component: () => import('@/views/week/doubleHistoricalWeeklyDetils.vue'),
  408. },
  409. {
  410. path: '/weeklyHistoricalDetils',
  411. name: 'weeklyHistoricalDetils',
  412. component: () => import('@/views/week/weeklyHistoricalDetils.vue'),
  413. },
  414. {
  415. path: '/VisitSummary',
  416. name: 'VisitSummary',
  417. component: () => import('@/views/week/VisitSummary.vue'),
  418. },
  419. {
  420. path: '/VisitSummaryMy',
  421. name: 'VisitSummaryMy',
  422. component: () => import('@/views/week/VisitSummaryMy.vue'),
  423. },
  424. {
  425. path: '/VisitSummaryAdd',
  426. name: 'VisitSummaryAdd',
  427. component: () => import('@/views/week/VisitSummaryAdd.vue'),
  428. },
  429. {
  430. path: '/VisitSummaryDetail',
  431. name: 'VisitSummaryDetail',
  432. component: () => import('@/views/week/VisitSummaryDetail.vue'),
  433. },
  434. {
  435. path: '/assignAwait',
  436. name: 'assignAwait',
  437. meta: { title: '待分配客资' },
  438. component: () => import('@/views/week/assignAwait/index.vue'),
  439. },
  440. {
  441. path: '/assignPage',
  442. name: 'assignPage',
  443. meta: { title: '分配客资' },
  444. component: () => import('@/views/week/assignAwait/assignPage.vue'),
  445. },
  446. {
  447. path: '/JZfollowUp',
  448. name: 'JZfollowUp',
  449. meta: { title: '客资跟进' },
  450. component: () => import('@/views/week/assignAwait/JZfollowUp.vue'),
  451. },
  452. {
  453. path: '/systemSettings',
  454. name: 'systemSettings',
  455. component: () => import('@/views/week/systemSettings.vue'),
  456. meta: { title: '设置' },
  457. },
  458. {
  459. path: '/SUPTaskApproval',
  460. name: 'SUPTaskApproval',
  461. component: () => import('@/views/week/SUPTaskApproval/index.vue'),
  462. meta: { title: '主管任务审批', keepAlive: true },
  463. children: [],
  464. },
  465. {
  466. path: '/SUPTaskApprovalDetail',
  467. name: 'SUPTaskApprovalDetail',
  468. component: () => import('@/views/week/SUPTaskApproval/SUPTaskApprovalDetail.vue'),
  469. meta: { title: '主管任务审批详情', keepAlive: true },
  470. },
  471. ],
  472. },
  473. {
  474. path: '/clew',
  475. component: layout,
  476. redirect: '/clew',
  477. children: [
  478. {
  479. path: '/clew',
  480. name: 'clew',
  481. component: () => import('@/views/clew/index.vue'),
  482. },
  483. {
  484. path: '/clewent',
  485. name: 'clewent',
  486. component: () => import('@/views/clew/clewent.vue'),
  487. },
  488. {
  489. path: '/complaintDetail',
  490. name: 'complaintDetail',
  491. meta: { title: '渠道投诉' },
  492. component: () => import('@/views/clew/complaintDetail/index.vue'),
  493. },
  494. ],
  495. },
  496. {
  497. path: '/AIImage',
  498. component: layout,
  499. redirect: '/AIImage/list',
  500. children: [
  501. {
  502. path: '/AIImage/list',
  503. name: 'AIImage',
  504. component: () => import('@/views/AIImage/list.vue'),
  505. },
  506. {
  507. path: '/AIImageDetail',
  508. name: 'AIImageDetail',
  509. component: () => import('@/views/AIImage/AIImageDetail.vue'),
  510. },
  511. ],
  512. },
  513. ],
  514. });
  515. export default router;