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

This commit is contained in:
GoEdgeLab
2021-06-05 20:27:57 +08:00
parent b0dedb653e
commit 2d52bdf7ac
10 changed files with 100 additions and 14 deletions

View File

@@ -6,6 +6,11 @@ Tea.context(function () {
this.address = ""
this.protocol = this.protocols[0].code
// 初始化
if (this.protocol == "http") {
this.address = "80"
}
if (window.parent.UPDATING_ADDR != null) {
this.isUpdating = true
let addr = window.parent.UPDATING_ADDR
@@ -16,4 +21,18 @@ Tea.context(function () {
this.address = addr.host + ":" + addr.portRange
}
}
this.changeProtocol = function () {
switch (this.protocol) {
case "http":
this.address = "80"
break
case "https":
this.address = "443"
}
}
this.addPort = function (port) {
this.address = port
}
});