数据调整

This commit is contained in:
kron
2025-07-22 00:01:29 +08:00
parent b030452161
commit cbf83952d7
6 changed files with 45 additions and 29 deletions

View File

@@ -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) {