Skip to content

Commit

Permalink
修复设置域名绑定未重定向的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
songchudong committed Jan 7, 2022
1 parent 1d2bff0 commit a98c5f7
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions BTPanel/static/amd/config.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -2021,16 +2021,26 @@ define(["require", "exports", "./snabbdom", "./public/public"], function (requir
return [2];
});
}); });
$('.savePanelConfig').on('click', function () { return __awaiter(_this, void 0, void 0, function () {
var _a, webname, session_timeout, domain, limitip, sites_path, backup_path, address, systemdate;
$('.savePanelConfig').on('click', function (ev) { return __awaiter(_this, void 0, void 0, function () {
var name, url, _a, webname, session_timeout, domain, limitip, sites_path, backup_path, address, systemdate;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
name = $(ev.target).prev().find('input').attr('name');
url = null;
_a = this.configInfo, webname = _a.webname, session_timeout = _a.session_timeout, domain = _a.domain, limitip = _a.limitip, sites_path = _a.sites_path, backup_path = _a.backup_path, address = _a.address, systemdate = _a.systemdate;
return [4, this.$request('setPanelConfig', { webname: webname, session_timeout: session_timeout, domain: domain, limitip: limitip, sites_path: sites_path, backup_path: backup_path, address: address, systemdate: systemdate })];
case 1:
_b.sent();
this.$refreshBrowser();
if (name === 'domain') {
if (this.$checkDomain(domain)) {
url = "".concat(location.protocol, "//").concat(domain, ":").concat(location.port).concat(location.pathname);
}
else if (domain === '') {
url = "".concat(location.protocol, "//").concat(address, ":").concat(location.port).concat(location.pathname);
}
}
this.$refreshBrowser(url);
return [2];
}
});
Expand Down

0 comments on commit a98c5f7

Please sign in to comment.