Vue pages pass values to each other

because I just learned vue, I don"t quite understand what I read on the official website.
there is such a requirement:

button,,



,


  planDetail(personid, plan, relation, productProperty) {
        let param = {
          personId: personid,
          productCode: plan
        };
        console.log("", param);
        this.$http.postBody("/1/111", param, result => {
          console.log(result);
          this.productDetail = result.body.rows;
          if (relation == "1") {
            this.detailTitle =
              productProperty == "1" ? "" : " " + "";
          } else {
            this.detailTitle =
              productProperty == "1" ? "" : "" + "vs";
          }
          this.familyShow = true;
                          this.$router.push({name: "employeeplan", query:param})

        });
Apr.26,2021

query and params need to be configured in router.


PolarisJack is right.

        /*  */
        /** 
        * index.jsrouter
        * {
        * path: '/....',
        * name: 'aaa',
        * component: AAA
        * } 
        */
        this.$router.push({
                name: 'aaa',
                params: {
                        nameYouWant: name1,
                        nameYouWant2: name2
                }
        })
        
        /*  */
        // $route, r, name1
        let thingsWeGet = this.$route.params.nameYouWant
Menu