mirror of
https://github.com/hanxi/xiaomusic.git
synced 2025-12-06 14:52:50 +08:00
fix: 修复自动填端口为0的问题
This commit is contained in:
8
xiaomusic/static/default/setting.js
vendored
8
xiaomusic/static/default/setting.js
vendored
@@ -212,6 +212,14 @@ $(function () {
|
||||
|
||||
$("#auto-port").on("click", () => {
|
||||
const port = window.location.port;
|
||||
if (port == 0) {
|
||||
const protocol = window.location.protocol;
|
||||
if (protocol == 'https:') {
|
||||
port = 443;
|
||||
} else {
|
||||
port = 80;
|
||||
}
|
||||
}
|
||||
console.log(port);
|
||||
$("#public_port").val(port);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user