mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/lyswhut/lx-music-desktop.git
synced 2026-09-20 08:04:00 +08:00
去除切换到临时接口功能
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user