1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
跳转到下一页
=======html
<van-cell :title="$t('mine.feedback')"
               icon="comment-circle"
               is-link
              @click="goToPage('fankui')"/>
 
=======JS
export default {
    data() {
       return{
          methods: {
             //不带参数的
              goToPage(name) {
               // alert("1");
                this.$router.push({name});
            },
           //或者
             onAddress(){
               this.$router.push({name:'myAddress'});
            },
           //带有参数的
           //获取商品详情
            goToDetail(sid) {
                //alert("aaa");
                this.$router.push({
                    name: "goodsDetail",
                    params: {
                        id: sid
                    }
                });
            },
           //返回上一页
           onClick() {
                this.$router.go(-1);<br>               //或者<br>                this.$router.back();
            },
          }
      }
   }
}

  

posted on   我的梦想是开个小店  阅读(6268)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示