mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-15 21:20:25 +08:00
优化添加端口、添加源站相关交互
This commit is contained in:
@@ -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
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user