From 40e4236af20a039fa40063e82c7fbd515f61e767 Mon Sep 17 00:00:00 2001
From: YunaiV <>
Date: Mon, 25 Mar 2019 18:46:51 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=EF=BC=9A=E5=95=86=E5=93=81?=
=?UTF-8?q?=E5=88=86=E7=B1=BB=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin-web/README.md | 6 +-
.../src/components/GlobalFooter/index.js | 28 ++--
admin-web/src/defaultSettings.js | 2 +-
admin-web/src/layouts/UserLayout.js | 8 +-
admin-web/src/pages/Admin/AdminList.js | 9 +-
admin-web/src/pages/User/Login.js | 89 +++++------
admin-web/src/pages/document.ejs | 2 +-
mobile-web/src/api/product.js | 11 ++
mobile-web/src/config/request.js | 140 +++++++++---------
mobile-web/src/page/category/index.vue | 138 +++++++++++------
.../application/config/MVCConfiguration.java | 14 +-
.../users/UsersProductCategoryController.java | 5 +-
12 files changed, 249 insertions(+), 203 deletions(-)
create mode 100644 mobile-web/src/api/product.js
diff --git a/admin-web/README.md b/admin-web/README.md
index b40101c02..4dfb4acc8 100644
--- a/admin-web/README.md
+++ b/admin-web/README.md
@@ -31,4 +31,8 @@ http://www.tuicool.com/articles/YrQ7j2a
#### 5.注释
1.route目录下的文件需要加上文件头部注释(写清楚文件是什么功能)
-2.component文件需要加上头部注释 (写清楚改控件的用处)
\ No newline at end of file
+2.component文件需要加上头部注释 (写清楚改控件的用处)
+
+## 补充规范
+
+1. services 目录中,每个 api 文件,对应后端一个 api 服务。主要考虑是
\ No newline at end of file
diff --git a/admin-web/src/components/GlobalFooter/index.js b/admin-web/src/components/GlobalFooter/index.js
index 1c2fb74ef..f98f51d9e 100644
--- a/admin-web/src/components/GlobalFooter/index.js
+++ b/admin-web/src/components/GlobalFooter/index.js
@@ -6,20 +6,20 @@ const GlobalFooter = ({ className, links, copyright }) => {
const clsString = classNames(styles.globalFooter, className);
return (
);
diff --git a/admin-web/src/defaultSettings.js b/admin-web/src/defaultSettings.js
index 4ba7eb390..8809961b6 100644
--- a/admin-web/src/defaultSettings.js
+++ b/admin-web/src/defaultSettings.js
@@ -9,7 +9,7 @@ module.exports = {
menu: {
disableLocal: false,
},
- title: 'Ant Design Pro',
+ title: '小商城管理平台',
pwa: true,
// your iconfont Symbol Scrip Url
// eg://at.alicdn.com/t/font_1039637_btcrd5co4w.js
diff --git a/admin-web/src/layouts/UserLayout.js b/admin-web/src/layouts/UserLayout.js
index f17467fce..b3ddd0430 100644
--- a/admin-web/src/layouts/UserLayout.js
+++ b/admin-web/src/layouts/UserLayout.js
@@ -29,9 +29,7 @@ const links = [
];
const copyright = (
-
- Copyright 2018 蚂蚁金服体验技术部出品
-
+ 请使用谷歌浏览器(Chrome)获取最佳用户体验
);
class UserLayout extends Component {
@@ -63,10 +61,10 @@ class UserLayout extends Component {
TODO....
+ {/*TODO....
*/}
{children}
diff --git a/admin-web/src/pages/Admin/AdminList.js b/admin-web/src/pages/Admin/AdminList.js
index 59f821553..e0d080f7d 100644
--- a/admin-web/src/pages/Admin/AdminList.js
+++ b/admin-web/src/pages/Admin/AdminList.js
@@ -105,7 +105,7 @@ function List ({ dataSource, loading, pagination, searchParams, dispatch,
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
常用分类
-
- -
-
-
- 蓝牙耳机
-
-
- -
+
+
-
-
-
热门分类
-
@@ -74,6 +82,8 @@
diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/config/MVCConfiguration.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/config/MVCConfiguration.java
index 4e50c7d49..6bb15b388 100644
--- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/config/MVCConfiguration.java
+++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/config/MVCConfiguration.java
@@ -3,10 +3,7 @@ package cn.iocoder.mall.product.application.config;
import cn.iocoder.common.framework.config.GlobalExceptionHandler;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
-import org.springframework.web.servlet.config.annotation.EnableWebMvc;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.config.annotation.*;
@EnableWebMvc
@Configuration
@@ -31,4 +28,13 @@ public class MVCConfiguration implements WebMvcConfigurer {
registry.addResourceHandler("webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
}
+ // TODO 芋艿,允许跨域
+ @Override
+ public void addCorsMappings(CorsRegistry registry) {
+ registry.addMapping("/**")
+ .allowedHeaders("*")
+ .allowedMethods("*")
+ .allowedOrigins("*");
+ }
+
}
\ No newline at end of file
diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/users/UsersProductCategoryController.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/users/UsersProductCategoryController.java
index 5eeec51db..cee54b337 100644
--- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/users/UsersProductCategoryController.java
+++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/users/UsersProductCategoryController.java
@@ -1,5 +1,6 @@
package cn.iocoder.mall.product.application.controller.users;
+import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.product.api.ProductCategoryService;
import cn.iocoder.mall.product.api.bo.ProductCategoryBO;
import cn.iocoder.mall.product.application.convert.ProductCategoryConvert;
@@ -26,9 +27,9 @@ public class UsersProductCategoryController {
@GetMapping("/list")
@ApiOperation("获得指定编号下的子分类的数组")
@ApiImplicitParam(name = "pid", value = "指定分类编号", required = true, example = "0")
- public List
list(@RequestParam("pid") Integer pid) {
+ public CommonResult> list(@RequestParam("pid") Integer pid) {
List result = productCategoryService.getListByPid(pid);
- return ProductCategoryConvert.INSTANCE.convertToVO(result);
+ return CommonResult.success(ProductCategoryConvert.INSTANCE.convertToVO(result));
}
}
\ No newline at end of file