vue 页面跳转,传数据

来源:互联网 发布:解毒丹 知乎 编辑:程序博客网 时间:2024/06/08 00:28

出数据页面

exchange(){        this.$router.push({path:'/shoppingconfirm',query: { mall_id: this.mallres.mall_id ,                                                                  name:this.mallres.name,                                                                  cover:this.mallres.cover,                                                                  price:this.mallres.price,                                                                  mall_num:this.mall_num,                                                                 }});      }

接数据页面

mounted(){      this.mall_id = this.$route.query.mall_id;      this.name = this.$route.query.name;      this.cover = this.$route.query.cover;      this.price = this.$route.query.price;      this.mall_num = this.$route.query.mall_num;      this.remarks = this.$route.query.remarks;      this.total = this.mall_num * this.price;      if(this.$route.query.addressInfo != null){        this.addressInfo = JSON.parse(this.$route.query.addressInfo);      }else{        this.getaddressinfo();      }    }
原创粉丝点击