route.js 4.19 KB
/**
 * Created by shop on 2016/11/10.
 */

import Home from './components/pages/home.vue';
import personCenter from './components/pages/personCenter.vue';
import browseRecordList from './components/pages/browseRecordList.vue';
import collectionList from './components/pages/collectionList.vue';
import myAddress from './components/pages/myAddress.vue';
import addAddress from './components/pages/addAddress.vue';
import myCoupon from './components/pages/myCoupon.vue';
import myCouponDetail from './components/pages/myCouponDetail.vue';
import couponCenter from './components/pages/couponCenter.vue';
import couponCenterDetail from './components/pages/couponCenterDetail.vue';
import matchNet from './components/pages/matchNet.vue';
import goodsGroup from './components/pages/goodsGroup.vue';
import goodsDetail from './components/pages/goodsDetail.vue';
import carList from './components/pages/carList.vue';
import count from './components/pages/count.vue';
import pay from './components/pages/pay.vue';
import allOrderList from './components/pages/allOrderList.vue';
import orderDetail from './components/pages/orderDetail.vue';
import EMS from './components/pages/EMS.vue';
import evaluate from './components/pages/evaluate.vue';
import returnGoods from './components/pages/returnGoods.vue';
import returnGoodsDetail from './components/pages/returnGoodsDetail.vue';
import fail from './components/pages/fail.vue';
import search from './components/pages/search.vue';
import selectAddress from './components/pages/selectAddress.vue';
import moreComments from './components/pages/moreComments.vue';

export default [
    {path: '/pageId/:pageId', name: '/pageId', component: Home},
    {path: '/personCenter', name: 'personCenter', component: personCenter},
    {path: '/browseRecordList', name: 'browseRecordList', component: browseRecordList},
    {path: '/collectionList', name: 'collectionList', component: collectionList},
    {path: '/myAddress', name: 'myAddress', component: myAddress},
    {path: '/addAddress/Id/:Id/teype/:teype', name: 'addAddress', component: addAddress},
    {path: '/myCoupon', name: 'myCoupon', component: myCoupon},
    {path: '/myCouponDetail/cplId/:cplId', name: 'myCouponDetail', component: myCouponDetail},
    {path: '/couponCenter', name: 'couponCenter', component: couponCenter},
    {path: '/couponCenterDetail/cplId/:cplId', name: 'couponCenterDetail', component: couponCenterDetail},
    {path: '/matchNet', name: 'matchNet', component: matchNet},
    {path: '/goodsGroup/typer/:typer/productListId/:productListId', name: 'goodsGroup', component: goodsGroup},
    {path: '/goodsDetail/productId/:productId', name: 'goodsDetail', component: goodsDetail},
    {path: '/carList', name: 'carList', component: carList},
    /**
     * 订单确认(结算页)
     * addressId:收货地址id ,结算时传0
     * cplID:使用的优惠券id ,结算时传0
     * from:订单来源,1:购物车,2:商品详情
     * Goods:需要结算的商品,格式如 20201-4,20004-1   ‘ - ’前面的是商品ID,后面的是对应商品的数量,多个商品用“,”分隔
     */
    {path: '/count/addressId/:addressId/cplID/:cplID/from/:from/Goods/:Goods', name: 'count', component: count},

    {path: '/pay/orderId/:orderId', name: 'pay', component: pay},
    {path: '/allOrderList', name: 'allOrderList', component: allOrderList},
    {path: '/orderDetail/orderId/:orderId', name: 'orderDetail', component: orderDetail},
    {path: '/EMS', name: 'EMS', component: EMS},
    {path: '/evaluate', name: 'evaluate', component: evaluate},
    {path: '/returnGoods', name: 'returnGoods', component: returnGoods},
    {path: '/returnGoodsDetail', name: 'returnGoodsDetail', component: returnGoodsDetail},
    /**
     * 支付成功、失败页面
     * status:支付状态,1成功,2失败
     * con:原因,成功为"支付成功"
     * orderId:订单id,
     *
     */
    {path: '/fail/status/:status/con/:con/orderId/:orderId', name: 'fail', component: fail},

    {path: '/search', name: 'search', component: search},
    {path: '/selectAddress/id/:id', name: 'selectAddress', component: selectAddress},
    {path: '/moreComments', name: 'moreComments', component: moreComments},
    {path: '*', redirect: '/pageId/0'}
]