Compare commits

...

30 Commits

Author SHA1 Message Date
liwa bcb769d65c 跨域添加 patch
3 years ago
liwa aef1f5e49f Merge branch 'vue-shoppingcart'
3 years ago
zny 28b6bc0287 更新location
3 years ago
liwa 98d82935b5 Merge branch 'vue-shoppingcart'
3 years ago
zny 13ffc3ea5a 前端全接口更新
3 years ago
liwa 5e820b68c4 Merge branch 'vue-shoppingcart'
3 years ago
zny 4c0c68ec27 加购+下单
3 years ago
zny 47902e0914 登陆注册
3 years ago
zny 260cd596d5 登陆注册
3 years ago
liwa dc9e097653 Revert "location接口传参改成json"
3 years ago
liwa 9535e952af location接口传参改成json
3 years ago
liwa eb055c17a7 login接口传参改成json
3 years ago
liwa 47b48a561e Merge branch 'vue-shoppingcart'
3 years ago
liwa f63f1ed16d CartController,OrderController接口路径重构
3 years ago
liwa bc1de74ca9 改接口地址、cart请求地址
3 years ago
zny 8f3a66a3bb 配置后端地址
3 years ago
zny c49b302784 vue项目添加
3 years ago
杨婉平 Wanping Yang 19bfeb2dec
Update README.md
3 years ago
liwa f174a1ff98 实体类添加@TableName
3 years ago
liwa 677156ee9e 完善前端 1
3 years ago
liwa fd0502ece3 优化表结构 添加swagger接口文档
3 years ago
liwa a05800ea8b 优化
3 years ago
liwa a4c6f2f9aa commit: 完善前端组件 1
3 years ago
guliwa 8af8541d04
Update README.md
3 years ago
liwa b65b0b2607 前端初始化
3 years ago
liwa 220381dccf commit: 完善User Order 相关, 优化跨域问题
3 years ago
liwa 15a4ebeac6 commit: 完善CartItem Product 相关
3 years ago
liwa 7708fcfe24 重构 2
3 years ago
liwa 88c348b8d8 重构 1
3 years ago
guliwa 95bbdd38cc
Create README.md
3 years ago

8
.idea/.gitignore vendored

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -2,8 +2,21 @@
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/shopingcart-backend" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/shoppingcart-backend/src/main/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.26/lombok-1.18.26.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.3" level="project" />
</component>
</module>

@ -2,17 +2,18 @@
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="shppingcart-backend" />
<module name="shoppingcart-backend" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="shppingcart-backend" options="-parameters" />
<module name="shoppingcart-backend" options="-parameters" />
</option>
</component>
</project>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/shppingcart-backend/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/shppingcart-backend/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/shoppingcart-backend/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/shoppingcart-backend/src/main/resources" charset="UTF-8" />
</component>
</project>

@ -9,7 +9,7 @@
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/shppingcart-backend/pom.xml" />
<option value="$PROJECT_DIR$/shoppingcart-backend/pom.xml" />
</list>
</option>
</component>

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="TemplatesSettings">
<option name="templateConfigs">
<TemplateContext>
<option name="generateConfig">
<GenerateConfig>
<option name="annotationType" value="NONE" />
<option name="basePackage" value="generator" />
<option name="basePath" value="src/main/java" />
<option name="classNameStrategy" value="camel" />
<option name="encoding" value="UTF-8" />
<option name="extraClassSuffix" value="" />
<option name="ignoreFieldPrefix" value="" />
<option name="ignoreFieldSuffix" value="" />
<option name="ignoreTablePrefix" value="" />
<option name="ignoreTableSuffix" value="" />
<option name="moduleName" value="shoppingcart-backend" />
<option name="modulePath" value="$PROJECT_DIR$/shoppingcart-backend" />
<option name="moduleUIInfoList">
<list>
<ModuleInfoGo>
<option name="basePath" value="${domain.basePath}" />
<option name="configFileName" value="mapperInterface.ftl" />
<option name="configName" value="mapperInterface" />
<option name="encoding" value="${domain.encoding}" />
<option name="fileName" value="${domain.fileName}Mapper" />
<option name="fileNameWithSuffix" value="${domain.fileName}Mapper.java" />
<option name="modulePath" value="$PROJECT_DIR$/shoppingcart-backend" />
<option name="packageName" value="${domain.basePackage}.mapper" />
</ModuleInfoGo>
<ModuleInfoGo>
<option name="basePath" value="src/main/resources" />
<option name="configFileName" value="mapperXml.ftl" />
<option name="configName" value="mapperXml" />
<option name="encoding" value="${domain.encoding}" />
<option name="fileName" value="${domain.fileName}Mapper" />
<option name="fileNameWithSuffix" value="${domain.fileName}Mapper.xml" />
<option name="modulePath" value="$PROJECT_DIR$/shoppingcart-backend" />
<option name="packageName" value="mapper" />
</ModuleInfoGo>
<ModuleInfoGo>
<option name="basePath" value="${domain.basePath}" />
<option name="configFileName" value="serviceImpl.ftl" />
<option name="configName" value="serviceImpl" />
<option name="encoding" value="${domain.encoding}" />
<option name="fileName" value="${domain.fileName}ServiceImpl" />
<option name="fileNameWithSuffix" value="${domain.fileName}ServiceImpl.java" />
<option name="modulePath" value="$PROJECT_DIR$/shoppingcart-backend" />
<option name="packageName" value="${domain.basePackage}.service.impl" />
</ModuleInfoGo>
<ModuleInfoGo>
<option name="basePath" value="${domain.basePath}" />
<option name="configFileName" value="serviceInterface.ftl" />
<option name="configName" value="serviceInterface" />
<option name="encoding" value="${domain.encoding}" />
<option name="fileName" value="${domain.fileName}Service" />
<option name="fileNameWithSuffix" value="${domain.fileName}Service.java" />
<option name="modulePath" value="$PROJECT_DIR$/shoppingcart-backend" />
<option name="packageName" value="${domain.basePackage}.service" />
</ModuleInfoGo>
</list>
</option>
<option name="needToStringHashcodeEquals" value="true" />
<option name="needsComment" value="true" />
<option name="needsModel" value="true" />
<option name="relativePackage" value="domain" />
<option name="superClass" value="" />
<option name="tableUIInfoList">
<list>
<TableUIInfo>
<option name="className" value="CartItem" />
<option name="tableName" value="cart_item" />
</TableUIInfo>
</list>
</option>
<option name="templatesName" value="mybatis-plus3" />
<option name="useLombokPlugin" value="true" />
</GenerateConfig>
</option>
<option name="moduleName" value="shoppingcart-backend" />
<option name="projectPath" value="$PROJECT_DIR$" />
<option name="templateName" value="mybatis-plus3" />
</TemplateContext>
</option>
</component>
</project>

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -0,0 +1,114 @@
# ShoppingCart
这是一个移动端的网页底部有4个tab栏。第1个tab栏是购物车栏可以查看购物车商品、添加、删除商品。第2个tab栏是商品栏显示所有商品把product的所有内容一条条列出来就行了需要分页 mybatis plus分页查询。第3个tab栏是订单栏显示用户的所有订单可能也需要分页。第4个tab栏是用户栏显示用户的个人信息id 用户名 地址地址支持修改。另外无论在哪个tab栏右上角都有一个横幅显示“欢迎您xxx”xxx是当前用户的用户名
### 1.数据库设计
1. User 表 (用户表)
- id (主键,自增长,唯一)
- username (用户名,唯一)
- password (用户密码,加密存储)
- location (用户地址)
2. Product 表 (商品表)
- id (主键,自增长,唯一)
- name (商品名)
- description (商品描述)
- price (商品价格)
- quantity (商品库存量)
3. CartItem 表 (购物车项表)
- id (主键,自增长,唯一)
- user_id (外键,关联 User 表的 id)
- product_id (外键,关联 Product 表的 id)
- quantity (购物车中商品的数量)
4. Order 表 (订单表)
- id (主键,自增长,唯一)
- user_id (外键,关联 User 表的 id)
- product_id (外键,关联 Product 表的 id)
- quantity (订单中商品的数量)
- order_status (订单状态,如:已创建、已付款、已发货、已完成、已取消等)
### 2. Restful API 接口设计
1. **用户相关接口**
- `POST /user/register` 用户注册
- `POST /user/login` 用户登录
- `GET /user/{userId}` 获取用户信息
- `PUT /user/{userId}/location` 更新用户地址
2. **商品相关接口**
- `GET /product` 获取所有商品
- `GET /product/{productId}` 获取单个商品的详细信息
3. **购物车相关接口**
- `GET /user/{userId}/cart` 获取购物车中的所有商品
- `POST /user/{userId}/cart/add/{productId}` 将商品添加到购物车
- `POST /user/{userId}/cart/remove/{productId}` 从购物车中移除商品
- `POST /user/{userId}/cart/decrease/{productId}` 减少购物车中的商品数量
4. **订单相关接口**
- `GET /user/{userId}/orders` 获取用户的所有订单
- `POST /user/{userId}/orders/create` 创建新的订单
- `DELETE /user/{userId}/orders/{orderId}` 删除指定的订单
---
测试接口接口返回200请求成功。添加iPhone14成功。
POST /product/addToCart/{productId}
![image](https://github.com/Zhubaiali/ShoppingCart/assets/69970253/50d91a18-a028-45e6-b7a1-e0efb8df774f)
![image](https://github.com/Zhubaiali/ShoppingCart/assets/69970253/58565073-4d67-4e6c-bf1a-f2693396eb58)
POST /product/removeFromCart/{productId}
![image](https://github.com/Zhubaiali/ShoppingCart/assets/69970253/af3e41e7-566c-456f-a8a0-e0ef8e4f559b)
GET /product/cart
![image](https://github.com/Zhubaiali/ShoppingCart/assets/69970253/e736f810-0b6c-4422-9d9a-c243f607199b)
前后端联调
![image](https://github.com/Zhubaiali/ShoppingCart/assets/69970253/06045c8e-175f-40cb-b815-4fe9192c539a)
五、其他说明
后端地址localhost:8088

@ -9,14 +9,25 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.ywp</groupId>
<artifactId>shppingcart-backend</artifactId>
<artifactId>shoppingcart-backend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>shppingcart-backend</name>
<description>shppingcart-backend</description>
<name>shoppingcart-backend</name>
<description>shoppingcart-backend</description>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<!-- https://doc.xiaominfo.com/knife4j/documentation/get_start.html-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>

@ -0,0 +1,60 @@
create table if not exists `huas-project-yangwp`.product
(
id int auto_increment
primary key,
name varchar(255) not null,
description text null,
price decimal(10, 2) not null,
in_cart tinyint(1) default 0 not null comment '是否在购物车中,0表示不在,1表示在',
quantity int default 0 not null comment '购物车中的商品数量,如果商品不在购物车中,那么数量为0',
created_at datetime ,
updated_at datetime ,
is_deleted tinyint(1) default 0 not null
)
charset = utf8mb3;
-- 创建user表
CREATE TABLE `user`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`location` varchar(255),
`created_at` datetime ,
`updated_at` datetime ,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
-- 创建cart_item表
CREATE TABLE `cart_item`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`quantity` int(11) NOT NULL DEFAULT '0' COMMENT '购物车中的商品数量',
`created_at` datetime ,
`updated_at` datetime ,
PRIMARY KEY (`id`),
FOREIGN KEY (`user_id`) REFERENCES `user` (`id`),
FOREIGN KEY (`product_id`) REFERENCES `product` (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
-- 创建order表
CREATE TABLE `order`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`quantity` int(11) NOT NULL COMMENT '购买的商品数量',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0',
`created_at` datetime ,
`updated_at` datetime ,
PRIMARY KEY (`id`),
FOREIGN KEY (`user_id`) REFERENCES `user` (`id`),
FOREIGN KEY (`product_id`) REFERENCES `product` (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;

@ -0,0 +1,23 @@
package com.ywp.shoppingcartbackend.Config;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.servers.Server;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SwaggerConfig {
@Bean
public OpenAPI customOpenAPI() {
return new OpenAPI()
.addServersItem(new Server().url("http://localhost:8088"))
.info(new Info().title("丽娃购物车商城系统")
.description("丽娃购物车商城文档")
.contact(new Contact().name("liwa").email("111@qq.com").url("https://github.com/zhubaiali"))
.version("1.0"));
}
}

@ -0,0 +1,24 @@
package com.ywp.shoppingcartbackend.Config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* controller@CrossOrigin(origins = "http://localhost:3000")
*/
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
//设置允许跨域请求的域名
//当**Credentials为true时**Origin不能为星号需为具体的ip地址【如果接口不带cookie,ip无需设成具体ip】
.allowedOrigins("http://localhost:8080", "http://localhost:3000")
.allowedMethods("GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "PATCH")
.allowedHeaders("*")
.allowCredentials(true);
}
}

@ -1,18 +1,19 @@
package com.ywp.shppingcartbackend;
package com.ywp.shoppingcartbackend;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.CrossOrigin;
@SpringBootApplication
@MapperScan("com.ywp.shppingcartbackend.mapper")
@MapperScan("com.ywp.shoppingcartbackend.mapper")
@EnableScheduling
public class ShppingcartBackendApplication {
public class ShoppingcartBackendApplication {
public static void main(String[] args) {
SpringApplication.run(ShppingcartBackendApplication.class, args);
SpringApplication.run(ShoppingcartBackendApplication.class, args);
System.out.println("----------------------start success-----------------------");
}
}

@ -0,0 +1,52 @@
package com.ywp.shoppingcartbackend.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ywp.shoppingcartbackend.domain.CartItem;
import com.ywp.shoppingcartbackend.service.CartItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/cart/user/{userId}")
public class CartController {
@Autowired
private CartItemService cartItemService;
@PostMapping("/add/{productId}")
public ResponseEntity<CartItem> addToCart(@PathVariable Integer userId, @PathVariable Integer productId,
@RequestParam Integer quantity) {
CartItem cartItem = cartItemService.addToCart(userId, productId, quantity);
return ResponseEntity.ok(cartItem);
}
@PostMapping("/decrease/{productId}")
public ResponseEntity<CartItem> decreaseQuantity(@PathVariable Integer userId, @PathVariable Integer productId,
@RequestParam Integer quantity) {
CartItem cartItem = cartItemService.decreaseQuantity(userId, productId, quantity);
if (cartItem == null) {
// 如果 cartItem 为 null表示商品数量已经减少到 0返回 HTTP 204 No Content 响应
return ResponseEntity.noContent().build();
} else {
// 否则,返回包含更新后的 cartItem 的 200 OK 响应
return ResponseEntity.ok(cartItem);
}
}
@PostMapping("/remove/{productId}")
public void removeFromCart(@PathVariable Integer userId, @PathVariable Integer productId) {
cartItemService.removeFromCart(userId, productId);
}
@GetMapping("")
public ResponseEntity<List<CartItem>> getCartItems(@PathVariable Integer userId,
@RequestParam(required = false, defaultValue = "0") Integer pageNum,
@RequestParam(required = false, defaultValue = "10") Integer pageSize) {
IPage<CartItem> cartItems = cartItemService.getCartItems(userId, pageNum, pageSize);
return ResponseEntity.ok(cartItems.getRecords());
}
}

@ -0,0 +1,35 @@
package com.ywp.shoppingcartbackend.controller;
import com.ywp.shoppingcartbackend.domain.Order;
import com.ywp.shoppingcartbackend.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/order/user/{userId}")
public class OrderController {
@Autowired
private OrderService orderService;
@PostMapping("/create")
public ResponseEntity<Order> createOrder(@PathVariable Integer userId, @RequestParam Integer productId, @RequestParam Integer quantity) {
Order order = orderService.createOrder(userId, productId, quantity);
return ResponseEntity.ok(order);
}
@DeleteMapping("/{orderId}")
public ResponseEntity<Void> deleteOrder(@PathVariable Integer userId, @PathVariable Integer orderId) {
orderService.deleteOrder(userId, orderId);
return ResponseEntity.noContent().build();
}
@GetMapping("")
public ResponseEntity<List<Order>> getOrdersByUserId(@PathVariable Integer userId) {
List<Order> orders = orderService.getOrdersByUserId(userId);
return ResponseEntity.ok(orders);
}
}

@ -0,0 +1,29 @@
package com.ywp.shoppingcartbackend.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ywp.shoppingcartbackend.domain.Product;
import com.ywp.shoppingcartbackend.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/product")
public class ProductController {
@Autowired
private ProductService productService;
@GetMapping("")
public ResponseEntity<IPage<Product>> getAllProducts(@RequestParam(required = false, defaultValue = "0") Integer pageNum,
@RequestParam(required = false, defaultValue = "10") Integer pageSize) {
IPage<Product> products = productService.getAllProducts(pageNum, pageSize);
return ResponseEntity.ok(products);
}
@GetMapping("/{productId}")
public ResponseEntity<Product> getProductById(@PathVariable Integer productId) {
Product product = productService.getProductById(productId);
return ResponseEntity.ok(product);
}
}

@ -0,0 +1,37 @@
package com.ywp.shoppingcartbackend.controller;
import com.ywp.shoppingcartbackend.domain.User;
import com.ywp.shoppingcartbackend.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@PostMapping("/register")
public ResponseEntity<User> register(@RequestBody User user) {
User registeredUser = userService.register(user);
return ResponseEntity.ok(registeredUser);
}
@PostMapping("/login")
public ResponseEntity<User> login(@RequestBody Map<String, String> credentials) {
String username = credentials.get("username");
String password = credentials.get("password");
User loggedInUser = userService.login(username, password);
return ResponseEntity.ok(loggedInUser);
}
@PatchMapping("/{userId}/location")
public ResponseEntity<User> updateLocation(@PathVariable Integer userId, @RequestParam String location) {
User updatedUser = userService.updateLocation(userId, location);
return ResponseEntity.ok(updatedUser);
}
}

@ -0,0 +1,102 @@
package com.ywp.shoppingcartbackend.domain;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
*
* @TableName cart_item
*/
@TableName("cart_item")
@Data
public class CartItem implements Serializable {
/**
*
*/
private Integer id;
/**
*
*/
private Integer userId;
/**
*
*/
private Integer productId;
/**
*
*/
private Integer quantity;
/**
*
*/
private Date createdAt;
/**
*
*/
private Date updatedAt;
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
CartItem other = (CartItem) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getProductId() == null ? other.getProductId() == null
: this.getProductId().equals(other.getProductId()))
&& (this.getQuantity() == null ? other.getQuantity() == null
: this.getQuantity().equals(other.getQuantity()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null
: this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null
: this.getUpdatedAt().equals(other.getUpdatedAt()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", userId=").append(userId);
sb.append(", productId=").append(productId);
sb.append(", quantity=").append(quantity);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,110 @@
package com.ywp.shoppingcartbackend.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
* @TableName order
*/
@TableName("`order`")
@Data
public class Order implements Serializable {
/**
*
*/
private Integer id;
/**
*
*/
private Integer userId;
/**
*
*/
private Integer productId;
/**
*
*/
private Integer quantity;
/**
*
*/
private Integer isDeleted;
/**
*
*/
private Date createdAt;
/**
*
*/
private Date updatedAt;
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
Order other = (Order) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getProductId() == null ? other.getProductId() == null
: this.getProductId().equals(other.getProductId()))
&& (this.getQuantity() == null ? other.getQuantity() == null
: this.getQuantity().equals(other.getQuantity()))
&& (this.getIsDeleted() == null ? other.getIsDeleted() == null
: this.getIsDeleted().equals(other.getIsDeleted()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null
: this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null
: this.getUpdatedAt().equals(other.getUpdatedAt()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", userId=").append(userId);
sb.append(", productId=").append(productId);
sb.append(", quantity=").append(quantity);
sb.append(", isDeleted=").append(isDeleted);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -1,4 +1,4 @@
package com.ywp.shppingcartbackend.domain;
package com.ywp.shoppingcartbackend.domain;
import lombok.Data;
@ -6,33 +6,49 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
*
* @TableName product
*/
@TableName("product")
@Data
public class Product implements Serializable {
/**
*
*/
private Integer id;
/**
*
*/
private String name;
/**
*
*/
private String description;
/**
*
*/
private BigDecimal price;
private Integer inCart;
/**
* ,,0
*
*/
private Integer quantity;
private Date created_at;
private Date updated_at;
/**
*
*/
private Date createdAt;
private Integer is_deleted;
/**
*
*/
private Date updatedAt;
private static final long serialVersionUID = 1L;
@ -49,14 +65,16 @@ public class Product implements Serializable {
}
Product other = (Product) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
&& (this.getInCart() == null ? other.getInCart() == null : this.getInCart().equals(other.getInCart()))
&& (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
&& (this.getCreated_at() == null ? other.getCreated_at() == null : this.getCreated_at().equals(other.getCreated_at()))
&& (this.getUpdated_at() == null ? other.getUpdated_at() == null : this.getUpdated_at().equals(other.getUpdated_at()))
&& (this.getIs_deleted() == null ? other.getIs_deleted() == null : this.getIs_deleted().equals(other.getIs_deleted()));
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getDescription() == null ? other.getDescription() == null
: this.getDescription().equals(other.getDescription()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
&& (this.getQuantity() == null ? other.getQuantity() == null
: this.getQuantity().equals(other.getQuantity()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null
: this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null
: this.getUpdatedAt().equals(other.getUpdatedAt()));
}
@Override
@ -67,11 +85,9 @@ public class Product implements Serializable {
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
result = prime * result + ((getInCart() == null) ? 0 : getInCart().hashCode());
result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
result = prime * result + ((getCreated_at() == null) ? 0 : getCreated_at().hashCode());
result = prime * result + ((getUpdated_at() == null) ? 0 : getUpdated_at().hashCode());
result = prime * result + ((getIs_deleted() == null) ? 0 : getIs_deleted().hashCode());
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
return result;
}
@ -85,11 +101,9 @@ public class Product implements Serializable {
sb.append(", name=").append(name);
sb.append(", description=").append(description);
sb.append(", price=").append(price);
sb.append(", in_cart=").append(inCart);
sb.append(", quantity=").append(quantity);
sb.append(", created_at=").append(created_at);
sb.append(", updated_at=").append(updated_at);
sb.append(", is_deleted=").append(is_deleted);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

@ -0,0 +1,103 @@
package com.ywp.shoppingcartbackend.domain;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
*
* @TableName user
*/
@TableName("user")
@Data
public class User implements Serializable {
/**
*
*/
private Integer id;
/**
*
*/
private String username;
/**
*
*/
private String password;
/**
*
*/
private String location;
/**
*
*/
private Date createdAt;
/**
*
*/
private Date updatedAt;
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
User other = (User) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUsername() == null ? other.getUsername() == null
: this.getUsername().equals(other.getUsername()))
&& (this.getPassword() == null ? other.getPassword() == null
: this.getPassword().equals(other.getPassword()))
&& (this.getLocation() == null ? other.getLocation() == null
: this.getLocation().equals(other.getLocation()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null
: this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null
: this.getUpdatedAt().equals(other.getUpdatedAt()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", username=").append(username);
sb.append(", password=").append(password);
sb.append(", location=").append(location);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,17 @@
package com.ywp.shoppingcartbackend.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
/**
*
*
* @author liwa
*/
@ResponseStatus(value = HttpStatus.NOT_FOUND)
public class ResourceNotFoundException extends RuntimeException {
public ResourceNotFoundException(String message) {
super(message);
}
}

@ -0,0 +1,16 @@
package com.ywp.shoppingcartbackend.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ywp.shoppingcartbackend.domain.CartItem;
import org.apache.ibatis.annotations.Mapper;
/**
* @author asus
* @description cart_itemMapper
* @createDate 2023-05-13 20:46:21
* @Entity com.ywp.shoppingcartbackend.domain.CartItem
*/
@Mapper
public interface CartItemMapper extends BaseMapper<CartItem> {
}

@ -0,0 +1,16 @@
package com.ywp.shoppingcartbackend.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ywp.shoppingcartbackend.domain.Order;
import org.apache.ibatis.annotations.Mapper;
/**
* @author asus
* @description orderMapper
* @createDate 2023-05-13 20:46:08
* @Entity com.ywp.shoppingcartbackend.domain.Order
*/
@Mapper
public interface OrderMapper extends BaseMapper<Order> {
}

@ -0,0 +1,17 @@
package com.ywp.shoppingcartbackend.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ywp.shoppingcartbackend.domain.Product;
import org.apache.ibatis.annotations.Mapper;
/**
* @author asus
* @description productMapper
* @createDate 2023-05-13 11:10:48
* @Entity com.ywp.shoppingcartbackend.domain.Product
*/
@Mapper
public interface ProductMapper extends BaseMapper<Product> {
}

@ -0,0 +1,16 @@
package com.ywp.shoppingcartbackend.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ywp.shoppingcartbackend.domain.User;
import org.apache.ibatis.annotations.Mapper;
/**
* @author asus
* @description userMapper
* @createDate 2023-05-13 20:39:44
* @Entity com.ywp.shoppingcartbackend.domain.User
*/
@Mapper
public interface UserMapper extends BaseMapper<User> {
}

@ -0,0 +1,42 @@
package com.ywp.shoppingcartbackend.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ywp.shoppingcartbackend.domain.CartItem;
/**
* @author asus
* @description cart_itemService
* @createDate 2023-05-13 20:46:21
*/
public interface CartItemService extends IService<CartItem> {
/**
*
*
* @param userId ID
* @param productId ID
* @param quantity
* @return
*/
CartItem addToCart(Integer userId, Integer productId, Integer quantity);
/**
*
*
* @param userId ID
* @param productId ID
*/
void removeFromCart(Integer userId, Integer productId);
/**
*
*
* @param userId ID
* @return
*/
IPage<CartItem> getCartItems(Integer userId, int pageNumber, int pageSize);
CartItem decreaseQuantity(Integer userId, Integer productId, Integer quantity);
}

@ -0,0 +1,19 @@
package com.ywp.shoppingcartbackend.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ywp.shoppingcartbackend.domain.Order;
import java.util.List;
/**
* @author asus
* @description orderService
* @createDate 2023-05-13 20:46:08
*/
public interface OrderService extends IService<Order> {
Order createOrder(Integer userId, Integer productId, Integer quantity);
void deleteOrder(Integer userId, Integer orderId);
List<Order> getOrdersByUserId(Integer userId);
}

@ -0,0 +1,17 @@
package com.ywp.shoppingcartbackend.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ywp.shoppingcartbackend.domain.Product;
/**
* @author asus
* @description productService
* @createDate 2023-05-13 11:10:48
*/
public interface ProductService extends IService<Product> {
IPage<Product> getAllProducts(int page, int size);
Product getProductById(Integer productId);
}

@ -0,0 +1,15 @@
package com.ywp.shoppingcartbackend.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ywp.shoppingcartbackend.domain.User;
/**
* @author asus
* @description userService
* @createDate 2023-05-13 20:39:44
*/
public interface UserService extends IService<User> {
User register(User user);
User login(String username, String password);
User updateLocation(Integer userId, String location);
}

@ -0,0 +1,121 @@
package com.ywp.shoppingcartbackend.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ywp.shoppingcartbackend.domain.CartItem;
import com.ywp.shoppingcartbackend.domain.Product;
import com.ywp.shoppingcartbackend.mapper.CartItemMapper;
import com.ywp.shoppingcartbackend.mapper.ProductMapper;
import com.ywp.shoppingcartbackend.service.CartItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* @author asus
* @description cart_itemService
* @createDate 2023-05-13 20:46:21
*/
@Service
public class CartItemServiceImpl extends ServiceImpl<CartItemMapper, CartItem> implements CartItemService {
@Autowired
private ProductMapper productMapper;
@Autowired
private CartItemMapper cartItemMapper;
private CartItem getCartItem(Integer userId, Integer productId) {
QueryWrapper<CartItem> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", userId).eq("product_id", productId);
return cartItemMapper.selectOne(queryWrapper);
}
@Override
@Transactional
public CartItem addToCart(Integer userId, Integer productId, Integer quantity) {
// 检查商品是否存在
Product product = productMapper.selectById(productId);
if (product == null) {
throw new IllegalArgumentException("Invalid product id: " + productId);
}
// 检查商品库存量是否足够
if (product.getQuantity() < quantity) {
return null; // 如果库存量不足返回null
}
// 更新商品库存量
product.setQuantity(product.getQuantity() - quantity);
productMapper.updateById(product);
// 查询购物车中是否已经存在该商品
QueryWrapper<CartItem> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", userId).eq("product_id", productId);
CartItem existingCartItem = this.getOne(queryWrapper);
if (existingCartItem != null) {
// 如果购物车中已经存在该商品,更新数量
existingCartItem.setQuantity(existingCartItem.getQuantity() + quantity);
this.updateById(existingCartItem);
return existingCartItem;
} else {
// 否则,创建一个新的购物车项目
CartItem newCartItem = new CartItem();
newCartItem.setUserId(userId);
newCartItem.setProductId(productId);
newCartItem.setQuantity(quantity);
this.save(newCartItem);
return newCartItem;
}
}
@Override
@Transactional
public void removeFromCart(Integer userId, Integer productId) {
// 查询购物车中是否存在该商品
QueryWrapper<CartItem> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", userId).eq("product_id", productId);
CartItem existingCartItem = this.getOne(queryWrapper);
// 如果购物车中存在该商品,删除
if (existingCartItem != null) {
this.removeById(existingCartItem.getId());
}
// 如果商品不在购物车中,我们不做任何操作
}
@Override
public IPage<CartItem> getCartItems(Integer userId, int pageNumber, int pageSize) {
// 查询该用户购物车中的所有商品,并分页返回结果
QueryWrapper<CartItem> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", userId);
Page<CartItem> page = new Page<>(pageNumber, pageSize);
return this.page(page, queryWrapper);
}
@Override
@Transactional
public CartItem decreaseQuantity(Integer userId, Integer productId, Integer quantity) {
// 从购物车中获取指定的商品
CartItem cartItem = getCartItem(userId, productId);
if (cartItem == null) {
throw new IllegalArgumentException("Product is not in the cart: " + productId);
}
// 减少商品的数量
int newQuantity = cartItem.getQuantity() - quantity;
if (newQuantity <= 0) {
// 如果商品的数量减少为0或者负数那么从购物车中移除该商品
this.removeById(cartItem.getId());
return null;
} else {
cartItem.setQuantity(newQuantity);
this.updateById(cartItem);
return cartItem;
}
}
}

@ -0,0 +1,65 @@
package com.ywp.shoppingcartbackend.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ywp.shoppingcartbackend.domain.Order;
import com.ywp.shoppingcartbackend.domain.Product;
import com.ywp.shoppingcartbackend.mapper.OrderMapper;
import com.ywp.shoppingcartbackend.service.OrderService;
import com.ywp.shoppingcartbackend.service.ProductService;
import org.apache.ibatis.javassist.NotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @author asus
* @description orderService
* @createDate 2023-05-13 20:46:08
*/
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
@Autowired
private ProductService productService;
@Override
@Transactional
public Order createOrder(Integer userId, Integer productId, Integer quantity) {
// 创建新的订单
Product product = productService.getById(productId);
if (product == null || product.getQuantity() < quantity) {
throw new IllegalArgumentException("Product is unavailable or quantity is insufficient.");
}
Order order = new Order();
order.setUserId(userId);
order.setProductId(productId);
order.setQuantity(quantity);
order.setIsDeleted(0);
this.save(order);
return order;
}
@Override
@Transactional
public void deleteOrder(Integer userId, Integer orderId) {
// 删除指定的订单
Order order = this.getById(orderId);
if (order == null || !order.getUserId().equals(userId)) {
throw new IllegalArgumentException("Invalid order id: " + orderId);
}
order.setIsDeleted(1);
this.updateById(order);
}
@Override
public List<Order> getOrdersByUserId(Integer userId) {
// 获取用户的所有订单
QueryWrapper<Order> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", userId).eq("is_deleted", 0);
return this.list(queryWrapper);
}
}

@ -0,0 +1,39 @@
package com.ywp.shoppingcartbackend.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ywp.shoppingcartbackend.domain.Product;
import com.ywp.shoppingcartbackend.exception.ResourceNotFoundException;
import com.ywp.shoppingcartbackend.mapper.ProductMapper;
import com.ywp.shoppingcartbackend.service.ProductService;
import org.springframework.stereotype.Service;
/**
* @author asus
* @description productService
* @createDate 2023-05-13 11:10:48
*/
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService {
@Override
public IPage<Product> getAllProducts(int page, int size) {
// 创建 Page 对象,传入当前页数和每页数量
Page<Product> productPage = new Page<>(page, size);
// 使用 MyBatis Plus 的 selectPage 方法进行分页查询
return this.page(productPage);
}
@Override
public Product getProductById(Integer productId) {
// 使用 MyBatis Plus 的 getById 方法来获取指定id的商品
Product product = this.getById(productId);
if (product == null) {
throw new ResourceNotFoundException("Product with id " + productId + " not found");
}
return product;
}
}

@ -0,0 +1,68 @@
package com.ywp.shoppingcartbackend.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ywp.shoppingcartbackend.domain.User;
import com.ywp.shoppingcartbackend.mapper.UserMapper;
import com.ywp.shoppingcartbackend.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
/**
* @author asus
* @description userService
* @createDate 2023-05-13 20:39:44
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
@Override
@Transactional
public User register(User user) {
if (user == null || user.getUsername() == null || user.getPassword() == null) {
throw new IllegalArgumentException("User information is incomplete.");
}
// 检查用户名是否已存在
if (getByUsername(user.getUsername()) != null) {
throw new IllegalArgumentException("Username already exists: " + user.getUsername());
}
user.setCreatedAt(new Date());
user.setUpdatedAt(new Date());
this.save(user);
return user;
}
private User getByUsername(String username) {
QueryWrapper<User> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("username", username);
return this.getOne(queryWrapper);
}
@Override
@Transactional
public User login(String username, String password) {
User user = getByUsername(username);
// 检查用户名和密码是否正确
if (user == null || !user.getPassword().equals(password)) {
throw new IllegalArgumentException("Username or password is incorrect.");
}
// 否则,返回用户信息
return user;
}
@Override
@Transactional
public User updateLocation(Integer userId, String location) {
// 更新用户的地址信息
User user = this.getById(userId);
if (user == null) {
throw new IllegalArgumentException("Invalid user id: " + userId);
}
user.setLocation(location);
this.updateById(user);
return user;
}
}

@ -0,0 +1,9 @@
spring:
datasource:
url: jdbc:mysql://localhost:3306/huas-project-yangwp?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
server:
port: 8088

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ywp.shoppingcartbackend.mapper.CartItemMapper">
<resultMap id="BaseResultMap" type="com.ywp.shoppingcartbackend.domain.CartItem">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="userId" column="user_id" jdbcType="INTEGER"/>
<result property="productId" column="product_id" jdbcType="INTEGER"/>
<result property="quantity" column="quantity" jdbcType="INTEGER"/>
<result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
<result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,user_id,product_id,
quantity,created_at,updated_at
</sql>
</mapper>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ywp.shoppingcartbackend.mapper.OrderMapper">
<resultMap id="BaseResultMap" type="com.ywp.shoppingcartbackend.domain.Order">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="userId" column="user_id" jdbcType="INTEGER"/>
<result property="productId" column="product_id" jdbcType="INTEGER"/>
<result property="quantity" column="quantity" jdbcType="INTEGER"/>
<result property="isDeleted" column="is_deleted" jdbcType="TINYINT"/>
<result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
<result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,user_id,product_id,
quantity,is_deleted,created_at,
updated_at
</sql>
</mapper>

@ -2,23 +2,21 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ywp.shppingcartbackend.mapper.ProductMapper">
<mapper namespace="com.ywp.shoppingcartbackend.mapper.ProductMapper">
<resultMap id="BaseResultMap" type="com.ywp.shppingcartbackend.domain.Product">
<resultMap id="BaseResultMap" type="com.ywp.shoppingcartbackend.domain.Product">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="price" column="price" jdbcType="DECIMAL"/>
<result property="inCart" column="in_cart" jdbcType="TINYINT"/>
<result property="quantity" column="quantity" jdbcType="INTEGER"/>
<result property="created_at" column="created_at" jdbcType="TIMESTAMP"/>
<result property="updated_at" column="updated_at" jdbcType="TIMESTAMP"/>
<result property="is_deleted" column="is_deleted" jdbcType="TINYINT"/>
<result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
<result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,name,description,
price,in_cart,quantity,
created_at,updated_at,is_deleted
price,quantity,created_at,
updated_at
</sql>
</mapper>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ywp.shoppingcartbackend.mapper.UserMapper">
<resultMap id="BaseResultMap" type="com.ywp.shoppingcartbackend.domain.User">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="username" column="username" jdbcType="VARCHAR"/>
<result property="password" column="password" jdbcType="VARCHAR"/>
<result property="location" column="location" jdbcType="VARCHAR"/>
<result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
<result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,username,password,
location,created_at,updated_at
</sql>
</mapper>

@ -1,10 +1,10 @@
package com.ywp.shppingcartbackend;
package com.ywp.shoppingcartbackend;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ShppingcartBackendApplicationTests {
class shoppingcartBackendApplicationTests {
@Test
void contextLoads() {

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

@ -0,0 +1,29 @@
# liwa-shoppingcart
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Run your tests
```
npm run test
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,25 @@
{
"name": "liwa-shoppingcart",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"axios": "^0.21.1",
"better-scroll": "^2.2.0",
"core-js": "^3.6.5",
"fastclick": "^1.0.6",
"postcss-px-to-viewport": "^1.1.1",
"vue": "^2.6.11",
"vue-lazyload": "^1.3.3",
"vue-router": "^3.5.1",
"vuex": "^3.6.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.5.0",
"@vue/cli-service": "^4.5.0",
"vue-template-compiler": "^2.6.11"
}
}

@ -0,0 +1,15 @@
module.exports = {
plugins:{
autoprefixer:{},
'postcss-px-to-viewport':{
viewportWidth: 375, // ihone6视窗的宽度对应的是设计稿的宽度一般是750
viewportHeight: 667, // 视窗的高度根据750设备的宽度来指定一般指定1334也可以不配置
unitPrecision: 3, // 指定`px`转换为视窗单位值的小数位数
viewportUnit: "vw", //指定需要转换成的视窗单位建议使用vw
selectorBlackList: ['ignore','tab-bar','tab-bar-item','cart-bottom-bar'],// 指定不转换为视窗单位的类,可以自定义,可以无限添加
minPixelValue: 1, // 小于或等于`1px`不转换为视窗单位,你也可以设置为你想要的值
mediaQuery: false // 是否允许在媒体查询中转换`px`
//exclude: [/TabBar/],//必须是正则,匹配文件的,不想让其转换
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

@ -0,0 +1,26 @@
<template>
<div id="app">
<!-- 2.路由跳转页面 -->
<!-- exclude值为组件导出的name值 -->
<keep-alive exclude='Detail'>
<router-view></router-view>
</keep-alive>
<!-- 1.底部标签栏 -->
<main-tab-bar></main-tab-bar>
</div>
</template>
<script>
import MainTabBar from "components/content/tabbar/MainTabBar";
export default {
name: "App",
components: {
MainTabBar,
},
};
</script>
<style>
@import "assets/css/base.css";
</style>

@ -0,0 +1,68 @@
/*引用normalize.css*/
/*normalize.css
reset.css*/
@import "./normalize.css";
/* @import "./reset.css"; */
/*配置一些变量,用于样式引用*/
/*:root -> 伪类选择器获取根元素html*/
:root {
--color-text: #666;
--color-background: #fff;
--color-high-text: #6f90fc;
--color-tint: #8aa5fc;/*背景颜色:导航等*/
--font-size: 14px;
--line-height: 1.5;
}
/*去除默认样式其实有了reset.css可以省去这一步*/
*,
*::before,
*::after {
padding: 0;
margin: 0;
/*宽度和高度用来设置整个盒子可见框的大小(内容区+内边距+边框)*/
box-sizing: border-box;
}
body {
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
user-select: none;/*禁止用户鼠标在页面上选中文字图片等*/
/*将默认的点击高亮设置为透明*/
/*webkit是苹果浏览器引擎tap点击highlight背景高亮color颜色用数值调节*/
-webkit-tab-hightlight-color: transparent;
color: var(--color-text);
width: 100vw;/* 100vw一个视口宽度 */
}
a {
color: var(--color-text);
text-decoration: none;/*文本修饰,去掉超链接下划线*/
}
/*
.clearfix::after {
content: '';
display: block;
clear: both;
width: 0;
height: 0;
visibility: hidden;
}*/
/*解决浮动引起的高度塌陷以及外边距重叠*/
.clearfix::before,
.clearfix::after {
content: '';
display: table;
clear: both;
}
/*针对IE低版本浏览器*/
.clearfix {
/*zoom
zoom:1IEIEhaslayout
margin*/
zoom: 1;
}

@ -0,0 +1,349 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

@ -0,0 +1,47 @@
/* v2.0 | 20110126
http://meyerweb.com/eric/tools/css/reset/
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543629945578" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6057" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M325.048 93.511l-60.030 59.435 357.181 359.631-360.184 356.603 59.522 59.93 420.207-416.043z" p-id="6058" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 520 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1540006086139" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1898" xmlns:xlink="http://www.w3.org/1999/xlink" width="22" height="22"><defs><style type="text/css"></style></defs><path d="M736 960a31.88 31.88 0 0 1-21.77-8.55l-448-416a32 32 0 0 1 0-46.9l448-416a32 32 0 1 1 43.55 46.9L335 512l422.77 392.55A32 32 0 0 1 736 960z" p-id="1899" fill="#515151"></path></svg>

After

Width:  |  Height:  |  Size: 566 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#333333" d="M953.395454 402.915559c-8.676613-24.556279-30.668487-42.291199-57.407478-46.220694l-222.3716-32.523741L576.974315 126.46632c-11.676947-24.065092-37.161365-39.672558-64.992223-39.672558-27.721365 0-53.151547 15.606443-64.828494 39.617299l-96.643084 197.759039-222.589564 32.633235c-26.629497 3.928472-48.566112 21.609157-57.297984 46.27493-8.622378 24.938995-2.182712 51.950186 16.806781 70.613244l163.271574 160.433946-37.925774 222.535329c-4.638647 26.356274 6.65763 52.440349 29.631878 68.102051 12.059664 8.130168 26.303063 12.441357 41.200354 12.441357 12.059664 0 23.955598-2.891863 34.651194-8.458649l193.666838-102.917998 194.431248 103.192244c23.355941 12.059664 53.260018 10.423397 75.578326-4.311189 22.646789-15.497972 33.887808-41.582047 29.30442-67.940368l-37.871539-222.533282 163.381068-160.653957C955.577143 454.91998 961.962573 427.963025 953.395454 402.915559zM896.587634 432.873872 722.675722 603.894943c-6.712889 6.603395-9.713222 15.989159-8.131191 25.211195l40.381709 237.377362c0.709151 4.202719-1.200338 8.18645-5.02034 10.80509-4.637624 3.166109-12.659321 3.329838-17.080004 1.037632L525.352611 768.203126c-8.404414-4.474918-18.444071-4.365424-26.848485 0L291.576263 878.160447c-5.129834 2.620687-12.605086 2.346441-17.080004-0.709151-1.963725-1.308809-6.438643-5.074575-5.402033-11.076266l40.435944-237.377362c1.582031-9.224082-1.419326-18.609847-8.131191-25.213241L127.486044 432.873872c-3.110851-3.055592-4.201695-7.148817-2.892887-10.859325 1.582031-4.529153 6.056949-7.80271 11.67797-8.676613l237.431597-34.814923c9.331529-1.364067 17.407462-7.258311 21.554922-15.715937L498.558361 151.45955c2.182712-4.474918 7.584746-7.476275 13.423731-7.476275 5.948479 0 11.405771 3.001357 13.58746 7.53051l103.299691 211.292264c4.14746 8.458649 12.223393 14.351869 21.554922 15.715937l237.213633 34.706453c5.675256 0.87288 10.258645 4.201695 11.787464 8.512884C900.736117 425.726078 899.698484 429.818279 896.587634 432.873872z" /></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543629213633" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2702" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M510.919389 63.950498c247.345388 0 447.860191 200.514803 447.86019 447.861214 0 247.348458-200.514803 447.861214-447.86019 447.861214-247.348458 0-447.863261-200.51378-447.863261-447.861214 0-247.345388 200.514803-447.861214 447.863261-447.861214z" fill="#EEEEEE" p-id="2703"></path><path d="M510.919389 515.965312c79.150688 0 143.314033-64.425312 143.314033-143.899365 0-79.473029-64.163345-143.898341-143.314033-143.898341-79.151711 0-143.317103 64.425312-143.317103 143.898341-0.001023 79.475076 64.164369 143.899364 143.317103 143.899365z m221.060744 175.867449l1.068332-0.402159c-35.032888-88.682785-121.280204-151.399175-222.129076-151.399175-99.597369 0-184.944176 61.173245-220.793662 148.112316l0.494257 0.200568a35.121915 35.121915 0 0 0-2.565429 13.20065c0 19.475564 15.798824 35.266202 35.291784 35.266201 14.758122 0 27.392884-9.05626 32.661887-21.906939l0.575099 0.233314c25.224498-60.507072 84.822874-103.028515 154.336064-103.028515 70.109778 0 130.129756 43.259246 154.97256 104.59622l0.252757-0.095168c5.65479 11.939937 17.815761 20.201088 31.912827 20.201088 19.48989 0 35.289738-15.789615 35.289738-35.266201a35.281551 35.281551 0 0 0-1.367138-9.7122z" fill="#CCCCCC" p-id="2704"></path></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543629680273" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5299" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M511.948835 898.963239c11.256368 0 20.363793-9.107425 20.363793-20.363793s-9.107425-20.363793-20.363793-20.363793c-11.256368 0-20.363793 9.107425-20.363793 20.363793C491.585041 889.855814 500.692467 898.963239 511.948835 898.963239M532.312628 125.036761l-40.727587 0c-11.256368 0-20.363793 9.107425-20.363793 20.363793s9.107425 20.363793 20.363793 20.363793l40.727587 0c11.256368 0 20.363793-9.107425 20.363793-20.363793S543.568996 125.036761 532.312628 125.036761M674.859181 63.945381l-325.820694 0c-45.025473 0-81.455173 36.429701-81.455173 81.455173l0 733.198891c0 45.025473 36.429701 81.455173 81.455173 81.455173l325.923024 0c45.025473 0 81.455173-36.429701 81.455173-81.455173l0-733.198891C756.416685 100.375082 719.884654 63.945381 674.859181 63.945381M715.586768 878.599446c0 22.512736-18.21485 40.727587-40.727587 40.727587l-325.820694 0c-22.512736 0-40.727587-18.21485-40.727587-40.727587l0-40.727587 407.378198 0 0 40.727587L715.586768 878.599446zM715.586768 797.144272l-407.275867 0 0-570.288544 407.378198 0 0 570.288544L715.586768 797.144272zM715.586768 186.128141l-407.275867 0 0-40.727587c0-22.512736 18.21485-40.727587 40.727587-40.727587l325.923024 0c22.512736 0 40.727587 18.21485 40.727587 40.727587l0 40.727587L715.586768 186.128141z" p-id="5300" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1685069587679" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3397" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M384 768a64 64 0 1 0 0.032 128.032A64 64 0 0 0 384 768M704 768a64 64 0 1 0 0.032 128.032A64 64 0 0 0 704 768M312.672 512l-51.424-192h560.96l-51.456 192H312.672z m583.36-224a32 32 0 0 0-32-32H244.064L209.792 128H96.032v64h64.64l145.728 544H800v-64H355.52l-25.696-96h490.048l12.16-45.376 64-238.88-0.768-0.192C895.424 290.336 896 289.28 896 288z" fill="#13227a" p-id="3398"></path><path d="M448 448h192v-64h-192z" fill="#13227a" p-id="3399"></path></svg>

After

Width:  |  Height:  |  Size: 785 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1685069587679" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3397" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M384 768a64 64 0 1 0 0.032 128.032A64 64 0 0 0 384 768M704 768a64 64 0 1 0 0.032 128.032A64 64 0 0 0 704 768M312.672 512l-51.424-192h560.96l-51.456 192H312.672z m583.36-224a32 32 0 0 0-32-32H244.064L209.792 128H96.032v64h64.64l145.728 544H800v-64H355.52l-25.696-96h490.048l12.16-45.376 64-238.88-0.768-0.192C895.424 290.336 896 289.28 896 288z" fill="#515151" p-id="3398"></path><path d="M448 448h192v-64h-192z" fill="#515151" p-id="3399"></path></svg>

After

Width:  |  Height:  |  Size: 785 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1613796465763" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6979" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M685.909333 85.333333h144.469334A108.757333 108.757333 0 0 1 938.666667 194.56v145.706667a108.757333 108.757333 0 0 1-108.288 109.226666h-144.469334a108.757333 108.757333 0 0 1-108.330666-109.226666V194.56A108.757333 108.757333 0 0 1 685.909333 85.333333z" fill="#515151" opacity=".4" p-id="6980"></path><path d="M193.664 85.333333h144.426667a108.757333 108.757333 0 0 1 108.330666 109.226667v145.706667a108.757333 108.757333 0 0 1-108.330666 109.226666H193.706667A108.757333 108.757333 0 0 1 85.333333 340.224V194.56A108.757333 108.757333 0 0 1 193.664 85.333333z m0 489.216h144.426667a108.757333 108.757333 0 0 1 108.330666 109.226667v145.664A108.8 108.8 0 0 1 338.090667 938.666667H193.706667A108.8 108.8 0 0 1 85.333333 829.44v-145.706667a108.757333 108.757333 0 0 1 108.330667-109.226666z m636.714667 0h-144.469334a108.757333 108.757333 0 0 0-108.330666 109.226667v145.664A108.8 108.8 0 0 0 685.909333 938.666667h144.469334A108.8 108.8 0 0 0 938.666667 829.44v-145.706667a108.757333 108.757333 0 0 0-108.288-109.226666z" fill="#515151" p-id="6981"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1613796465763" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6979" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M685.909333 85.333333h144.469334A108.757333 108.757333 0 0 1 938.666667 194.56v145.706667a108.757333 108.757333 0 0 1-108.288 109.226666h-144.469334a108.757333 108.757333 0 0 1-108.330666-109.226666V194.56A108.757333 108.757333 0 0 1 685.909333 85.333333z" fill="#5e82f8" opacity=".4" p-id="6980"></path><path d="M193.664 85.333333h144.426667a108.757333 108.757333 0 0 1 108.330666 109.226667v145.706667a108.757333 108.757333 0 0 1-108.330666 109.226666H193.706667A108.757333 108.757333 0 0 1 85.333333 340.224V194.56A108.757333 108.757333 0 0 1 193.664 85.333333z m0 489.216h144.426667a108.757333 108.757333 0 0 1 108.330666 109.226667v145.664A108.8 108.8 0 0 1 338.090667 938.666667H193.706667A108.8 108.8 0 0 1 85.333333 829.44v-145.706667a108.757333 108.757333 0 0 1 108.330667-109.226666z m636.714667 0h-144.469334a108.757333 108.757333 0 0 0-108.330666 109.226667v145.664A108.8 108.8 0 0 0 685.909333 938.666667h144.469334A108.8 108.8 0 0 0 938.666667 829.44v-145.706667a108.757333 108.757333 0 0 0-108.288-109.226666z" fill="#5e82f8" p-id="6981"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1685070403768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5280" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M128 320v576h576V320H128z m512 512H192V384h448v448z" fill="#13227a" p-id="5281"></path><path d="M832 128H384v128h64V192h384v384h-64v64h128V128z" fill="#13227a" p-id="5282"></path></svg>

After

Width:  |  Height:  |  Size: 518 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1685070403768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5280" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M128 320v576h576V320H128z m512 512H192V384h448v448z" fill="#515151" p-id="5281"></path><path d="M832 128H384v128h64V192h384v384h-64v64h128V128z" fill="#515151" p-id="5282"></path></svg>

After

Width:  |  Height:  |  Size: 518 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1613797388305" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7296" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M982.016 404.48 573.344 84c-34.944-27.648-89.696-27.616-124.576 0L43.2 404.544c-13.856 10.976-16.224 31.104-5.28 44.96s31.104 16.224 44.96 5.28L96 444.416 96 832c0 54.944 56.928 96 107.872 96l640 0C894.176 928 928 889.408 928 832L928 443.456l14.496 11.36c5.888 4.608 12.8 6.816 19.712 6.816 9.504 0 18.912-4.192 25.216-12.256C998.336 435.488 995.904 415.36 982.016 404.48zM608 797.184 608 864l-63.968 0-64 0L416 864l0-66.816 0-112.32c0-37.216 30.048-77.248 96-77.248 65.984 0 96 40.032 96 77.248L608 797.184z" p-id="7297" fill="#515151"></path></svg>

After

Width:  |  Height:  |  Size: 927 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1613797388305" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7296" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M982.016 404.48 573.344 84c-34.944-27.648-89.696-27.616-124.576 0L43.2 404.544c-13.856 10.976-16.224 31.104-5.28 44.96s31.104 16.224 44.96 5.28L96 444.416 96 832c0 54.944 56.928 96 107.872 96l640 0C894.176 928 928 889.408 928 832L928 443.456l14.496 11.36c5.888 4.608 12.8 6.816 19.712 6.816 9.504 0 18.912-4.192 25.216-12.256C998.336 435.488 995.904 415.36 982.016 404.48zM608 797.184 608 864l-63.968 0-64 0L416 864l0-66.816 0-112.32c0-37.216 30.048-77.248 96-77.248 65.984 0 96 40.032 96 77.248L608 797.184z" p-id="7297" fill="#5e82f8"></path></svg>

After

Width:  |  Height:  |  Size: 927 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1685070516423" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5531" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M320 480h384v-64H320zM320 608h256v-64h-256zM320 736h256v-64h-256z" fill="#13227a" p-id="5532"></path><path d="M832 160h-128V96H320v64H192c-19.2 0-32 12.8-32 32v704c0 19.2 12.8 32 32 32h640c19.2 0 32-12.8 32-32V192c0-19.2-12.8-32-32-32zM384 160h256v64h-256V160z m416 704H224V224h96v64h384V224h96v640z" fill="#13227a" p-id="5533"></path></svg>

After

Width:  |  Height:  |  Size: 674 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1685070516423" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5531" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M320 480h384v-64H320zM320 608h256v-64h-256zM320 736h256v-64h-256z" fill="#515151" p-id="5532"></path><path d="M832 160h-128V96H320v64H192c-19.2 0-32 12.8-32 32v704c0 19.2 12.8 32 32 32h640c19.2 0 32-12.8 32-32V192c0-19.2-12.8-32-32-32zM384 160h256v64h-256V160z m416 704H224V224h96v64h384V224h96v640z" fill="#515151" p-id="5533"></path></svg>

After

Width:  |  Height:  |  Size: 674 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save