稍微调整

This commit is contained in:
buvta
2020-11-13 20:55:11 +08:00
parent a887968458
commit 51aa21e551
2 changed files with 3 additions and 2 deletions

View File

@@ -348,7 +348,7 @@ export default {
this.show.proxyDialog = false
this.setting.proxy.type = 'none'
this.updateSettingEvent()
this.$message.info('未使用代理')
this.$message.info('取消使用代理')
}
this.inputPassword = ''
},
@@ -423,7 +423,7 @@ export default {
this.d.proxy.port = this.proxy.port
await this.updateSettingEvent()
this.show.proxyDialog = false
await zy.proxy()
zy.proxy()
this.$message.info('开始使用代理')
},
clearDBEvent () {

View File

@@ -377,6 +377,7 @@ const zy = {
if (db.proxy) {
if (db.proxy.type === 'none') {
session.setProxy({ proxyRules: 'direct://' })
http.globalAgent = https.globalAgent = new ElectronProxyAgent(session)
} else if (db.proxy.type === 'manual') {
if (db.proxy.scheme && db.proxy.url && db.proxy.port) {
const proxyURL = db.proxy.scheme + '://' + db.proxy.url.trim() + ':' + db.proxy.port.trim()