vue route 跳转

index.js
{
            path: '/grouporder/grouporderdetail/id/:id',
            name: '/grouporder/grouporderdetail/id/',
            component: () => import('@/view/guestOrder/groupOrderDetail')
        },

vue

this.$router.push({
        name: "/grouporder/grouporderdetail/id/",
        params: {
          id: this.ids
        }
      });
<router-link :to="{name:'/personorder/personorderdetail/id/',params:{id:ids}}">
        <el-button size="mini" type="primary">办理预定</el-button>
</router-link>



{
        path: '/personorder/personorderdetail/id/:id',
        name: '/personorder/personorderdetail/id/',
        component: () =>              
            import('@/view/guestOrder/personOrderDetail')
        },  
{
         path:'/personorder/personorderdetail/persondetailcancel/id/:id/type/:type',
         component: () => import('@/view/guestOrder/personDetailCancel')
        },


<router-link :to="'/personorder/personorderdetail/persondetailcancel/id/'+ids+'/type/'+types">
     <el-button size="mini" type="danger" plain>跳转到取消页面</el-button>
 </router-link>

 

posted @ 2019-08-17 02:07  莫笑我胡为  阅读(737)  评论(0编辑  收藏  举报