Login.aspx.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. namespace LYFZ.WeixinServers
  8. {
  9. public partial class Login : System.Web.UI.Page
  10. {
  11. protected void Page_Load(object sender, EventArgs e)
  12. {
  13. string strKfAccount, strKfPassword;
  14. if ( VerifyParameters(out strKfAccount, out strKfPassword) )
  15. {
  16. // 客服账号和密码正确,返回数据给客户端;
  17. // 1.返回企业的消息服务器详情;
  18. // 2.返回企业的app类型信息;
  19. // 3.返回企业的客服账号详情;
  20. // 4.返回;
  21. }
  22. else
  23. {
  24. Response.Write("{\"code\":201, \"msg\":\"参数名不对或参数缺少\"}");
  25. }
  26. }
  27. public bool VerifyParameters(out string kf_account , out string kf_psw)
  28. {
  29. kf_account = kf_psw = "";
  30. if ( Request.Form["kf_account"] != null && Request.Form["kf_psw"] != null )
  31. {
  32. kf_account = Request.Form["kf_account"];
  33. kf_psw = Request.Form["kf_psw"];
  34. if (!string.IsNullOrEmpty(kf_account) && !string.IsNullOrEmpty(kf_psw))
  35. return true;
  36. }
  37. return false;
  38. }
  39. }
  40. }