接口返回完善
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user