新增查詢有無觀看
This commit is contained in:
parent
53fffc2ee6
commit
3b2edaab43
@ -3,12 +3,15 @@ using System.Text.RegularExpressions;
|
|||||||
using Emgu.CV;
|
using Emgu.CV;
|
||||||
using Emgu.CV.CvEnum;
|
using Emgu.CV.CvEnum;
|
||||||
using Emgu.CV.Structure;
|
using Emgu.CV.Structure;
|
||||||
|
using static System.Net.Mime.MediaTypeNames;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
|
||||||
namespace Parking_spaces.Controllers
|
namespace Parking_spaces.Controllers
|
||||||
{
|
{
|
||||||
public class EngineeringController : Controller
|
public class EngineeringController : Controller
|
||||||
{
|
{
|
||||||
private VideoCapture _capture;
|
private VideoCapture _capture;
|
||||||
|
private static int count = 0;
|
||||||
public IActionResult Engineering_total_table()
|
public IActionResult Engineering_total_table()
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
@ -23,6 +26,14 @@ namespace Parking_spaces.Controllers
|
|||||||
}
|
}
|
||||||
public IActionResult Engineering_Interview()
|
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();
|
return View();
|
||||||
}
|
}
|
||||||
public IActionResult Engineering_CAM()
|
public IActionResult Engineering_CAM()
|
||||||
|
Loading…
Reference in New Issue
Block a user