接口返回完善

This commit is contained in:
kron
2025-07-25 10:00:18 +08:00
parent 85f1f7e33d
commit e5b1194882
3 changed files with 52 additions and 8 deletions

View File

@@ -18,6 +18,14 @@ function request(method, url, data = {}) {
if (message.indexOf("登录身份已失效") !== -1) {
uni.removeStorageSync("token");
}
if (message === "ROOM_FULL") {
resolve({ full: true });
return;
}
if (message === "ERROR_ROOM_GAME_START") {
resolve({ started: true });
return;
}
if (url.indexOf("/user/room") !== -1 && method === "GET") {
resolve({});
return;