Vue axios请求格式

import Qs from 'qs'
//axios库里的

login (ctx, form) {
      let data = {
          "username": form.username,
          "password": form.password
      }
      axios({
        method: 'post',
        url: 'oapi/login.php',
        data: Qs.stringify(data)
      }).then(function (res){})
}
jimschenchen

jimschenchen

Share

Leave a Reply