axios发布数据格式

I want axios to post data like the following format(use jquery ajax.post)

enter image description here

var data = {};
data.params = querystring.stringify({'cmd': 'getUnreadCount', 'isNewAdmin':''});
data = querystring.stringify(data);
axios.post(url, data);

But actually it was posted like this. How to change params to object like above.

enter image description here

Looks like you need to use JSON.stringify instead of querystring.stringify in the second line to serialize params.

var data = querystring.stringify({
  params: JSON.stringify({'cmd': 'getUnreadCount', 'isNewAdmin':''})
});
axios.post(url, data);