chore: remove unused console

This commit is contained in:
Tristan Yang
2022-08-31 22:13:35 +08:00
parent be7d547719
commit 65f8917657
31 changed files with 44 additions and 65 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ const baseQueryWithTokenCheck = async (args, api, extraOptions) => {
// 先检查token是否过期,过期则renew
const { token, refreshToken, expireTime = +new Date() } = api.getState().authData;
let result = null;
console.log("base check", whiteList.includes(api.endpoint), api.endpoint);
// console.log("base check", whiteList.includes(api.endpoint), api.endpoint);
if (!whiteList.includes(api.endpoint) && dayjs().isAfter(new Date(expireTime - 20 * 1000))) {
// 快过期了,renew
waitingForRenew = baseQuery(
+2 -2
View File
@@ -22,7 +22,7 @@ export const onMessageSendStarted = async (
// 忽略archive类型的消息
if (type == "archive") return;
// id: who send to ,from_uid: who sent
console.log("handlers data", content, type, properties, ignoreLocal, id);
// console.log("handlers data", content, type, properties, ignoreLocal, id);
const isImage = properties.content_type?.startsWith("image");
const ts = properties.local_id || +new Date();
const tmpMsg = {
@@ -45,7 +45,7 @@ export const onMessageSendStarted = async (
try {
const { data: server_mid } = await queryFulfilled;
console.log("message server mid", server_mid);
// console.log("message server mid", server_mid);
batch(() => {
dispatch(removeContextMessage({ id, mid: ts }));
dispatch(addMessage({ mid: server_mid, ...tmpMsg }));
+2 -2
View File
@@ -34,10 +34,10 @@ export const userApi = createApi({
try {
const { data: users } = await queryFulfilled;
const matchedUser = users.find((c) => c.uid == local_uid);
console.log("wtf", users, matchedUser);
// console.log("wtf", users, matchedUser);
if (!matchedUser) {
// 用户已注销或被禁用
console.log("no matched user, redirect to login");
// console.log("no matched user, redirect to login");
dispatch(resetAuthData());
} else {
const markedUsers = users.map((u) => {