This commit is contained in:
chashaobao
2025-12-27 16:26:53 +08:00
parent 14853bcda2
commit 23879fe88d

View File

@ -39,9 +39,11 @@ export const usePublishJob = (jobId?: string): [boolean, Dispatch<SetStateAction
} catch (error) { } catch (error) {
Taro.hideLoading(); Taro.hideLoading();
const e = error as HttpError; const e = error as HttpError;
console.log('哈哈哈');
console.dir(e);
const errorCode = e.errorCode; const errorCode = e.errorCode;
const errorMsg = e.info?.() || e.message; const errorMsg = e.errorMsg || e.info?.() || e.message;
collectEvent(CollectEventName.PUBLISH_OPEN_JOB_FAILED, { jobId, error: e.info?.() || e.message }); collectEvent(CollectEventName.PUBLISH_OPEN_JOB_FAILED, { jobId, error: errorMsg });
if (errorCode === RESPONSE_ERROR_CODE.INSUFFICIENT_FREE_BALANCE) { if (errorCode === RESPONSE_ERROR_CODE.INSUFFICIENT_FREE_BALANCE) {
setShowBuy(true); setShowBuy(true);
} else if (errorCode === RESPONSE_ERROR_CODE.INSUFFICIENT_BALANCE) { } else if (errorCode === RESPONSE_ERROR_CODE.INSUFFICIENT_BALANCE) {
@ -50,7 +52,7 @@ export const usePublishJob = (jobId?: string): [boolean, Dispatch<SetStateAction
} else if (errorCode === RESPONSE_ERROR_CODE.BOSS_VIP_EXPIRED) { } else if (errorCode === RESPONSE_ERROR_CODE.BOSS_VIP_EXPIRED) {
Toast.info('该通告已到期,请创建新通告', 3000); Toast.info('该通告已到期,请创建新通告', 3000);
} else { } else {
Toast.error(errorMsg || '发布失败请重试', 3000); Toast.info(errorMsg || '发布失败请重试', 3000);
} }
console.error(e); console.error(e);
} }