Bläddra i källkod

更新了readme

master
wyz 3 år sedan
förälder
incheckning
3b182e0565
3 ändrade filer med 31 tillägg och 69 borttagningar
  1. +0
    -38
      README.en.md
  2. +11
    -11
      README.md
  3. +20
    -20
      table.sql

+ 0
- 38
README.en.md Visa fil

@ -1,38 +0,0 @@
# 快递代取系统-后端
#### Description
前后端分离
后端使用springboot或者flask
提供json的api给前端
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

+ 11
- 11
README.md Visa fil

@ -108,13 +108,13 @@ jquery的ajax传给后端的数据springboot居然接收不到
用ajax的前端代码如下:
<img src="C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210108231726208.png" alt="image-20210108231726208" style="zoom:80%;" />
<img src="image-20210108231726208.png" alt="image-20210108231726208" style="zoom:80%;" />
正常用表单提交的方法如下:
![image-20210108232120541](C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210108232120541.png)
![image-20210108232120541](image-20210108232120541.png)
@ -122,7 +122,7 @@ jquery的ajax传给后端的数据springboot居然接收不到
后端代码如下:
![image-20210108231944550](C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210108231944550.png)
![image-20210108231944550](image-20210108231944550.png)
@ -130,7 +130,7 @@ jquery的ajax传给后端的数据springboot居然接收不到
用ajax发数据,结果如下:(好像第二行最前面少了一个问号?不知道表单提交的有没有)
![image-20210108232255322](C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210108232255322.png)
![image-20210108232255322](image-20210108232255322.png)
@ -138,7 +138,7 @@ jquery的ajax传给后端的数据springboot居然接收不到
正常表单提交,结果如下:
![image-20210108232403810](C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210108232403810.png)
![image-20210108232403810](image-20210108232403810.png)
第二行为null是因为流只能读取一次
@ -146,11 +146,11 @@ jquery的ajax传给后端的数据springboot居然接收不到
修改以下后端代码,看看用表单提交的话InputStream是什么样的
![image-20210108232529868](C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210108232529868.png)
![image-20210108232529868](image-20210108232529868.png)
输出!
![image-20210108232612889](C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210108232612889.png)
![image-20210108232612889](image-20210108232612889.png)
@ -174,15 +174,15 @@ ajax那边不管data的数据有没有加上JSON.stringify()都不行
### springboot接收ajax
![image-20210109000921900](C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210109000921900.png)
![image-20210109000921900](image-20210109000921900.png)
==注意画红框的这个类,这个类是需要可序列化的!!!==
![image-20210109001010687](C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210109001010687.png)
![image-20210109001010687](image-20210109001010687.png)
==前端传json时,需要加上JSON.Stringify==
<img src="C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210109103550442.png" alt="image-20210109103550442" style="zoom:80%;" />
<img src="image-20210109103550442.png" alt="image-20210109103550442" style="zoom:80%;" />
@ -196,7 +196,7 @@ ajax那边不管data的数据有没有加上JSON.stringify()都不行
按理说ajax这么写就行了,我还特意加了async:false来取消异步
![image-20210109102502329](C:\Users\wyz\Desktop\云计算\期末大作业\DeliveryTakingSystem\image-20210109102502329.png)
![image-20210109102502329](image-20210109102502329.png)

+ 20
- 20
table.sql Visa fil

@ -2,29 +2,29 @@
-- use DeliveryTakingSystem;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) DEFAULT NULL,
`password` varchar(20) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) DEFAULT NULL,
`password` varchar(20) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
CREATE TABLE `order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` text,
`when` datetime DEFAULT NULL,
`location` text,
`senderId` int(11) DEFAULT NULL,
`receiverId` int(11) DEFAULT NULL,
`price` int(11) DEFAULT NULL,
`status` varchar(20) DEFAULT NULL,
`comment` text,
`timestamp` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_senderId` (`senderId`),
CONSTRAINT `fk_senderId` FOREIGN KEY (`senderId`) REFERENCES `user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` text,
`when` datetime DEFAULT NULL,
`location` text,
`sender_id` int(11) DEFAULT NULL,
`receiver_id` int(11) DEFAULT NULL,
`price` int(11) DEFAULT NULL,
`status` varchar(20) DEFAULT NULL,
`comment` text,
`timestamp` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_sender_id` (`sender_id`),
CONSTRAINT `fk_sender_id` FOREIGN KEY (`sender_id`) REFERENCES `user` (`id`)
) ENGINE=InnoDB;
insert into `user` values(5,"betaberry","100299","110");

Laddar…
Avbryt
Spara