欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          vue的數(shù)據(jù)交互形式有哪些

          var that=this

          get請求

          that.$http.get("1.txt").then(function(result){

          console.log(result)

          this.msg=result.data;

          })

          post請求 需要環(huán)境 發(fā)送數(shù)據(jù) 接收數(shù)據(jù)

          that.$http.post("1.txt","").then(function(result){

          console.log(result)

          })

          綜合性請求

          that.$http({

          method:"get",

          url:"1.txt"

          }).then(function(result){

          console.log(result.data)

          })

          es6請求 method 請求方式 cache 是否緩存是否重新加載

          fetch("url",{method:"get",cache:"reload"}).then(function(){

          })

          vue2 請求

          axios({

          url:"www.baidu.com?pageStart=18pageSize=3",

          method:"get/post",

          如果是get請求的話 用params 來傳輸數(shù)據(jù)或者地址欄拼接

          params:{

          pageStart:1,

          pageSize:3

          }

          如果是post請求的話 用data去傳輸數(shù)據(jù)

          data:{

          }

          })

          實例

          百度跨域請求

          var that=this;

          that.$http.jsonp("",{wd:this.abc},{jsonp:"cb"}).then(function(result){

          console.log(result.data.s)

          })

          360跨域請求

          that.$http.jsonp("https://sug.so.#/suggest?encodein=utf-8&encodeout=utf-8",{word:this.abc},{emulateJSON:true}).then(function(result){

          console.log(result.data.s)})

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號