uni.request發起網絡請求json
url
開發者服務器接口地址服務器
data
請求的參數網絡
headerapp
method
dataTypeurl
responseType
設置響應的數據類型spa
statusCode 開發者服務器返回的http狀態碼3d
data數聽說明code
<template> <view></view> </template>
// get const requestTask1 = uni.request({ url: ' ', success: function(res) { console.log(res.data); } }); // const requestTask2 = uni.request({ url :'' data:{}, method: 'POST', header: {'content-type': 'application/x-www-form-urlencoded'}, success: function(res){ }
若本號內容有作得不到位的地方(好比:涉及版權或其餘問題),請及時聯繫咱們進行整改便可,會在第一時間進行處理。orm
這是一個有質量,有態度的博客接口