You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.7 KiB
68 lines
1.7 KiB
using EasyBL.WebApi.Filters;
|
|
using EasyBL.WEBAPP.SYS;
|
|
using Entity.ShowEasyDtos;
|
|
using Entity.Sugar;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using System.Web.Http;
|
|
|
|
namespace WebApp.Controllers
|
|
{
|
|
public class HelloController : ApiController
|
|
{
|
|
|
|
|
|
[HttpGet]
|
|
public HttpResponseMessage GetHello(string message)
|
|
{
|
|
return new HelloService().Echo(message);
|
|
}
|
|
|
|
[HttpPost]
|
|
public HttpResponseMessage PostBody([FromBody] string dto)
|
|
{
|
|
|
|
System.Diagnostics.Debug.WriteLine(dto);
|
|
|
|
return new HttpResponseMessage();
|
|
|
|
}
|
|
|
|
[HttpPost]
|
|
public HttpResponseMessage PostParam(string param)
|
|
{
|
|
|
|
System.Diagnostics.Debug.WriteLine(param);
|
|
|
|
return new HttpResponseMessage();
|
|
|
|
}
|
|
|
|
[HttpGet]
|
|
[SEApiSecurityFilter]
|
|
public HttpResponseMessage GetMemberInfo(string OrgID, string Account)
|
|
{
|
|
//根據參數取得Member的詳細信息,調用時需要在Header中添加token相關信息,包括orgId,userid,timestamp,token
|
|
//需要驗證的token相關信息的Api,添加上 [SEApiSecurityFilter]即可
|
|
return new TestService().GetMemberInfo(OrgID, Account);
|
|
}
|
|
|
|
[HttpPost]
|
|
//[SEApiSecurityFilter]
|
|
public HttpResponseMessage Login([FromBody] TestUser dto)
|
|
{
|
|
|
|
System.Diagnostics.Debug.WriteLine("Account" + ": " + dto.Account);
|
|
System.Diagnostics.Debug.WriteLine("Password" + ": " + dto.Password);
|
|
|
|
//登陸並返回token
|
|
return new HttpResponseMessage();
|
|
}
|
|
|
|
|
|
}
|
|
}
|