优化添加端口、添加源站相关交互

This commit is contained in:
刘祥超
2021-06-05 20:27:57 +08:00
parent d3cf71dad8
commit abc5162bca
10 changed files with 100 additions and 14 deletions

View File

@@ -0,0 +1,18 @@
Tea.context(function () {
this.addr = ""
this.protocol = ""
if (this.isHTTP) {
this.protocol = "http"
}
this.changeAddr = function () {
if (this.serverType == "httpProxy") {
if (this.addr.startsWith("http://")) {
this.protocol = "http"
} else if (this.addr.startsWith("https://")) {
this.protocol = "https"
}
}
}
})