diff --git a/denglu/denglu.wxml b/denglu/denglu.wxml index 9e18f1c..e73e4ca 100644 --- a/denglu/denglu.wxml +++ b/denglu/denglu.wxml @@ -1,7 +1,11 @@
+<<<<<<< HEAD + +======= +>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6 diff --git a/denglu/denglu.wxss b/denglu/denglu.wxss index cd76cca..9c331f7 100644 --- a/denglu/denglu.wxss +++ b/denglu/denglu.wxss @@ -48,7 +48,11 @@ page{ text-align: right; margin-right: 22px; margin-top: 11px; +<<<<<<< HEAD + color: #cccccc; +======= color: #000; +>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6 font-size: 14px } @@ -62,7 +66,11 @@ page{ .loginBtnView { width: 100%; height: auto; +<<<<<<< HEAD + background-color: rgb(253,253,65); +======= +>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6 margin-top: 0px; margin-bottom: 0px; padding-bottom: 0px; @@ -71,5 +79,8 @@ page{ .loginBtn { width: 80%; margin-top: 35px; +<<<<<<< HEAD +======= background-color:rgb(253, 153, 65); +>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6 } diff --git a/后端的都放着里面/zxlogin/src/main/java/controller/LoginController.java b/后端的都放着里面/zxlogin/src/main/java/controller/LoginController.java index b050126..992b43f 100644 --- a/后端的都放着里面/zxlogin/src/main/java/controller/LoginController.java +++ b/后端的都放着里面/zxlogin/src/main/java/controller/LoginController.java @@ -1,56 +1,115 @@ -package controller; - - -import java.io.IOException; -import java.io.Writer; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -import service.LoginService; -import domain.UserPO; - -@Controller -public class LoginController { - @Autowired@Qualifier("LoginServiceImpl") - private LoginService loginService; - @RequestMapping("/login") - public void login(int userid, int userpassword, - HttpServletRequest request, HttpServletResponse response) throws IOException { - UserPO userPO=this.loginService.FindByUserid(userid); - response.setContentType("text/html;charset=utf-8"); - /* 设置响应头允许ajax跨域访问 */ - response.setHeader("Access-Control-Allow-Origin", "*"); - /* 星号表示所有的异域请求都可以接受, */ - response.setHeader("Access-Control-Allow-Methods", "GET,POST"); - System.out.println(userid); - if(userPO!=null) - if(userpassword==userPO.getUserpassword()) - { - System.out.println("密码正确"); - Writer out = response.getWriter(); - out.write("111"); - out.flush(); - } - - - else{ - System.out.println("密码错误"); - Writer out = response.getWriter(); - out.write("100"); - out.flush(); - } - else{ - System.out.println("不存在用户名"); - Writer out = response.getWriter(); - out.write("001"); - out.flush(); - } - - } -} +<<<<<<< HEAD +package controller; + + +import java.io.IOException; +import java.io.Writer; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +import service.LoginService; +import domain.UserPO; + +@Controller +public class LoginController { + @Autowired@Qualifier("LoginServiceImpl") + private LoginService loginService; + @RequestMapping("/login") + public void login(int s_id, int s_password, + HttpServletRequest request, HttpServletResponse response) throws IOException { + UserPO userPO=this.loginService.FindByUserid(s_id); + response.setContentType("text/html;charset=utf-8"); + /* 设置响应头允许ajax跨域访问 */ + response.setHeader("Access-Control-Allow-Origin", "*"); + /* 星号表示所有的异域请求都可以接受, */ + response.setHeader("Access-Control-Allow-Methods", "GET,POST"); + System.out.println(s_id); + if(userPO!=null) + if(s_password==userPO.getUserpassword()) + { + System.out.println("密码正确"); + Writer out = response.getWriter(); + out.write("111"); + out.flush(); + } + + + else{ + System.out.println("密码错误"); + Writer out = response.getWriter(); + out.write("100"); + out.flush(); + } + else{ + System.out.println("不存在用户名"); + Writer out = response.getWriter(); + out.write("001"); + out.flush(); + } + + } +} +======= +package controller; + + +import java.io.IOException; +import java.io.Writer; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +import service.LoginService; +import domain.UserPO; + +@Controller +public class LoginController { + @Autowired@Qualifier("LoginServiceImpl") + private LoginService loginService; + @RequestMapping("/login") + public void login(int userid, int userpassword, + HttpServletRequest request, HttpServletResponse response) throws IOException { + UserPO userPO=this.loginService.FindByUserid(userid); + response.setContentType("text/html;charset=utf-8"); + /* 设置响应头允许ajax跨域访问 */ + response.setHeader("Access-Control-Allow-Origin", "*"); + /* 星号表示所有的异域请求都可以接受, */ + response.setHeader("Access-Control-Allow-Methods", "GET,POST"); + System.out.println(userid); + if(userPO!=null) + if(userpassword==userPO.getUserpassword()) + { + System.out.println("密码正确"); + Writer out = response.getWriter(); + out.write("111"); + out.flush(); + } + + + else{ + System.out.println("密码错误"); + Writer out = response.getWriter(); + out.write("100"); + out.flush(); + } + else{ + System.out.println("不存在用户名"); + Writer out = response.getWriter(); + out.write("001"); + out.flush(); + } + + } +} +>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6 diff --git a/后端的都放着里面/zxlogin/src/main/java/domain/UserPO.java b/后端的都放着里面/zxlogin/src/main/java/domain/UserPO.java index 5c763cc..9a4d19d 100644 --- a/后端的都放着里面/zxlogin/src/main/java/domain/UserPO.java +++ b/后端的都放着里面/zxlogin/src/main/java/domain/UserPO.java @@ -1,29 +1,61 @@ -package domain; - -import java.io.Serializable; - -public class UserPO implements Serializable{ - private int userid; - private int userpassword; - private String username; - public int getUserid() { - return userid; - } - public void setUserid(int userid) { - this.userid = userid; - } - public int getUserpassword() { - return userpassword; - } - public void setUserpassword(int userpassword) { - this.userpassword = userpassword; - } - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - - -} +<<<<<<< HEAD +package domain; + +import java.io.Serializable; + +public class UserPO implements Serializable{ + private int s_id; + private int userpassword; + private String username; + public int getUserid() { + return userid; + } + public void setUserid(int userid) { + this.userid = userid; + } + public int getUserpassword() { + return userpassword; + } + public void setUserpassword(int userpassword) { + this.userpassword = userpassword; + } + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + + +} +======= +package domain; + +import java.io.Serializable; + +public class UserPO implements Serializable{ + private int userid; + private int userpassword; + private String username; + public int getUserid() { + return userid; + } + public void setUserid(int userid) { + this.userid = userid; + } + public int getUserpassword() { + return userpassword; + } + public void setUserpassword(int userpassword) { + this.userpassword = userpassword; + } + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + + +} +>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6 diff --git a/后端的都放着里面/zxlogin/src/main/java/mapperDAO/UserDAO.java b/后端的都放着里面/zxlogin/src/main/java/mapperDAO/UserDAO.java index 4df9f5a..ccc89a9 100644 --- a/后端的都放着里面/zxlogin/src/main/java/mapperDAO/UserDAO.java +++ b/后端的都放着里面/zxlogin/src/main/java/mapperDAO/UserDAO.java @@ -1,12 +1,27 @@ -package mapperDAO; - -import org.springframework.stereotype.Repository; - -import domain.UserPO; - -@Repository("UserDAO") -public interface UserDAO { - public UserPO FindByUserid(int userid); - - -} +<<<<<<< HEAD +package mapperDAO; + +import org.springframework.stereotype.Repository; + +import domain.UserPO; + +@Repository("UserDAO") +public interface UserDAO { + public UserPO FindByUserid(int s_id); + + +} +======= +package mapperDAO; + +import org.springframework.stereotype.Repository; + +import domain.UserPO; + +@Repository("UserDAO") +public interface UserDAO { + public UserPO FindByUserid(int userid); + + +} +>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6 diff --git a/后端的都放着里面/zxlogin/src/main/java/service/LoginService.java b/后端的都放着里面/zxlogin/src/main/java/service/LoginService.java index 2504e58..5457a6b 100644 --- a/后端的都放着里面/zxlogin/src/main/java/service/LoginService.java +++ b/后端的都放着里面/zxlogin/src/main/java/service/LoginService.java @@ -1,8 +1,19 @@ -package service; - -import domain.UserPO; - -public interface LoginService{ - - public UserPO FindByUserid(int userid); -} +<<<<<<< HEAD +package service; + +import domain.UserPO; + +public interface LoginService{ + + public UserPO FindByUserid(int s_id); +} +======= +package service; + +import domain.UserPO; + +public interface LoginService{ + + public UserPO FindByUserid(int userid); +} +>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6 diff --git a/后端的都放着里面/zxlogin/src/main/java/serviceimpl/LoginServiceImpl.java b/后端的都放着里面/zxlogin/src/main/java/serviceimpl/LoginServiceImpl.java index c32d701..4af1431 100644 --- a/后端的都放着里面/zxlogin/src/main/java/serviceimpl/LoginServiceImpl.java +++ b/后端的都放着里面/zxlogin/src/main/java/serviceimpl/LoginServiceImpl.java @@ -1,22 +1,47 @@ -package serviceimpl; - -import mapperDAO.UserDAO; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Component; - -import domain.UserPO; -import service.LoginService; - -@Component("LoginServiceImpl") -public class LoginServiceImpl implements LoginService{ - @Autowired@Qualifier("UserDAO") - private UserDAO userDAO; - - - public UserPO FindByUserid(int userid){ - return this.userDAO.FindByUserid(userid); - } - -} +<<<<<<< HEAD +package serviceimpl; + +import mapperDAO.UserDAO; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Component; + +import domain.UserPO; +import service.LoginService; + +@Component("LoginServiceImpl") +public class LoginServiceImpl implements LoginService{ + @Autowired@Qualifier("UserDAO") + private UserDAO userDAO; + + + public UserPO FindByUserid(int s_id){ + return this.userDAO.FindByUserid(s_id); + } + +} +======= +package serviceimpl; + +import mapperDAO.UserDAO; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Component; + +import domain.UserPO; +import service.LoginService; + +@Component("LoginServiceImpl") +public class LoginServiceImpl implements LoginService{ + @Autowired@Qualifier("UserDAO") + private UserDAO userDAO; + + + public UserPO FindByUserid(int userid){ + return this.userDAO.FindByUserid(userid); + } + +} +>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6