diff --git a/app.json b/app.json
index 63dd93b..8e14dc1 100644
--- a/app.json
+++ b/app.json
@@ -1,7 +1,11 @@
{
"pages": [
+<<<<<<< Updated upstream
"denglu/denglu",
+=======
+
+>>>>>>> Stashed changes
"wode/wode",
"gerenxinxi/gerenxinxi",
"shuji/shuji",
diff --git a/chazhao/chazhao.js b/chazhao/chazhao.js
index 4ce6c4e..847bfcc 100644
--- a/chazhao/chazhao.js
+++ b/chazhao/chazhao.js
@@ -2,7 +2,7 @@ Page({
shujichzhao: function (e) {
var that = this
wx.request({
- url: 'http://localhost:9527/zxbook/find1',
+ url: 'http://localhost:9528/zxbook/find1',
data: {
'search': e.detail.value.search,
},
diff --git a/denglu/denglu.js b/denglu/denglu.js
index 80e094a..69d19fd 100644
--- a/denglu/denglu.js
+++ b/denglu/denglu.js
@@ -1,52 +1,68 @@
-Page({
- formSubmit: function (e) {
- wx.request({
- url: 'http://localhost:9527/zxlogin/login',
- data: {
- 'userid': e.detail.value.userid,
- 'userpassword': e.detail.value.userpassword,
- },
- header: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
-
- methods: {
- method: "POST",
- },
- success: function (res) {
- console.log(res.data);
- if (res.data == "111") {
- wx.showModal({
- title: '登录消息',
- content: '登录成功',
- confirmColor: "rgba(253, 153, 65, 1)",
- success: function (res) {
- if (res.confirm) {
- wx.switchTab({
- url: '../shouye/shouye',
- })
- }
- }
- })
- }
- else if (res.data == "100") {
- wx.showModal({
- title: '登录消息',
- content: '密码错误',
- confirmColor: "rgba(253, 153, 65, 1)"
- })
- }
- else if (res.data == "001") {
- wx.showModal({
- title: '登录消息',
- content: '用户名不存在',
- confirmColor: "rgba(253, 153, 65, 1)"
- })
- }
- },
- fail: function (res) {
- console.log("失败");
- }
- })
- }
+Page({
+ formSubmit: function (e) {
+ wx.request({
+ url: 'http://localhost:9528/zxlogin/login',
+ data: {
+ 'userid': e.detail.value.userid,
+ 'userpassword': e.detail.value.userpassword,
+ },
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded"
+ },
+
+ methods: {
+ method: "POST",
+ },
+ success: function (res) {
+ var book = res.data
+ let bookstr = JSON.stringify(book);
+ console.log(book);
+ if (res.data == "100") {
+ wx.showModal({
+ title: '登录消息',
+ content: '密码错误',
+ confirmColor: "rgba(253, 153, 65, 1)"
+ })
+ }
+
+ else if (res.data == "001") {
+ wx.showModal({
+ title: '登录消息',
+ content: '用户名不存在',
+ confirmColor: "rgba(253, 153, 65, 1)"
+ })
+ }
+ else {
+ wx.showModal({
+ title: '登录消息',
+ content: '登录成功',
+ confirmColor: "rgba(253, 153, 65, 1)",
+ success: function (res) {
+ if (res.confirm) {
+ wx.switchTab({
+ url: '../shouye/shouye',
+ })
+ }
+ }
+ })
+ }
+
+ },
+ fail: function (res) {
+ console.log("失败");
+ }
+ })
+ },
+ wx.request({
+ url: 'http://localhost:9528/zxbook/find2',
+ data: {
+ 'search': e.target.id,
+ },
+ header: {
+ "Content-Type": "application/json"
+ },
+ methods: {
+ method: "POST",
+ },
+
})
\ No newline at end of file
diff --git a/gerenxinxi/gerenxinxi.js b/gerenxinxi/gerenxinxi.js
index 33b061f..83e5848 100644
--- a/gerenxinxi/gerenxinxi.js
+++ b/gerenxinxi/gerenxinxi.js
@@ -1,4 +1,4 @@
-
+
// 获取全局应用程序实例对象
const app = getApp();
@@ -60,7 +60,7 @@ Page({
},
-
+
//以下为自定义点击事件
})
diff --git a/gerenxinxi/gerenxinxi.wxml b/gerenxinxi/gerenxinxi.wxml
index 5254d96..f44aa08 100644
--- a/gerenxinxi/gerenxinxi.wxml
+++ b/gerenxinxi/gerenxinxi.wxml
@@ -1,4 +1,5 @@
- 姓名:
- 学号:
- 密码:
\ No newline at end of file
+ 姓名:
+
+ 学号:${userpassword}
+ 密码:${username}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index b9d25f5..48baad9 100644
--- a/project.config.json
+++ b/project.config.json
@@ -13,7 +13,7 @@
"compileType": "miniprogram",
"libVersion": "2.4.0",
"appid": "wxb280d1925541c356",
- "projectname": "33",
+ "projectname": "34",
"debugOptions": {
"hidedInDevtools": []
},
diff --git a/后端的都放着里面/zxlogin/pom.xml b/后端的都放着里面/zxlogin/pom.xml
index dfcbca3..b259ac5 100644
--- a/后端的都放着里面/zxlogin/pom.xml
+++ b/后端的都放着里面/zxlogin/pom.xml
@@ -22,6 +22,25 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
3.8.1
test
+
+
+ com.github.binarywang
+ weixin-java-miniapp
+ ${weixin.java.miniapp.version}
+
+
+
+ com.alibaba
+ fastjson
+ 1.2.44
+
+
+
+ com.google.code.gson
+ gson
+ 2.8.2
+
+
mysql
diff --git a/后端的都放着里面/zxlogin/src/main/java/controller/LoginController.java b/后端的都放着里面/zxlogin/src/main/java/controller/LoginController.java
index 525c48c..17f89be 100644
--- a/后端的都放着里面/zxlogin/src/main/java/controller/LoginController.java
+++ b/后端的都放着里面/zxlogin/src/main/java/controller/LoginController.java
@@ -1,57 +1,61 @@
-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();
- }
-
- }
-}
-
+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 com.google.gson.Gson;
+
+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("密码正确");
+ String ss = new Gson().toJson(userPO);
+ Writer out = response.getWriter();
+ out.write(ss);
+ 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();
+ }
+
+ }
+}
+
diff --git a/后端的都放着里面/zxlogin/src/main/java/mapperDAO/UserDAO.java b/后端的都放着里面/zxlogin/src/main/java/mapperDAO/UserDAO.java
index d47c532..4df9f5a 100644
--- a/后端的都放着里面/zxlogin/src/main/java/mapperDAO/UserDAO.java
+++ b/后端的都放着里面/zxlogin/src/main/java/mapperDAO/UserDAO.java
@@ -1,12 +1,12 @@
-package mapperDAO;
-
-import org.springframework.stereotype.Repository;
-
-import domain.UserPO;
-
-@Repository("UserDAO")
-public interface UserDAO {
- public UserPO FindByUserid(int userid);
-
-
-}
+package mapperDAO;
+
+import org.springframework.stereotype.Repository;
+
+import domain.UserPO;
+
+@Repository("UserDAO")
+public interface UserDAO {
+ public UserPO FindByUserid(int userid);
+
+
+}
diff --git a/后端的都放着里面/zxlogin/src/main/java/service/LoginService.java b/后端的都放着里面/zxlogin/src/main/java/service/LoginService.java
index 33e0d77..dde49fc 100644
--- a/后端的都放着里面/zxlogin/src/main/java/service/LoginService.java
+++ b/后端的都放着里面/zxlogin/src/main/java/service/LoginService.java
@@ -1,9 +1,9 @@
-package service;
-
-import domain.UserPO;
-
-public interface LoginService{
-
- public UserPO FindByUserid(int userid);
-}
-
+package service;
+
+import domain.UserPO;
+
+public interface LoginService{
+
+ public UserPO FindByUserid(int userid);
+}
+
diff --git a/后端的都放着里面/zxlogin/src/main/java/serviceimpl/LoginServiceImpl.java b/后端的都放着里面/zxlogin/src/main/java/serviceimpl/LoginServiceImpl.java
index e1bd0f4..5743332 100644
--- a/后端的都放着里面/zxlogin/src/main/java/serviceimpl/LoginServiceImpl.java
+++ b/后端的都放着里面/zxlogin/src/main/java/serviceimpl/LoginServiceImpl.java
@@ -1,23 +1,23 @@
-
-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);
- }
-
-}
+
+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);
+ }
+
+}
diff --git a/后端的都放着里面/zxlogin/src/main/resources/generatorConfig.xml b/后端的都放着里面/zxlogin/src/main/resources/generatorConfig.xml
index 6a98719..0385654 100644
--- a/后端的都放着里面/zxlogin/src/main/resources/generatorConfig.xml
+++ b/后端的都放着里面/zxlogin/src/main/resources/generatorConfig.xml
@@ -17,7 +17,18 @@
driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/zx"
userId="root"
- password="zjh19990323">
+ password="zxy19971014"
+
+ com.alibaba
+ fastjson
+ 1.2.44
+
+
+
+ com.google.code.gson
+ gson
+ 2.8.2
+ 19990323">
diff --git a/后端的都放着里面/zxlogin/src/main/resources/spring-mybatis.xml b/后端的都放着里面/zxlogin/src/main/resources/spring-mybatis.xml
index c27408c..d69dc4c 100644
--- a/后端的都放着里面/zxlogin/src/main/resources/spring-mybatis.xml
+++ b/后端的都放着里面/zxlogin/src/main/resources/spring-mybatis.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/后端的都放着里面/zxlogin/target/classes/controller/LoginController.class b/后端的都放着里面/zxlogin/target/classes/controller/LoginController.class
index 528a277..c0ecb7b 100644
Binary files a/后端的都放着里面/zxlogin/target/classes/controller/LoginController.class and b/后端的都放着里面/zxlogin/target/classes/controller/LoginController.class differ
diff --git a/后端的都放着里面/zxlogin/target/classes/generatorConfig.xml b/后端的都放着里面/zxlogin/target/classes/generatorConfig.xml
index 6a98719..0385654 100644
--- a/后端的都放着里面/zxlogin/target/classes/generatorConfig.xml
+++ b/后端的都放着里面/zxlogin/target/classes/generatorConfig.xml
@@ -17,7 +17,18 @@
driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/zx"
userId="root"
- password="zjh19990323">
+ password="zxy19971014"
+
+ com.alibaba
+ fastjson
+ 1.2.44
+
+
+
+ com.google.code.gson
+ gson
+ 2.8.2
+ 19990323">
diff --git a/后端的都放着里面/zxlogin/target/classes/spring-mybatis.xml b/后端的都放着里面/zxlogin/target/classes/spring-mybatis.xml
index c27408c..d69dc4c 100644
--- a/后端的都放着里面/zxlogin/target/classes/spring-mybatis.xml
+++ b/后端的都放着里面/zxlogin/target/classes/spring-mybatis.xml
@@ -13,7 +13,7 @@
-
+