Files
2025-06-13 21:16:12 +08:00

16 lines
380 B
JavaScript

import config from '@/admin.config.js'
export function initInterceptor() {
uni.addInterceptor('navigateTo', {
fail: ({
errMsg
}) => {
if (errMsg.indexOf('is not found') !== -1) { // 404
uni.navigateTo({
url: config.error.url + '?errMsg=' + errMsg
})
}
}
})
}