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-1e9d4ab-5c760.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-1e9d4ab-5c760.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?