路由

import Router from ‘vue-router’
import Vue from “vue”
import importLoading from ‘…/utils/importLoading’
Vue.use(Router);

const profile_settings_pages = [
{
path: ‘/profile_binding_phone’,
name: ‘ProfileBindingPhone’,
component: importLoading(() => import("…/page/profile/settings/page/bindingphone.vue")),
meta: { title: “绑定手机” }
},
{
path: ‘/profile_change_password’,
name: ‘ProfileChangePassword’,
component: importLoading(() => import("…/page/profile/settings/page/changepassword.vue")),
meta: { title: “修改密码” }
},
{
path: ‘/profile_settings’,
name: ‘ProfileSettings’,
component: importLoading(() => import("…/page/profile/settings/index.vue")),
meta: { title: “安全设置”, login: true }
},
{
path: ‘/profile_pay_pwd’,
name: ‘ProfileSettings’,
component: importLoading(() => import("…/page/profile/settings/page/pay_pwd.vue")),
meta: { title: “支付密码”, login: true }
},
{
path: ‘/set_pay_pw’,
name: ‘SetPayPw’,
component: importLoading(() => import("…/page/profile/settings/page/set_pay_pw")),
meta: { title: “修改支付密码”, login: true }
},
{
path: ‘/pay_pwd_confirm’,
name: ‘ProfileSettings’,
component: importLoading(() => import("…/page/profile/settings/page/pay_pwd_confirm.vue")),
meta: { title: “支付密码”, login: true }
},
];

const profile_about_pages = [
{
path: ‘/profile_about’,
name: ‘ProfileAbout’,
component: importLoading(() => import("…/page/profile/about/index.vue")),
meta: { title: “关于我们” }
}
];

const profile_present_pages = [
{
path: ‘/profile_present’,
name: ‘ProfilePresent’,
component: importLoading(() => import("…/page/present/index.vue")),
meta: { title: “赠送服务” }
},
{
path: ‘/present’,
name: ‘Present’,
component: importLoading(() => import("…/page/present/product/product_list.vue")),
meta: { title: “赠送服务产品” }
},
{
path: ‘/present_detail’,
name: ‘Present_Detail’,
component: importLoading(() => import("…/page/present/product/present_detail.vue")),
meta: { title: “赠送服务产品” }
}
];

const profile_car_pages = [
{
path: ‘/profile_car_model/:id’,
name: ‘ProfileCarModel’,
component: importLoading(() => import("…/page/profile/car/page/carmodel.vue")),
meta: { title: “选择车型” }
}, {
path: ‘/profile_car_parts/:id’,
name: ‘ProfileCarParts’,
component: importLoading(() => import("…/page/profile/car/page/carparts.vue")),
meta: { title: “选择车系” }
}, {
path: ‘/profile_car_brand’,
component: importLoading(() => import("…/page/profile/car/page/carbrand.vue")),
meta: { title: “选择品牌” }
}, {
path: ‘/profile_new_car/:id’,
name: ‘ProfileNewCar’,
component: importLoading(() => import("…/page/profile/car/page/newcar.vue")),
meta: { title: “添加爱车” }
}, {
path: ‘/profile_car/:id’,
name: ‘ProfileCar’,
component: importLoading(() => import("…/page/profile/car/index.vue")),
meta: { title: “爱车档案”, login: true }
},
];

const profile_address_pages = [
{
path: ‘/profile_new_address/:id’,
name: ‘ProfileNewAddress’,
component: importLoading(() => import("…/page/profile/address/page/newaddress.vue")),
meta: { title: “新增地址” }
}, {
path: ‘/profile_address/:order_guid/:order_progress_guid’,
name: ‘ProfileAddress’,
component: importLoading(() => import("…/page/profile/address/index.vue")),
meta: { title: “寄送地址”, login: true }
},
];

const auth_page = [{
path: “/login”,
name: “Login”,
component: importLoading(() => import("…/page/profile/auth/index.vue")),
meta: { title: “登录” }
}, {
path: “/reg”,
name: “Reg”,
component: importLoading(() => import("…/page/profile/auth/page/reg.vue")),
meta: { title: “注册” }
}, {
path: “/statement”,
name: “Statement”,
component: importLoading(() => import("…/page/profile/auth/page/statement.vue")),
meta: { title: “用户协议” }
}];

const accident_page = [
{
path: ‘/accident’,
name: ‘AccidentIndex’,
component: () => import("…/page/accident/index.vue"),
meta: { title: “事故代处理” }
},
{
path: ‘/accident_handling/:id’,
name: ‘AccidentHandling’,
component: () => import("…/page/accident/page/handling.vue"),
meta: { title: “事故代处理” }
},
{
path: ‘/accident_viewlist’,
name: ‘AccidentViewlist’,
component: () => import("…/page/accident/page/viewlist.vue"),
meta: { title: “查看照片列表”, login: true }
},
{
path: ‘/accident_view/:id’,
name: ‘AccidentView’,
component: () => import("…/page/accident/page/view.vue"),
meta: { title: “查看照片” }
},
{
path: ‘/accident_save’,
name: ‘AccidentSave’,
component: () => import("…/page/accident/page/save.vue"),
meta: { title: “提交保存照片” }
},
{
path: ‘/accident_confirm’,
name: ‘AccidentConfirm’,
component: () => import("…/page/accident/page/confirm.vue"),
meta: { title: “确认订单” }
}, {
path: ‘/accident_map’,
name: ‘AccidentMap’,
component: () => import("…/page/accident/page/map.vue"),
meta: { title: “位置设置” }
},
{
path: ‘/accident_report’,
name: ‘AccidentReport’,
component: () => import("…/page/accident/page/report.vue"),
meta: { title: “事故代处理” }
},
{
path: “/accident_order_detail/:id”,
name: “AccidentOrderDetail”,
component: () => import("…/page/accident/page/order_detail.vue"),
meta: { title: “订单状态” }
},
{
path: ‘/accident_evaluation/:id’,
name: ‘AccidentEvaluation’,
component: () => import("…/page/accident/page/evaluation.vue"),
meta: { title: “订单评价” }
},
{
path: ‘/accident_generate/:id’,
name: ‘AccidentGenerate’,
component: () => import("…/page/accident/page/generate.vue"),
meta: { title: “生成订单” }
},
{
path: “/accident_upload/:order_guid/:order_progress_guid/”,
name: “AccidentUploadData”,
component: () => import("…/page/accident/page/upload_data.vue"),
meta: { title: “资料上传” }
}
];

const msg_page = [
{
path: “/msg”,
name: “Message”,
component: importLoading(() => import("…/page/profile/message/index.vue")),
meta: { title: “消息中心” }
},
];

const card_sell_page = [
{
path: “/card_sell”,
name: “CardSell”,
component: importLoading(() => import("…/page/card_sell/index.vue")),
meta: { title: “购卡中心” }
},
{
path: “/card_detail”,
name: “CardDetail”,
component: importLoading(() => import("…/page/card_sell/page/card_detail.vue")),
meta: { title: “卡片详情” }
},
{
path: “/card_discount”,
name: “CardDiscount”,
component: importLoading(() => import("…/page/card_sell/page/card_discount.vue")),
meta: { title: “优惠权益” }
},
{
path: “/card_declare”,
name: “CardDeclare”,
component: importLoading(() => import("…/page/card_sell/page/card_declare.vue")),
meta: { title: “优惠权益” }
},

{
path: “/card_store”,
name: “CardStore”,
component: importLoading(() => import("…/page/card_sell/page/card_store.vue")),
meta: { title: “适用门店” }
},
{
path: “/card_pay_success”,
name: “CardStore”,
component: importLoading(() => import("…/page/card_sell/page/pay_success.vue")),
meta: { title: “支付成功” }
}
];

const profile_card = [
{
path: “/profile_card”,
name: “ProfileCard”,
component: importLoading(() => import("…/page/profile/card/index.vue")),
meta: { title: “卡包”, login: true }
},
{
path: “/profile_card_detail”,
name: “ProfileCard”,
component: importLoading(() => import("…/page/profile/card/page/card_detail.vue")),
meta: { title: “会员卡详情” }
},
{
path: “/profile_card_discount”,
name: “ProfileCard”,
component: importLoading(() => import("…/page/profile/card/page/card_discount.vue")),
meta: { title: “会员卡权益” }
},
{
path: “/profile_card_log”,
name: “ProfileCard”,
component: importLoading(() => import("…/page/profile/card/page/card_log.vue")),
meta: { title: “消费记录” }
},
{
path: “/profile_card_recharge”,
name: “ProfileCard”,
component: importLoading(() => import("…/page/profile/card/page/card_recharge.vue")),
meta: { title: “会员卡充值” }
},
{
path: “/profile_card_extra”,
name: “ProfileCard”,
component: importLoading(() => import("…/page/profile/card/page/card_extra.vue")),
meta: { title: “绑定车辆” }
},
];
const pay_page = [
{
path: “/pay”,
name: “OrderPay”,
component: importLoading(() => import("…/page/pay/index.vue")),
meta: { title: “订单支付” }
},
{
path: “/pay_success”,
name: “PaySuccess”,
component: importLoading(() => import("…/page/pay/page/pay_success.vue")),
meta: { title: “支付成功” }
}
];
const order_page = [
{
path: “/order_all”,
name: “OrderAll”,
component: importLoading(() => import("…/page/order/page/order_all.vue")),
meta: { title: “全部订单” }
},
];
const store_page = [
{
path: “/store_detail”,
name: “StoreDetail”,
component: importLoading(() => import("…/page/store/page/store_detail.vue")),
meta: { title: “洗车” }
},
{
path: “/order_confirm”,
name: “OrderConfirm”,
component: importLoading(() => import("…/page/store/page/order_confirm.vue")),
meta: { title: “确定订单” }
},
{
path: “/order_submit”,
name: “OrderSubmit”,
component: importLoading(() => import("…/page/store/page/order_submit.vue")),
meta: { title: “提交订单” }
},
{
path: “/product_detail”,
name: “OrderSubmit”,
component: importLoading(() => import("…/page/store/page/product_detail.vue")),
meta: { title: “商品详情” }
},
{
path: “/product_comment”,
name: “OrderSubmit”,
component: importLoading(() => import("…/page/store/page/product_comment.vue")),
meta: { title: “商品评论” }
}

];
const wash_page = [
{
path: “/select_time”,
name: “SelectTime”,
component: importLoading(() => import("…/page/wash/page/select_time.vue")),
meta: { title: “选择服务时间” }
},
{
path: “/order_detail”,
name: “OrderDetail”,
component: importLoading(() => import("…/page/wash/page/order_detail.vue")),
meta: { title: “订单详情”, login: true }
},
{
path: “/order_comment”,
name: “OrderDetail”,
component: importLoading(() => import("…/page/wash/page/order_comment.vue")),
meta: { title: “订单评价” }
},
{
path: “/order_dispatch”,
name: “OrderDetail”,
component: importLoading(() => import("…/page/wash/page/dispatch.vue")),
meta: { title: “订单派工” }
},
{
path: “/dispatch_job”,
name: “OrderDetail”,
component: importLoading(() => import("…/page/wash/page/dispatch_job.vue")),
meta: { title: “手动派工” }
}
];
const home_page = [
{
path: ‘/index/:code’,
name: ‘Index’,
component: importLoading(() => import("…/page/home/index.vue")),
meta: { title: “e车事” }
},
{
path: “/order”,
name: “Order”,
component: importLoading(() => import("…/page/order/index.vue")),
meta: { title: “订单列表”, login: true }
},

{
path: “/new_index”,
name: “NewIndex”,
component: importLoading(() => import("…/page/order/new_index.vue")),
meta: { title: “订单列表”, login: true }
},
{
path: “/new_index2”,
name: “NewIndex”,
component: importLoading(() => import("…/page/order/index2.vue")),
meta: { title: “订单列表”, login: true }
},
{
path: ‘/store’,
name: ‘Store’,
component: importLoading(() => import("…/page/store/index.vue")),
meta: { title: “门店” }
},
{
path: ‘/wash’,
name: ‘Wash’,
component: importLoading(() => import("…/page/wash/index.vue")),
meta: { title: “轿车普洗” }
},
{
path: ‘/profile’,
name: ‘Profile’,
component: importLoading(() => import("…/page/profile/index.vue")),
meta: { title: “我的”, login: true }
},
{
path: ‘/not_available’,
name: ‘not_available’,
component: importLoading(() => import("…/page/not_available/not_available.vue")),
meta: { title: “暂未开发” }
},
{
path: “/info_index”,
name: “info_index”,
component: importLoading(() => import("…/page/profile/info/index.vue")),
meta: { title: “个人信息” }
},
{
path: “/pop_view”,
name: “pop_view”,
component: importLoading(() => import("…/components/pop_view.vue"))
},
{
path: “/pop_show”,
name: “pop_show”,
component: importLoading(() => import("…/page/profile/info/components/pop_show.vue"))
}
];
const profile_page = [
…auth_page,
…profile_present_pages,
…profile_car_pages,
…profile_address_pages,
…profile_about_pages,
…profile_settings_pages,
…msg_page,
…profile_card,

{
path: “/profile_balance”,
name: “sfjd”,
component: importLoading(() => import("…/page/profile/balance/index.vue")),
meta: { title: “我的余额”, login: true },
},
{
path: “/balance_list”,
name: “sfjd”,
component: importLoading(() => import("…/page/profile/balance/page/list.vue")),
meta: { title: “余额明细”, login: true },
},
{
path: “/auth_code”,
name: “AuthCode”,
component: importLoading(() => import("…/page/profile/authcode/index.vue")),
meta: { title: “授权码”, login: true }
},
{
path: “/profile_comment”,
name: “ProfileComment”,
component: importLoading(() => import("…/page/profile/comment/index.vue")),
meta: { title: “我的评价”, login: true }
},

];

const accident_page_new = [
{
path: “/accident”,
name: “Accident”,
component: importLoading(() => import("…/page/accident_new/index.vue")),
meta: { title: “选择位置”, login: true },
},
{
path: “/accident_on_scene”,
name: “AccidentOnScene”,
component: importLoading(() => import("…/page/accident_new/page/on_scene.vue")),
meta: { title: “事故处理”, login: true },
},
{
path: “/accident_on_scene_sec”,
name: “AccidentOnScene”,
component: importLoading(() => import("…/page/accident_new/page/on_scene_sec.vue")),
meta: { title: “事故处理”, login: true },
},
{
path: “/accident_image_package”,
name: “AccidentOnScene”,
component: importLoading(() => import("…/page/accident_new/page/image_package.vue")),
meta: { title: “照片列表”, login: true },
},
{
path: “/accident_order_detail”,
name: “AccidentOnScene”,
component: importLoading(() => import("…/page/accident_new/page/order_detail.vue")),
meta: { title: “查看详情”, login: true },
},
{
path: “/accident_order_image”,
name: “AccidentOnScene”,
component: importLoading(() => import("…/page/accident_new/page/images.vue")),
meta: { title: “照片资料”, login: true },
},
{
path: “/accident_progress”,
name: “AccidentOnScene”,
component: importLoading(() => import("…/page/accident_new/page/progress.vue")),
meta: { title: “全部进度”, login: true },
},
{
path: “/accident_not_on_scene”,
name: “AccidentOnScene”,
component: importLoading(() => import("…/page/accident_new/page/not_on_scene.vue")),
meta: { title: “事故处理”, login: true },
},
];

const sfjd_page = [
{
path: “/sfjd_image”,
name: “sfjd”,
component: importLoading(() => import("…/page/sfjd/page/sfjd_image.vue")),
meta: { title: “拍照取证”, login: true },
},
{
path: “/sfjd_order_detail”,
name: “sfjd”,
component: importLoading(() => import("…/page/sfjd/page/order_detail.vue")),
meta: { title: “查看详情”, login: true },

}, {
path: “/sfjd_confirm”,
name: “sfjd”,
component: importLoading(() => import("…/page/sfjd/page/sfjd_confirm.vue")),
meta: { title: “填写委托信息”, login: true },
},
{
path: “/sfjd_order_delegate”,
name: “sfjd”,
component: importLoading(() => import("…/page/sfjd/page/order_delegate_info.vue")),
meta: { title: “委托信息”, login: true },
},
];

//道路救援
const rescue_page = [
{
path: “/rescue”,
name: “rescue”,
component: importLoading(() => import("…/page/rescue/index.vue")),
meta: { title: “道路救援”, login: true },
},
{
path: “/rescue/search”,
name: “rescue_search”,
component: importLoading(() => import("…/page/rescue/page/rescue_search.vue")),
meta: { title: “搜索列表”, login: true },
},
{
path: “/rescue_details”,
name: “rescue_details”,
component: importLoading(() => import("…/page/rescue/page/rescue_details.vue")),
meta: { title: “订单详情”, login: true },
},
{
path: “/rescue_list”,
name: “rescue_list”,
component: importLoading(() => import("…/page/rescue/page/rescue_list.vue")),
meta: { title: “订单列表”, login: true },
},
{
path: “/rescue_check”,
name: “rescue_check”,
component: importLoading(() => import("…/page/rescue/page/rescue_check.vue")),
meta: { title: “查看评论”, login: true },
},
{
path: ‘/rescue_charge’,
name: ‘rescue_charge’,
component: importLoading(() => import(’…/page/rescue/page/rescue_charge.vue’)),
meta: { title: ‘收费标准’, login: true },
},
];

// 驾考培训
const driver_training = [
{
path: ‘/driver_training’,
name: ‘’
},
{
path: ‘/manual_decrypt’,
name: ‘ManualDecrypt’,
component: importLoading(() => import(’@/page/ManualDecrypt’)),
}
];

// 保养维修
const maintain = [
{
path: ‘/maintain’,
component: importLoading(() => import(’@/page/maintain/order’)),
meta: { title: “车辆保养” }
},
{
path: ‘/maintain/order_detail’,
name:“OrderMaintainDetail”,
component: importLoading(() => import(’@/page/maintain/orderDetail’)),
meta: { title: “订单详情” }
},

{
path: ‘/sub_success’,
name:“SubSuccess”,
component: importLoading(() => import(’@/page/maintain/subSuccess’)),
meta: { title: “提交成功” }
},
{
path: “/maintain_order_comment”,
name: “OrderDetailComment”,
component: importLoading(() => import("…/page/maintain/pages/order_comment.vue")),
meta: { title: “订单评价” }
},
]
const service = [
{
path: ‘/repair’,
component: importLoading(() => import("…/page/service/index.vue")),
meta: { title: “车辆维修” }
}
];

const router = new Router({
routes: [
…sfjd_page,
…accident_page_new,
…home_page,
…pay_page,
…order_page,
…profile_page,
…store_page,
…wash_page,
…card_sell_page,
…rescue_page,
…driver_training,
…maintain,
…service
],
});

router.beforeEach((to, from, next) => {
// 给URL加上v参数(值为当前时间戳),以解决微信的缓存问题
// todo: 正式环境改 build 之前修改版本号,如何用 Webpack 自动生成这个版本号?
let target = !to.query.v ? { path: to.fullPath, query: { v: 1811141832 } } : {};
next(target);
});

export default router;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值