Merge refs/remotes/origin/master into refs/heads/master

master
zjh19990323 6 years ago
commit 2519da14e9

@ -1,7 +1,11 @@
<form bindsubmit="formSubmit" >
<view class="container">
<view class="login-icon">
<<<<<<< HEAD
<image class="login-img" src="../images/123.jpg"></image>
=======
<image class="login-img" src="../image/123.jpg"></image>
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6
</view>
<view class="login-from">
@ -20,7 +24,11 @@
</view>
<!--按钮-->
<view class="loginBtnView">
<<<<<<< HEAD
<button class="loginBtn" size="{{primarySize}}" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="login" formType="submit">登录</button>
=======
<button class="loginBtn" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="login" formType="submit">登录</button>
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6
</view>
</view>
</view>

@ -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
}

@ -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

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save