Browse Source

[WHAT] 完成會員註冊 [WHY] 開發 API

Dev
Janie 2 years ago
parent
commit
02b60769df
  1. 12
      EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs
  2. 2
      EuroTran/Entity/Sugar/SETB_CMS_Member.cs

12
EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs

@ -23,8 +23,8 @@ namespace EasyBL.WEBAPP.SYS
{ {
public class SignupService : ServiceBase public class SignupService : ServiceBase
{ {
public static string SERVER_IP = "www.origtek.com";
public static string SERVER_PORT = "9105";
public static string SERVER_IP = "localhost";
public static string SERVER_PORT = "3466";
//使用者以信箱註冊 //使用者以信箱註冊
public HttpResponseMessage SignupWithEmail(SETB_CMS_Member newUser) public HttpResponseMessage SignupWithEmail(SETB_CMS_Member newUser)
@ -34,9 +34,12 @@ namespace EasyBL.WEBAPP.SYS
{ {
do do
{ {
string sAccount = newUser.Account;
string sAccount = newUser.Email;
string sPassword = newUser.Password; string sPassword = newUser.Password;
string sEmail = newUser.Email; string sEmail = newUser.Email;
string sFirstName = newUser.FirstName;
string sLastName = newUser.LastName;
string sSubscribe = newUser.Subscribe;
string sMemberID = Guid.NewGuid().ToString(); //會員編號為GUID string sMemberID = Guid.NewGuid().ToString(); //會員編號為GUID
string sOrgID = "TG"; //公司編號預設為TG string sOrgID = "TG"; //公司編號預設為TG
string sStatus = "0"; //會員狀態為未驗證(F) string sStatus = "0"; //會員狀態為未驗證(F)
@ -48,6 +51,7 @@ namespace EasyBL.WEBAPP.SYS
newUser.OrgID = sOrgID; newUser.OrgID = sOrgID;
newUser.Status = sStatus; newUser.Status = sStatus;
newUser.Password = sEncryptPwd; newUser.Password = sEncryptPwd;
newUser.Account = newUser.Email;
//開始寄信 //開始寄信
var oEmail = new Emails(); //寄件人 var oEmail = new Emails(); //寄件人
@ -206,7 +210,7 @@ namespace EasyBL.WEBAPP.SYS
Type = "to" Type = "to"
}; };
toEmail.Add(oEmailTo); toEmail.Add(oEmailTo);
oEmail.FromUserName = "【ShowEasy 註冊成功】"; //取fonfig
oEmail.FromUserName = "【ShowEasy 認證成功】"; //取fonfig
oEmail.Title = "歡迎加入ShowEasy🧡"; //取fonfig oEmail.Title = "歡迎加入ShowEasy🧡"; //取fonfig
oEmail.EmailBody = CompleteRegistration_Mail(oUser.FirstName); oEmail.EmailBody = CompleteRegistration_Mail(oUser.FirstName);
oEmail.IsCCSelf = false; oEmail.IsCCSelf = false;

2
EuroTran/Entity/Sugar/SETB_CMS_Member.cs

@ -135,7 +135,7 @@ namespace Entity.Sugar
/// Nullable:True /// Nullable:True
/// </summary> /// </summary>
public string Subscribe { get; set; } public string Subscribe { get; set; }
public const string CN_SUBSCRIBE = "Subscribe";
public const string CN_Subscribe = "Subscribe";
/// <summary> /// <summary>
/// Desc: /// Desc:

Loading…
Cancel
Save