数据调整
This commit is contained in:
@@ -2,13 +2,13 @@ const BASE_URL = "https://api.shelingxingqiu.com/api/shoot";
|
||||
|
||||
function request(method, url, data = {}) {
|
||||
const token = uni.getStorageSync("token");
|
||||
const header = {};
|
||||
if (token) header.Authorization = `Bearer ${token || ""}`;
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
url: `${BASE_URL}${url}`,
|
||||
method,
|
||||
header: {
|
||||
Authorization: `Bearer ${token || ""}`,
|
||||
},
|
||||
header,
|
||||
data,
|
||||
success: (res) => {
|
||||
if (res.data) {
|
||||
|
||||
Reference in New Issue
Block a user