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){})
}

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

BACK TO TOP