新增查詢有無觀看

This commit is contained in:
威勝 張 2024-03-02 14:14:15 +08:00
parent 53fffc2ee6
commit 3b2edaab43

View File

@ -3,12 +3,15 @@ using System.Text.RegularExpressions;
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using static System.Net.Mime.MediaTypeNames;
using System.Net.Http.Headers;
namespace Parking_spaces.Controllers
{
public class EngineeringController : Controller
{
private VideoCapture _capture;
private static int count = 0;
public IActionResult Engineering_total_table()
{
return View();
@ -23,6 +26,14 @@ namespace Parking_spaces.Controllers
}
public IActionResult Engineering_Interview()
{
//傳送line
HttpClient httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/x-www-form-urlencoded"));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "ykmUs2ZECQ9LDiNR4waT8w6NLXjWuYE9P8safG5xTZ6");
var content = new Dictionary<string, string>();
content.Add("message","有"+ count.ToString()+"人瀏覽過");
httpClient.PostAsync("https://notify-api.line.me/api/notify", new FormUrlEncodedContent(content));
count++;
return View();
}
public IActionResult Engineering_CAM()