1. 程式人生 > >axios 設置超時時間 timeout

axios 設置超時時間 timeout

== 設置 .proto tostring this col data ucc 超時

this.$ajax.post(‘‘, {operate: type, ids: this.data.id.toString(), data_type: ‘ips‘}, {timeout: 60000})
        .then(res => {
          if (res.status) {
            this.$message({
              message: ‘雲操成功‘,
              type: ‘success‘
            })
          }
        })
        .
catch(_ => { this.errMessage = (_ && _.data && Object.prototype.toString.call(_.data) === ‘[object Array]‘) ? _.data[0][Object.keys(_.data[0])[0]] : _.message this.$message.error(this.errMessage) })

axios 設置超時時間 timeout