From 7bfe9c5c71f93352a72243d35a630f5b99755453 Mon Sep 17 00:00:00 2001 From: huasheng_yi <1685368363@qq.com> Date: Sun, 7 Oct 2018 21:33:07 +0800 Subject: [PATCH 01/31] =?UTF-8?q?create=20for=20=E5=95=86=E5=93=81?= =?UTF-8?q?=E7=A7=8D=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/common.scss | 8 ++- src/components/Search.vue | 88 +++++++++++++++++++++++++++++++++ src/config/CategoryURLConfig.js | 8 +++ src/modules/user/UserCenter.vue | 12 ++--- src/router/index.js | 8 ++- src/service/category-service.js | 17 +++++++ 6 files changed, 133 insertions(+), 8 deletions(-) create mode 100644 src/components/Search.vue create mode 100644 src/config/CategoryURLConfig.js create mode 100644 src/service/category-service.js diff --git a/src/assets/css/common.scss b/src/assets/css/common.scss index 1094f00..ef81f37 100644 --- a/src/assets/css/common.scss +++ b/src/assets/css/common.scss @@ -44,7 +44,13 @@ a { .theme-color:hover { color: #38f; } - +//页面固定的宽度 +.w{ + width: 1120px; + margin: 0 auto; + position: relative; + overflow: hidden; +} #app { font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; diff --git a/src/components/Search.vue b/src/components/Search.vue new file mode 100644 index 0000000..ad3ac53 --- /dev/null +++ b/src/components/Search.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/config/CategoryURLConfig.js b/src/config/CategoryURLConfig.js new file mode 100644 index 0000000..0110424 --- /dev/null +++ b/src/config/CategoryURLConfig.js @@ -0,0 +1,8 @@ +const server = '/api' +export const getCategoryByParentId = '/category/get_category.do' //快速注册 + + +export default { + getCategoryByParentId, + server +} diff --git a/src/modules/user/UserCenter.vue b/src/modules/user/UserCenter.vue index 059a501..8210b46 100644 --- a/src/modules/user/UserCenter.vue +++ b/src/modules/user/UserCenter.vue @@ -2,7 +2,7 @@ * @Author: Sa * @Date: 2018-10-06 22:32:02 * @Last Modified by: mikey.zhaopeng - * @Last Modified time: 2018-10-06 23:57:40 + * @Last Modified time: 2018-10-07 20:28:03 * @Description: 用户个人中心页面 */ + + diff --git a/src/modules/home/HomeBanner.vue b/src/modules/home/HomeBanner.vue index db26b75..e4bbe11 100644 --- a/src/modules/home/HomeBanner.vue +++ b/src/modules/home/HomeBanner.vue @@ -6,21 +6,16 @@ * @Description: 首页banner */ diff --git a/src/service/cart-service.js b/src/service/cart-service.js index 7a611b5..37fb1dc 100644 --- a/src/service/cart-service.js +++ b/src/service/cart-service.js @@ -3,6 +3,10 @@ import _urlConfig from "@/config/CartURLConfig"; class Cart { + /** + * 添加到购物车 + * @param {*} data + */ addPro2Cart(data){ return _axios.request({ url: _urlConfig.addPro2Cart, @@ -11,5 +15,16 @@ class Cart { }); } + /** + * + * 查看购物列表信息 + */ + getCartList(){ + return _axios.request({ + url: _urlConfig.getCarts, + method: "get" + }); + } + } export default Cart; \ No newline at end of file -- Gitee From b269a5c9060e2498540af414b7dbde09bb365263 Mon Sep 17 00:00:00 2001 From: huasheng_yi <1685368363@qq.com> Date: Tue, 16 Oct 2018 23:01:14 +0800 Subject: [PATCH 20/31] =?UTF-8?q?update=20for=20=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/CartURLConfig.js | 7 ++- src/modules/cart/Cart.vue | 85 +++++++++++++++++++++++++------------ src/service/cart-service.js | 20 +++++++++ 3 files changed, 84 insertions(+), 28 deletions(-) diff --git a/src/config/CartURLConfig.js b/src/config/CartURLConfig.js index 5706abc..774b094 100644 --- a/src/config/CartURLConfig.js +++ b/src/config/CartURLConfig.js @@ -2,16 +2,19 @@ * @Author: Kingsley * @Date: 2018-10-13 22:25:57 * @Last Modified by: mikey.zhaopeng - * @Last Modified time: 2018-10-15 22:20:35 + * @Last Modified time: 2018-10-16 22:25:39 * 商品种类模块的URL配置 */ const server = '/api' export const addPro2Cart = '/cart/add_list.do' //添加到购物车 export const getCarts = '/cart/cart_list.do' //获取购物车列表 - +export const selectAll = '/cart/select_all.do' +export const unselectAll = '/cart/un_select_all.do' export default { addPro2Cart, getCarts, + selectAll, + unselectAll, server } diff --git a/src/modules/cart/Cart.vue b/src/modules/cart/Cart.vue index 366e3b9..bdd0e67 100644 --- a/src/modules/cart/Cart.vue +++ b/src/modules/cart/Cart.vue @@ -9,7 +9,7 @@ 商品信息 @@ -20,13 +20,13 @@ -
- +
+
@@ -39,7 +39,7 @@ {{product.productPrice}} - + {{product.productTotalPrice}} @@ -51,11 +51,14 @@
+
+ 购物车!空~ +