public dynamic Login() { string name = Fun.Query("name"); string password = Fun.Query("password"); LoginBLL bll = new LoginBLL(); S_UserInfo user = bll.Login(name, password); if (user == null) { return("失败"); } UserInfo u = new UserInfo(); u.id = user.user_id; u.name = user.user_name.Trim(); ManagerBLL m = new ManagerBLL(); S_ManagerInfo manager = m.GetManagerByLoginId(user.user_id); if (manager != null) { return(new { data = u, manager = manager }); } else { CustomerBLL c = new CustomerBLL(); C_CustomerInfo customer = c.GetCustomerByLoginId(user.user_id); return(new { data = u, customer = customer }); } }