去除切换到临时接口功能
parent
1182a6eba4
commit
bb40a8612a
|
@ -198,6 +198,7 @@ export const updateSetting = setting => {
|
|||
objectDeepMerge(defaultSetting, overwriteSetting)
|
||||
setting = defaultSetting
|
||||
}
|
||||
setting.apiSource = 'messoer' // 强制设置回 messoer 接口源
|
||||
return setting
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
export const requestMsg = {
|
||||
fail: '请求异常😮,可以多试几次,若还是不行就换一首吧。。。',
|
||||
unachievable: '哦No😱...接口无法访问了!已帮你切换到临时接口,重试下看能不能播放吧~',
|
||||
unachievable: '哦No😱...接口无法访问了!',
|
||||
// unachievable: '哦No😱...接口无法访问了!已帮你切换到临时接口,重试下看能不能播放吧~',
|
||||
notConnectNetwork: '无法连接网络',
|
||||
cancelRequest: '取消http请求',
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue