refactor: 1

pull/192/head
xiaojunnuo 2022-03-07 13:54:18 +08:00
parent 8765aaa907
commit 8beb0ec6ac
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,8 @@ export default {
async init () {
this.status = this.$status
this.config = await this.$api.config.reload()
const config = await this.$api.config.reload()
this.$set(this, 'config', config)
this.systemPlatform = await this.$api.info.getSystemPlatform()
console.log('config', this.config, this.systemPlatform)
// eslint-disable-next-line no-debugger

View File

@ -30,7 +30,7 @@
</a-form-item>
<a-form-item label="绑定IP" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-input v-model="config.server.host"/>
<div class="form-help">修改后需要重启应用</div>
<div class="form-help">你可以设置0.0.0.0让其他电脑可以使用此代理服务</div>
</a-form-item>
<a-form-item label="代理端口" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-input v-model="config.server.port"/>
@ -246,7 +246,6 @@ export default {
computed: {
speedDnsOptions () {
const options = []
console.log('this.config', this.config)
if (!this.config || !this.config.server || !this.config.server.dns || !this.config.server.dns.providers) {
return options
}

View File

@ -83,7 +83,7 @@ const api = {
registerProcessListener()
},
async close () {
async close () {
return new Promise((resolve, reject) => {
if (server) {
server.close((err) => {