feat:
This commit is contained in:
@ -39,9 +39,11 @@ export const usePublishJob = (jobId?: string): [boolean, Dispatch<SetStateAction
|
||||
} catch (error) {
|
||||
Taro.hideLoading();
|
||||
const e = error as HttpError;
|
||||
console.log('哈哈哈');
|
||||
console.dir(e);
|
||||
const errorCode = e.errorCode;
|
||||
const errorMsg = e.info?.() || e.message;
|
||||
collectEvent(CollectEventName.PUBLISH_OPEN_JOB_FAILED, { jobId, error: e.info?.() || e.message });
|
||||
const errorMsg = e.errorMsg || e.info?.() || e.message;
|
||||
collectEvent(CollectEventName.PUBLISH_OPEN_JOB_FAILED, { jobId, error: errorMsg });
|
||||
if (errorCode === RESPONSE_ERROR_CODE.INSUFFICIENT_FREE_BALANCE) {
|
||||
setShowBuy(true);
|
||||
} 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) {
|
||||
Toast.info('该通告已到期,请创建新通告', 3000);
|
||||
} else {
|
||||
Toast.error(errorMsg || '发布失败请重试', 3000);
|
||||
Toast.info(errorMsg || '发布失败请重试', 3000);
|
||||
}
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user