using Common.system; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using XHWK.Model; namespace XHWK.WKTool.DAL { public class Interface { /// /// 登陆 /// /// /// public int Login(string loginname, string loginpwd) { string url = "http://schoolapi.xhkjedu.com/user/login";//地址 Dictionary dic = new Dictionary { { "loginname", loginname}, { "loginpwd", loginpwd} }; string body = JsonHelper.ToJson(dic); ResultVo result = HttpHelper.PostAndRespSignle>(url, postData: body); if (result != null) { APP.UserInfo = new Model_UserInfo(); APP.ServerMsg = result.msg; APP.UserInfo = result.obj; return result.code; } else { APP.ServerMsg = "网络异常!"; APP.UserInfo =new Model_UserInfo(); return 1; } } } }