VUE jump page with parameters

First page

//点击按钮执行函数
 gourl(){
      this.$router.push({
          path: '/demo2-page5',
          // name: 'mallList',
          query: {
            pkid: this.pkid
          }
        })

Second page

//页面加载此函数
 getParams() {
      //取到路由带过来的参数
      this.pkid = this.$route.query.pkid;
    }

Guess you like

Origin blog.csdn.net/qq_39072819/article/details/103849308