index.js 15.1 KB
Newer Older
1 2 3 4
/*
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-09-24 12:34:06
786817560's avatar
786817560 committed
5 6
 * @LastEditTime : 2019-12-23 18:52:56
 * @LastEditors  : Please set LastEditors
7
 */
李晓兵's avatar
李晓兵 committed
8 9 10 11 12 13
import Vue from 'vue'
import Router from 'vue-router'

import Guide from '@/pages/guide/guide'
import Login from '@/pages/login'
import Regiester from '@/pages/regiester'
李晓兵's avatar
李晓兵 committed
14
import Regiester2 from '@/pages/regiester2'
李晓兵's avatar
李晓兵 committed
15 16 17
import PwdForgot from '@/pages/pwd-forgotten'
import FingerLogin from '@/pages/finger-login'
import Tab from '@/pages/tab'
786817560's avatar
786817560 committed
18
import HomePage from '@/pages/home/home-page'
786817560's avatar
786817560 committed
19 20
// 定位
import Location from '@/pages/home/location'
李晓兵's avatar
李晓兵 committed
21 22 23

// 我的
import MyInfo from '@/pages/myInfo/my-info'
李晓兵's avatar
李晓兵 committed
24
import Certification from '@/pages/myInfo/certification'
李晓兵's avatar
李晓兵 committed
25 26
// 我的收藏
import MyProductList from '@/pages/myProductCollection/my-product-list'
李晓兵's avatar
李晓兵 committed
27 28 29 30

// test工具类
import HlsPopup from '@/pages/hlsPopup'

李晓兵's avatar
李晓兵 committed
31 32 33 34
// 用户绑定
import UserBind from '@/pages/userBind/userBind'
import NaturePerson from '@/pages/userBind/np/naturePerson'
import Enterprise from '@/pages/userBind/org/enterprise'
786817560's avatar
786817560 committed
35 36 37 38 39 40 41

// 用户绑定new

import EnterpriseNew from '@/pages/userBindNew/org/baseInfo'
import Invoice from '@/pages/userBindNew/org/invoice'
import Enclosure from '@/pages/userBindNew/org/enclosure'
import BankInfo from '@/pages/userBindNew/org/bankInfo'
42 43
// 进件审批
import Base from '@/pages/intoApproval/intoApproval/base'
44
import IntoList from '@/pages/intoApproval/into-list'
linxin's avatar
linxin committed
45
import Refund from '@/pages/intoApproval/intoApproval/refund'
46
// 经销商签约
786817560's avatar
786817560 committed
47 48
import ContractList from '@/pages/distributorSign/contract-list'
import ContractDetails from '@/pages/distributorSign/contract-details'
786817560's avatar
786817560 committed
49
import FinancDetails from '@/pages/distributorSign/financ-details' // 还款计划
786817560's avatar
786817560 committed
50 51 52
// 融资试算
import FinancingTrial from '@/pages/financingTrial/financing-trial'
import FinancingDetails from '@/pages/financingTrial/financing-details' // 融资明细
786817560's avatar
786817560 committed
53
import TrialRepayPlan from '@/pages/financingTrial/trial-repay-plan'
24776's avatar
24776 committed
54 55 56 57 58
// 合同签约
import ContractSigning from '../pages/contractSigning/contract-signing'
import ContractDetail from '@/pages/ContractSigning/contract-detail'
import ContractContent from '@/pages/ContractSigning/contract-content'
import EntryInfo from '@/pages/ContractSigning/entry-info'
linxin's avatar
linxin committed
59
import ElectronicSign from '@/pages/ContractSigning/electronic-sign'
linxin's avatar
linxin committed
60
/* import BodyCheck from '@/pages/ContractSigning/body-check' */
786817560's avatar
786817560 committed
61
import ContractRepayPlan from '@/pages/ContractSigning/contract-repay-plan'
linxin's avatar
linxin committed
62

24776's avatar
24776 committed
63 64 65 66 67 68 69
// 首付款支付
import FirstPay from '../pages/pay/firstPay/first-pay'
import PayEntry from '@/pages/pay/firstPay/pay-entry'
import ContractRecord from '@/pages/pay/firstPay/contract-record'
// 款项支付
import PaymentPayEntry from '@/pages/pay/payment/pay-entry'
import PaymentContractRecord from '@/pages/pay/payment/contract-record'
70
import NewList from '@/pages/pay/payment/new-list'
24776's avatar
24776 committed
71
// 保证金支付
24776's avatar
24776 committed
72 73
import MarginFirstPay from '@/pages/pay/marginPay/first-pay'
import MarginPayEntry from '@/pages/pay/marginPay/pay-entry'
74 75
// 支付页
import PayPage from '@/pages/pay/pay-page'
786817560's avatar
786817560 committed
76 77
// 产品查询
import QueryHome from '@/pages/productQuery/query-home'
786817560's avatar
786817560 committed
78
import ProDetailed from '@/pages/productQuery/product-detailed'
linxin's avatar
linxin committed
79
// 消息中心
李晓兵's avatar
李晓兵 committed
80
import MessageCenter from '@/pages/messageCenter/message-list'
786817560's avatar
786817560 committed
81
import ProductList from '@/pages/productQuery/product-list'
linxin's avatar
linxin committed
82
import RejectDetail from '@/pages/messageCenter/reject-detail'
linxin's avatar
linxin committed
83
// 帮助与反馈
84
import HelpList from '@/pages/help/help-list'
85 86
import HelpDetail from '@/pages/help/detail'
import HelpFeedback from '@/pages/help/feedback'
李晓兵's avatar
李晓兵 committed
87 88 89
// 我的还款
import ReimburseMyselfList from '@/pages/reimburseMyself/reimburse-myself-list'
import ReimburseDetail from '@/pages/reimburseMyself/reimburse-detail'
linxin's avatar
linxin committed
90

24776's avatar
24776 committed
91 92 93
// 合同还款
import ContractRepayment from '@/pages/contractRepayment/contract-repayment'
import RepayDetails from '@/pages/contractRepayment/repay-details'
94
import RepayPlan from '@/pages/contractRepayment/refund'
linxin's avatar
linxin committed
95

96
// 发车申请
97 98 99 100 101 102
import StartList from '@/pages/contractStart/start-list'
import AddCar from '@/pages/contractStart/add-car'

// 发车确认
import ConfirmDetail from '@/pages/carConfirm/confirm-detail'
import ConfirmList from '@/pages/carConfirm/confirm-list'
103

24776's avatar
24776 committed
104 105 106 107 108
// 合同查询
import ContractRecords from '@/pages/contractInquire/contract-records'
import RepayDetail from '@/pages/contractInquire/repay-detail'
import RepayPlans from '@/pages/contractInquire/repay-plans'

linxin's avatar
linxin committed
109 110 111 112
// 业务退款
import DrawbackList from '@/pages/drawback/drawback-list'
import DrawbackDetail from '@/pages/drawback/drawback-detail'

linxin's avatar
linxin committed
113 114
// 视屏面签
import VideoSign from '@/pages/videoSign/video-list'
linxin's avatar
linxin committed
115 116 117 118 119
// 新版用户绑定
import NPBaseInfo from '@/pages/userBindNew/np/base-info'
import NPInvoiceInfo from '@/pages/userBindNew/np/invoice-info'
import NPBankInfo from '@/pages/userBindNew/np/bank-info'
import AccessoryInfo from '@/pages/userBindNew/np/accessory-info'
linxin's avatar
linxin committed
120

786817560's avatar
786817560 committed
121 122 123 124
// 合同创建
import ContractCreateList from '@/pages/contractCreate/contract-create-list'
import SalesInfo from '@/pages/contractCreate/sales-info'
import PickLessee from '@/pages/contractCreate/pick-lessee'
125 126
import CreateBaseInfo from '@/pages/contractCreate/create-base-info'
import CreateRentInfo from '@/pages/contractCreate/creat-rent-info'
786817560's avatar
786817560 committed
127
import CreateEnclosureInfo from '@/pages/contractCreate/create-enclosure-info'
Jennie Shi's avatar
Jennie Shi committed
128
import previewPdf from '@/pages/contractSigning/previewPdf'
李晓兵's avatar
李晓兵 committed
129

JingChao's avatar
JingChao committed
130 131 132 133
import About from '@/pages/myInfo/About'
import UserAgree from '@/pages/myInfo/UserAgreement'
import PrivacyPolicy from '@/pages/myInfo/PrivacyPolicy'

李晓兵's avatar
李晓兵 committed
134 135
// 我的发票
import MyInvoice from '@/pages/invoice/invoice'
李晓兵's avatar
李晓兵 committed
136 137 138 139 140 141 142
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: to => {
李晓兵's avatar
李晓兵 committed
143
        return {name: 'Login'}
李晓兵's avatar
李晓兵 committed
144
        /* if (!window.localStorage.needGuid || window.localStorage.needGuid === 'true') {
李晓兵's avatar
李晓兵 committed
145 146
          return {name: 'Guide'}
        } else {
李晓兵's avatar
李晓兵 committed
147 148
          // if none of the above states are matched, use this as the fallback
          return {name: 'Login'}
李晓兵's avatar
李晓兵 committed
149
        } */
李晓兵's avatar
李晓兵 committed
150 151 152 153 154 155
      },
    },
    {
      path: '/tab',
      component: Tab,
      name: 'Tab',
786817560's avatar
786817560 committed
156
      redirect: '/tab/home-page',
李晓兵's avatar
李晓兵 committed
157 158
      meta: {keepAlive: true},
      children: [
786817560's avatar
786817560 committed
159
        {path: '/tab/home-page', component: HomePage, name: 'HomePage', meta: {keepAlive: false}},
李晓兵's avatar
李晓兵 committed
160
        {path: '/tab/my-info', component: MyInfo, name: 'MyInfo', meta: {keepAlive: true}},
linxin's avatar
linxin committed
161
        {path: '/tab/message-center', component: MessageCenter, name: 'MessageCenter', meta: {keepAlive: true}},
李晓兵's avatar
李晓兵 committed
162 163 164
      ],
    },

786817560's avatar
786817560 committed
165 166 167 168
    {
      path: '/home-page',
      component: HomePage,
      name: 'HomePage',
786817560's avatar
786817560 committed
169
      meta: {keepAlive: false},
786817560's avatar
786817560 committed
170
    },
786817560's avatar
786817560 committed
171 172 173 174 175 176
    {
      path: '/location',
      component: Location,
      name: 'Location',
      meta: {keepAlive: false},
    },
786817560's avatar
786817560 committed
177

李晓兵's avatar
李晓兵 committed
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
    {
      path: '/guide',
      component: Guide,
      name: 'Guide',
      meta: {keepAlive: true},
    },
    {
      path: '/login',
      component: Login,
      name: 'Login',
      meta: {keepAlive: true},
    },
    {
      path: '/regiester',
      component: Regiester,
      name: 'Regiester',
      meta: {keepAlive: false},
    },
李晓兵's avatar
李晓兵 committed
196 197 198 199 200 201
    {
      path: '/regiester2',
      component: Regiester2,
      name: 'Regiester2',
      meta: {keepAlive: false},
    },
李晓兵's avatar
李晓兵 committed
202 203 204 205 206 207 208 209 210 211
    {
      path: '/finger-login',
      component: FingerLogin,
      name: 'FingerLogin',
      meta: {keepAlive: true},
    },
    {path: '/pwd-forgot', component: PwdForgot, name: 'PwdForgot', meta: {keepAlive: true}},

    // test工具类
    {path: '/hls-popup', component: HlsPopup, name: 'HlsPopup', meta: {keepAlive: false}},
李晓兵's avatar
李晓兵 committed
212 213 214
    // 用户绑定
    {path: '/user-bind', component: UserBind, name: 'UserBind', meta: {keepAlive: false}},
    {path: '/nature-person', component: NaturePerson, name: 'NaturePerson', meta: {keepAlive: false}},
李晓兵's avatar
李晓兵 committed
215
    {path: '/enterprise', component: Enterprise, name: 'Enterprise', meta: {keepAlive: true}},
786817560's avatar
786817560 committed
216 217 218 219 220 221

    // 用户绑定new
    {path: '/enterprise-new', component: EnterpriseNew, name: 'EnterpriseNew', meta: {keepAlive: true}},
    {path: '/invoice', component: Invoice, name: 'Invoice', meta: {keepAlive: true}},
    {path: '/enclosure', component: Enclosure, name: 'Enclosure', meta: {keepAlive: true}},
    {path: '/bankInfo', component: BankInfo, name: 'BankInfo', meta: {keepAlive: true}},
222
    // 进件审批
linxin's avatar
linxin committed
223
    {path: '/base', component: Base, name: 'Base', meta: {keepAlive: false}},
linxin's avatar
linxin committed
224
    {path: '/refund', component: Refund, name: 'Refund', meta: {keepAlive: false}},
225
    {path: '/into-list', component: IntoList, name: 'IntoList', meta: {keepAlive: false}},
226
    // 经销商签约
227 228
    {path: '/contract-list', component: ContractList, name: 'ContractList', meta: {keepAlive: true}},
    {path: '/contract-details', component: ContractDetails, name: 'ContractDetails', meta: {keepAlive: true}},
李晓兵's avatar
李晓兵 committed
229
    {path: '/financ-details', component: FinancDetails, name: 'FinancDetails', meta: {keepAlive: false}},
786817560's avatar
786817560 committed
230 231
    // 试算
    {path: '/financing-trial', component: FinancingTrial, name: 'FinancingTrial', meta: {keepAlive: true}},
786817560's avatar
786817560 committed
232
    {path: '/financing-details', component: FinancingDetails, name: 'FinancingDetails', meta: {keepAlive: true}},
786817560's avatar
786817560 committed
233
    {path: '/trial-repay-plan', component: TrialRepayPlan, name: 'TrialRepayPlan', meta: {keepAlive: true}},
24776's avatar
24776 committed
234 235 236 237 238
    // 合同签约
    {path: '/contract-signing', component: ContractSigning, name: 'ContractSigning', meta: {keepAlive: true}},
    {path: '/contract-detail', component: ContractDetail, name: 'ContractDetail', meta: {keepAlive: true}},
    {path: '/contract-content', component: ContractContent, name: 'ContractContent', meta: {keepAlive: true}},
    {path: '/entry-info', component: EntryInfo, name: 'EntryInfo', meta: {keepAlive: true}},
786817560's avatar
786817560 committed
239
    {path: '/contract-repay-plan', component: ContractRepayPlan, name: 'ContractRepayPlan', meta: {keepAlive: true}},
linxin's avatar
linxin committed
240
    {path: '/electronic-sign', component: ElectronicSign, name: 'ElectronicSign', meta: {keepAlive: true}},
linxin's avatar
linxin committed
241
    /* {path: '/body-check', component: BodyCheck, name: 'BodyCheck', meta: {keepAlive: true}}, */
linxin's avatar
linxin committed
242

24776's avatar
24776 committed
243 244 245 246 247
    // 首付款支付
    {path: '/first-pay', component: FirstPay, name: 'FirstPay', meta: {keepAlive: true}},
    {path: '/pay-entry', component: PayEntry, name: 'PayEntry', meta: {keepAlive: true}},
    {path: '/contract-record', component: ContractRecord, name: 'ContractRecord', meta: {keepAlive: true}},
    // 款项支付
linxin's avatar
linxin committed
248
    {path: '/payment-pay-entry', component: PaymentPayEntry, name: 'PaymentPayEntry', meta: {keepAlive: true}},
249
    {path: '/new-list', component: NewList, name: 'NewList', meta: {keepAlive: true}},
linxin's avatar
linxin committed
250
    {path: '/payment-contract-record', component: PaymentContractRecord, name: 'PaymentContractRecord', meta: {keepAlive: true}},
24776's avatar
24776 committed
251
    // 保证金支付
linxin's avatar
linxin committed
252 253
    {path: '/margin-first-pay', component: MarginFirstPay, name: 'MarginFirstPay', meta: {keepAlive: false}},
    {path: '/margin-pay-entry', component: MarginPayEntry, name: 'MarginPayEntry', meta: {keepAlive: false}},
254
    // 支付页
linxin's avatar
linxin committed
255
    {path: '/pay-page', component: PayPage, name: 'PayPage', meta: {keepAlive: false}},
786817560's avatar
786817560 committed
256 257
    // 产品查询
    {path: '/query-home', component: QueryHome, name: 'QueryHome', meta: {keepAlive: true}},
786817560's avatar
786817560 committed
258
    {path: '/product-detailed', component: ProDetailed, name: 'ProDetailed', meta: {keepAlive: true}},
786817560's avatar
786817560 committed
259
    {path: '/product-list', component: ProductList, name: 'ProductList', meta: {keepAlive: true}},
linxin's avatar
linxin committed
260 261
    // 帮助与反馈
    {path: '/help-list', component: HelpList, name: 'HelpList', meta: {keepAlive: true}},
262
    {path: '/help-detail', component: HelpDetail, name: 'HelpDetail', meta: {keepAlive: true}},
786817560's avatar
786817560 committed
263
    {path: '/help-feedback', component: HelpFeedback, name: 'HelpFeedback', meta: {keepAlive: false}},
李晓兵's avatar
李晓兵 committed
264
    // 我的还款
265
    {path: '/reimburse-myself-list', component: ReimburseMyselfList, name: 'ReimburseMyselfList', meta: {keepAlive: false}},
李晓兵's avatar
李晓兵 committed
266
    {path: '/reimburse-detail', component: ReimburseDetail, name: 'ReimburseDetail', meta: {keepAlive: false}},
李晓兵's avatar
李晓兵 committed
267 268
    // 我的收藏
    {path: '/my-product-list', component: MyProductList, name: 'MyProductList', meta: {keepAlive: true}},
24776's avatar
24776 committed
269 270 271 272
    // 合同还款
    {path: '/contract-repayment', component: ContractRepayment, name: 'ContractRepayment', meta: {keepAlive: true}},
    {path: '/repay-details', component: RepayDetails, name: 'RepayDetails', meta: {keepAlive: true}},
    {path: '/repay-plan', component: RepayPlan, name: 'RepayPlan', meta: {keepAlive: true}},
273
    // 发车申请
274
    {path: '/start-List', component: StartList, name: 'StartList', meta: {keepAlive: false}},
linxin's avatar
linxin committed
275
    {path: '/add-car', component: AddCar, name: 'AddCar', meta: {keepAlive: false}},
276 277
    // 发车确认
    {path: '/confirm-detail', component: ConfirmDetail, name: 'ConfirmDetail', meta: {keepAlive: true}},
linxin's avatar
linxin committed
278
    {path: '/confirm-list', component: ConfirmList, name: 'ConfirmList', meta: {keepAlive: false}},
24776's avatar
24776 committed
279 280 281 282
    // 合同查询
    {path: '/contract-records', component: ContractRecords, name: 'ContractRecords', meta: {keepAlive: true}},
    {path: '/repay-detail', component: RepayDetail, name: 'RepayDetail', meta: {keepAlive: true}},
    {path: '/repay-plans', component: RepayPlans, name: 'RepayPlans', meta: {keepAlive: true}},
李晓兵's avatar
李晓兵 committed
283
    {path: '/certification', component: Certification, name: 'Certification', meta: {keepAlive: false}},
linxin's avatar
linxin committed
284 285 286
    // 业务退款
    {path: '/drawback-list', component: DrawbackList, name: 'DrawbackList', meta: {keepAlive: false}},
    {path: '/drawback-detail', component: DrawbackDetail, name: 'DrawbackDetail', meta: {keepAlive: false}},
linxin's avatar
linxin committed
287 288
    // 视屏面签
    {path: '/video-sign', component: VideoSign, name: 'VideoSign', meta: {keepAlive: true}},
linxin's avatar
linxin committed
289 290
    // 消息中心
    {path: '/reject-detail', component: RejectDetail, name: 'RejectDetail', meta: {keepAlive: true}},
linxin's avatar
linxin committed
291 292 293
    // 新版用户绑定-自然人
    {path: '/np-base-info', component: NPBaseInfo, name: 'NPBaseInfo', meta: {keepAlive: true}},
    {path: '/np-invoice-info', component: NPInvoiceInfo, name: 'NPInvoiceInfo', meta: {keepAlive: true}},
linxin's avatar
linxin committed
294
    {path: '/np-bank-info', component: NPBankInfo, name: 'NPBankInfo', meta: {keepAlive: false}},
linxin's avatar
linxin committed
295 296
    {path: '/accessory-info', component: AccessoryInfo, name: 'AccessoryInfo', meta: {keepAlive: true}},

786817560's avatar
786817560 committed
297 298 299 300
    // 合同创建
    {path: '/contract-create-list', component: ContractCreateList, name: 'ContractCreateList', meta: {keepAlive: true}},
    {path: '/sales-info', component: SalesInfo, name: 'SalesInfo', meta: {keepAlive: true}},
    {path: '/pick-lessee', component: PickLessee, name: 'PickLessee', meta: {keepAlive: true}},
301 302
    {path: '/create-base-info', component: CreateBaseInfo, name: 'CreateBaseInfo', meta: {keepAlive: true}},
    {path: '/create-rent-info', component: CreateRentInfo, name: 'CreateRentInfo', meta: {keepAlive: true}},
786817560's avatar
786817560 committed
303
    {path: '/create-enclosure-info', component: CreateEnclosureInfo, name: 'CreateEnclosureInfo', meta: {keepAlive: true}},
Jennie Shi's avatar
Jennie Shi committed
304
    {path: '/previewPdf', component: previewPdf, name: 'previewPdf', meta: {keepAlive: true}},
李晓兵's avatar
李晓兵 committed
305 306
    // 我的发票
    {path: '/invoice', component: MyInvoice, name: 'MyInvoice', meta: {keepAlive: false}},
JingChao's avatar
JingChao committed
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
    {
      path: '/About',
      component: About,
      name: 'About',
      meta: { keepAlive: true },
    },
    {
      path: '/UserAgree',
      component: UserAgree,
      name: 'UserAgree',
      meta: { keepAlive: true },
    },
    {
      path: '/PrivacyPolicy',
      component: PrivacyPolicy,
      name: 'PrivacyPolicy',
      meta: { keepAlive: true },
    },
李晓兵's avatar
李晓兵 committed
325 326 327 328 329 330 331 332 333
  ],
  scrollBehavior (to, from, savedPosition) {
    if (to.hash) {
      return {
        selector: to.hash,
      }
    }
  },
})