去除切换到临时接口功能

pull/96/head
lyswhut 2019-08-22 23:57:10 +08:00
parent 1182a6eba4
commit bb40a8612a
3 changed files with 4 additions and 2 deletions

View File

@ -198,6 +198,7 @@ export const updateSetting = setting => {
objectDeepMerge(defaultSetting, overwriteSetting)
setting = defaultSetting
}
setting.apiSource = 'messoer' // 强制设置回 messoer 接口源
return setting
}

View File

@ -1,6 +1,7 @@
export const requestMsg = {
fail: '请求异常😮,可以多试几次,若还是不行就换一首吧。。。',
unachievable: '哦No😱...接口无法访问了!已帮你切换到临时接口,重试下看能不能播放吧~',
unachievable: '哦No😱...接口无法访问了!',
// unachievable: '哦No😱...接口无法访问了!已帮你切换到临时接口,重试下看能不能播放吧~',
notConnectNetwork: '无法连接网络',
cancelRequest: '取消http请求',
}

View File

@ -84,7 +84,7 @@ export const httpFatch = (url, options = { method: 'get' }) => {
return promise
}
if (err.message === 'socket hang up') {
window.globalObj.apiSource = 'temp'
// window.globalObj.apiSource = 'temp'
return Promise.reject(new Error(requestMsg.unachievable))
}
if (err.code === 'ENOTFOUND') return Promise.reject(new Error(requestMsg.notConnectNetwork))