From c5aaca4df4fe8edeb081e85e5adde297d6424835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A8=81=E5=8B=9D=20=E5=BC=B5?= Date: Wed, 24 Apr 2024 12:51:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=B9=E6=93=9A=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=20=E9=80=B2=E5=85=A5=E6=A0=A1=E5=9C=92=E7=9A=84?= =?UTF-8?q?=E6=90=9C=E5=B0=8B=E6=A2=9D=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Parking_spaces/Properties/launchSettings.json | 4 +- .../Views/Engineering/Yuntech_in_car.cshtml | 54 +++++++++++++++++++ Parking_spaces/Views/Home/Login.cshtml | 2 +- 3 files changed, 57 insertions(+), 3 deletions(-) diff --git a/Parking_spaces/Properties/launchSettings.json b/Parking_spaces/Properties/launchSettings.json index c3a631a..092e2c5 100644 --- a/Parking_spaces/Properties/launchSettings.json +++ b/Parking_spaces/Properties/launchSettings.json @@ -3,7 +3,7 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:2361", + "applicationUrl": "http://140.125.20.183:2361", "sslPort": 44352 } }, @@ -11,7 +11,7 @@ "Parking_spaces": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "http://localhost:5173", + "applicationUrl": "http://140.125.20.183:5173", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, diff --git a/Parking_spaces/Views/Engineering/Yuntech_in_car.cshtml b/Parking_spaces/Views/Engineering/Yuntech_in_car.cshtml index 87bbb13..e98d7a9 100644 --- a/Parking_spaces/Views/Engineering/Yuntech_in_car.cshtml +++ b/Parking_spaces/Views/Engineering/Yuntech_in_car.cshtml @@ -14,6 +14,8 @@ +
+ @@ -132,6 +134,31 @@ } }); */ + var select = document.getElementById("location_select_id") + $.ajax({ + type: "GET", + url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/location_name" , + data: {}, + headers: { + 'Authorization': token + }, + contentType: "application/json", + headers: { + 'Authorization': token + }, + success: function (Model) { + console.log(Model) + // 清除现有的选项 + select.innerHTML = ""; + // 添加新的选项 + Model.forEach(function (item) { + var option = document.createElement('option'); + option.text = item.location_name; + select.add(option); + }); + } + }); + } @@ -370,6 +397,33 @@ } + + + + +