Vue axios请求格式

Last modified date

Comments: 0

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

即使苍天陨落,契约必须完成

Share

Leave a Reply