mtindex Jump guessdetail

One ,router/index.js

{
    path:'/mtindex',
    component: mtindex,
    children:[
     {
      path:':shopid',
      component:guessdetail
     }
    ]    

    },

Two ,mtindex.vue

1,html

<div class="content">
<uL>
 <li v-for="(item,key) in indexguess" :class="{'bdr-bottom': key !==
(indexguess.length-1)}"           @click="selectItem(item)">
 <div class="img"><img :src="item.img"></div>
 <div class="con">
  <p class="name">{{item.title}}</p>
  <p class="detail">{{item.detail}}</p>
     <p class="count"><cite>{{item.price}} element </cite>
<span> Market price :{{item.ms_price}}</span><em> Sold        {{item.sale}}</em></p>
 </div>
     </li>
</uL>

</div>

2,export{}     // Set parameters

 methods:{
  selectItem(item){
        this.$router.push({
      path: '/mtindex/detail', query:{shopid: item.id}
        });        
   }
  }

Three ,guessdetail.vue   Get parameters

data(){
return{
shopid:(()=>{
                /* $route.query obtain shopid */
                return this.$route.query.shopid

               })(),

        }

}

Technology
©2019-2020 Toolsou All rights reserved,
html Writing about cherry trees , Writing about cherry trees It's unexpected Python Cherry tree (turtle The gorgeous style of Library ) Browser kernel ( understand )HashMap Explain in detail java Four functional interfaces ( a key , simple )os Simple use of module Some East 14 Pay change 16 salary , Sincerity or routine ?