diff --git a/mobile-web/src/api/order.js b/mobile-web/src/api/order.js
index 1658558ee..0663873e6 100644
--- a/mobile-web/src/api/order.js
+++ b/mobile-web/src/api/order.js
@@ -45,3 +45,24 @@ export function createOrder(params) {
});
}
+// Cart
+
+export function addCart(skuId, quantity) {
+ return request({
+ url: '/order-api/users/cart/add',
+ method: 'post',
+ params: {
+ skuId,
+ quantity,
+ }
+ });
+}
+
+export function countCart() {
+ return request({
+ url: '/order-api/users/cart/count',
+ method: 'get',
+ params: {
+ }
+ });
+}
diff --git a/mobile-web/src/components/common/productcard.vue b/mobile-web/src/components/common/productcard.vue
index 51692d9d7..c5be62b2a 100644
--- a/mobile-web/src/components/common/productcard.vue
+++ b/mobile-web/src/components/common/productcard.vue
@@ -8,8 +8,7 @@
style="background:#fff"
>
-
-
+
diff --git a/mobile-web/src/config/request.js b/mobile-web/src/config/request.js
index 6bdbe764f..becd9ca02 100644
--- a/mobile-web/src/config/request.js
+++ b/mobile-web/src/config/request.js
@@ -208,6 +208,7 @@ service.interceptors.response.use(
// this.$router.push({ path: '/login' })
// TODO 跳转到登陆页.不是很优雅
location.replace('/#login');
+ location.reload();
}
}
});
diff --git a/mobile-web/src/config/router.js b/mobile-web/src/config/router.js
index 7c9960599..759f7183b 100644
--- a/mobile-web/src/config/router.js
+++ b/mobile-web/src/config/router.js
@@ -58,7 +58,8 @@ const routes = [
component: () => import('../page/user/info/detail'),
name: 'user',
meta: {
- title: '个人信息'
+ title: '个人信息',
+ requireAuth: true,
}
},
{
@@ -178,7 +179,8 @@ const routes = [
path: '/order',
component: () => import('../page/shipping/order'),
meta: {
- title: '确认订单'
+ title: '确认订单',
+ requireAuth: true,
}
},
{
diff --git a/mobile-web/src/page/cart/index.vue b/mobile-web/src/page/cart/index.vue
index d846f423d..3f25a72cb 100644
--- a/mobile-web/src/page/cart/index.vue
+++ b/mobile-web/src/page/cart/index.vue
@@ -6,74 +6,36 @@
全选
-
+
-
+