From f5023972888e48efbd27a7c352389b378763b7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Fri, 15 Nov 2019 11:40:44 +0800 Subject: [PATCH] =?UTF-8?q?[proxy]Javascript=E5=A2=9E=E5=8A=A0findLocation?= =?UTF-8?q?()=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/web/libs/http.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/web/libs/http.js b/src/main/web/libs/http.js index 21be0e51..b45f56a4 100644 --- a/src/main/web/libs/http.js +++ b/src/main/web/libs/http.js @@ -54,6 +54,15 @@ http.Server = function (options) { return null; }; + + this.findLocation = function (locationId) { + for (var i = 0; i < this.locations.length; i++) { + if (this.locations[i].id == locationId) { + return this.locations[i]; + } + } + return null; + }; }; http.Backend = function (options) {