修复代理bug

pull/96/head
lyswhut 2019-09-16 00:24:30 +08:00
parent b9aedc9165
commit a16b825c3b
3 changed files with 6 additions and 8 deletions

View File

@ -132,7 +132,7 @@ export default {
this.initData()
this.globalObj.apiSource = this.setting.apiSource
this.globalObj.proxy = this.setting.network.proxy
this.globalObj.proxy = Object.assign({}, this.setting.network.proxy)
window.globalObj = this.globalObj
},
enableIgnoreMouseEvents() {

View File

@ -217,11 +217,9 @@ export const http_jsonp = (url, options, callback) => {
})
}
const getProxyInfo = () => {
return window.globalObj.proxy.enable
const getProxyInfo = () => window.globalObj.proxy.enable
? `http://${window.globalObj.proxy.username}:${window.globalObj.proxy.password}@${window.globalObj.proxy.host}:${window.globalObj.proxy.port};`
: undefined
}
const fatchData = (url, method, options, callback) => {
// console.log(url, options)

View File

@ -64,10 +64,10 @@ div.scroll(:class="$style.setting")
material-checkbox(id="setting_list_showalbum" v-model="current_setting.list.isShowAlbumName" label="是否显示专辑栏")
dt 网络设置
dd
h3 代理设置
h3 代理设置歌曲下载暂不支持代理
div
p
material-checkbox(id="setting_network_proxy_enable" v-model="current_setting.network.proxy.enable" @change="handleProxyChange('enabel')" label="是否启用")
material-checkbox(id="setting_network_proxy_enable" v-model="current_setting.network.proxy.enable" @change="handleProxyChange('enable')" label="是否启用")
p
material-input(:class="$style.gapLeft" v-model="current_setting.network.proxy.host" @change="handleProxyChange('host')" placeholder="主机")
material-input(:class="$style.gapLeft" v-model="current_setting.network.proxy.port" @change="handleProxyChange('port')" placeholder="端口")