How to set callback by vue-resource timeout

my project introduces vue2.min.js and vue-resource.min.js files. How can I set the callback function?

      this.$http.post(url, {
        keywords : [
          { "key" : key, "limit" : 50 }
        ]
      },{timeout : 3000}).then(function(res) {
          console.log(res)
      },function(err){
          console.log(err)
      })

       
May.04,2021



Vue.http.interceptors.push(function(request, next) {
    var timeout
    if (request.timeout) {
      clearTimeout(timeout)
      timeout = setTimeout(function() {
        console.log('')
        request.abort()
      }.bind(this), request.timeout)
    }
    next(function(response) {
      return response
    })
  })
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32f5e-2be3b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32f5e-2be3b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?