Why is the axios unified configuration parameter invalid?

expect both get and post requests to carry userID information. So the unified parameters of post request are written in config.data, and the unified parameters of get are written in get.
but! Here"s the problem. .config.params does not merge parameters.
the specific code is as follows.

Axios.interceptors.request.use(
    (config) => {
        if ( config.method === "post" ) {
            if (sessionStorage.getItem("fwqAdmin")) {
                config.data = querystring.stringify({
                    userId: JSON.parse(sessionStorage.getItem("fwqAdmin")).userId,
                    ...config.data
                });
                console.log(config);
            }
        } else if ( config.method === "get" ) {
            if (sessionStorage.getItem("fwqAdmin")) {
                config.params = {
                    userId: JSON.parse(sessionStorage.getItem("fwqAdmin")).userId,
                    ...config.params
                };
            }
        }
        config.headers.Authorization = sessionStorage.getItem("fwqAdmin") ? JSON.parse(sessionStorage.getItem("fwqAdmin")).accessToken : "";
        return config;
    },
    error => {
        console.log(error);
        return Promise.reject("" + error);
    }
);

specific use:

requestWxList() {
    let params = {
        pageNum: this.pageNav.curPage,
        pageSize: this.pageNav.pageSize
    };
    this.$http.get("/result/listSummarysPage",params)
        .then((res) => {
            console.log(res);
            this.tableData = res.data.data.items;
            this.pageNav.total = res.data.data.total;
        })
        .catch((err) =>{
            console.log(err);
        });
},
    
    
    
    
    
  

Mar.21,2021

Let me show you axios Source get the second parameter of the request is config
you treat params as config and upload config.params has no value

.


should call this.$http.get ('/ result/listSummarysPage', {params: params})


the old buddy upstairs has given the correct answer, but can only adopt one answer. Sorry. I hope the answer can help later people. No, no, no. Thank you

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e88a0c-5bd0b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e88a0c-5bd0b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?