axios请求在url后面拼接属性

需要在url后面拼接我表单中的user属性,怎么做

类似于这种格式http://xxx:9090/sss?username=1&password=2&.....

我是这样做的可是报错

var app = new Vue({
        el: "#wrap",
        data: {
            user:{},//用来保存用户数据
        },
        methods:{
            //用户登录
            login(){
                //发送登录请求JSON.stringify(this.user)
                axios.get("http://localhost:8989/user/login?user="+JSON.stringify(this.user)).then(res=>{
                    console.log(res.data);
                    if(res.data.state){
                        alert(res.data.msg+",点击确定进入主页!");
                        //将登录用户信息放入localStorage key  value
                        localStorage.setItem("user",JSON.stringify(res.data.user));
                        location.href="/success.html";
                    }else{
                        alert(res.data.msg);
                    }
                });
            }
        }
    });

报的错为
Request URL: http://localhost:8989/user/login?user={%22username%22:%22asd%22,%22password%22:%22asd%22}

Request Method: GET

Status Code: 400

这个跟提交的请求参数的类型有关系,如果是对象参数,不能直接拼接,要用表单设置才行。
https://www.cnblogs.com/Ivy-s/p/8353356.html

拼url上的这种方式,后台数据要一个一个接收,不能接收整个对象
json有json的传法,拼url的这种方式不能传json

用字符串模板

axios.get(`http://localhost:8989/user/login?user=${JSON.stringify(this.user}`)