From 77c6edefb3fe2dba3b7363b3e15eea868e6efe48 Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Mon, 8 Apr 2019 23:17:14 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E8=AE=A2=E5=8D=95=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile-web/src/api/order.js | 36 + mobile-web/src/api/product.js | 8 +- mobile-web/src/api/promotion.js | 6 +- mobile-web/src/api/user.js | 8 +- mobile-web/src/components/page/product.vue | 146 ++-- mobile-web/src/config/request.js | 20 +- mobile-web/src/config/router.js | 7 + mobile-web/src/page/product/detail.vue | 689 +++++++++--------- .../src/page/shipping/order-success.vue | 35 + mobile-web/src/page/shipping/order.vue | 273 +++---- mobile-web/src/page/user/order/list.vue | 379 ++++++---- 11 files changed, 920 insertions(+), 687 deletions(-) create mode 100644 mobile-web/src/api/order.js create mode 100644 mobile-web/src/page/shipping/order-success.vue diff --git a/mobile-web/src/api/order.js b/mobile-web/src/api/order.js new file mode 100644 index 000000000..c83150619 --- /dev/null +++ b/mobile-web/src/api/order.js @@ -0,0 +1,36 @@ +import request from "../config/request"; + + +export function getOrderPage(params) { + return request({ + url: '/order-api/users/order/order_page', + method: 'get', + params: { + ...params, + } + }); +} + +export function cancelOrder(id) { + return request({ + url: '/product-api/users/spu/info', + method: 'get', + params: { + id, + } + }); +} + +export function createOrder(params) { + return request({ + headers: { + 'Content-Type': 'application/json', + }, + url: '/order-api/users/order/create_order', + method: 'post', + data: { + ...params, + }, + }); +} + diff --git a/mobile-web/src/api/product.js b/mobile-web/src/api/product.js index cc9146a60..d6f4946ef 100644 --- a/mobile-web/src/api/product.js +++ b/mobile-web/src/api/product.js @@ -2,7 +2,7 @@ import request from "../config/request"; export function getProductCategoryList(pid) { return request({ - url: 'product-api/users/category/list', + url: '/product-api/users/category/list', method: 'get', params: { pid @@ -12,7 +12,7 @@ export function getProductCategoryList(pid) { export function getProductSpuPage(cid, pageNo, pageSize) { return request({ - url: 'product-api/users/spu/page', + url: '/product-api/users/spu/page', method: 'get', params: { cid, @@ -24,10 +24,10 @@ export function getProductSpuPage(cid, pageNo, pageSize) { export function getProductSpuInfo(id) { return request({ - url: 'product-api/users/spu/info', + url: '/product-api/users/spu/info', method: 'get', params: { id, } }); -} \ No newline at end of file +} diff --git a/mobile-web/src/api/promotion.js b/mobile-web/src/api/promotion.js index c44ea1106..f5e1c9a5a 100644 --- a/mobile-web/src/api/promotion.js +++ b/mobile-web/src/api/promotion.js @@ -4,7 +4,7 @@ import request from "../config/request"; export function getBannerList() { return request({ - url: 'promotion-api/users/banner/list', + url: '/promotion-api/users/banner/list', method: 'get', }); } @@ -13,7 +13,7 @@ export function getBannerList() { export function getProductRecommendList() { return request({ - url: 'promotion-api/users/product_recommend/list', + url: '/promotion-api/users/product_recommend/list', method: 'get', }); -} \ No newline at end of file +} diff --git a/mobile-web/src/api/user.js b/mobile-web/src/api/user.js index d0f768ddf..d4c18b37b 100644 --- a/mobile-web/src/api/user.js +++ b/mobile-web/src/api/user.js @@ -74,14 +74,14 @@ export function ExchangeCoupon(code){ export function getUserInfo() { return request({ - url: 'user-api/users/user/info', + url: '/user-api/users/user/info', method: 'get', }); } export function doUserUpdateNickname(nickname) { return request({ - url: 'user-api/users/user/update_nickname', + url: '/user-api/users/user/update_nickname', method: 'post', params: { nickname, @@ -91,7 +91,7 @@ export function doUserUpdateNickname(nickname) { export function doPassportMobileRegister(mobile, code) { return request({ - url: 'user-api/users/passport/mobile/register', + url: '/user-api/users/passport/mobile/register', method: 'post', params: { mobile, @@ -102,7 +102,7 @@ export function doPassportMobileRegister(mobile, code) { export function doPassportMobileSendRegisterCode(mobile) { return request({ - url: 'user-api/users/passport/mobile/send_register_code', + url: '/user-api/users/passport/mobile/send_register_code', method: 'post', params: { mobile, diff --git a/mobile-web/src/components/page/product.vue b/mobile-web/src/components/page/product.vue index 025f14441..1fca9acff 100644 --- a/mobile-web/src/components/page/product.vue +++ b/mobile-web/src/components/page/product.vue @@ -1,79 +1,89 @@ \ No newline at end of file + diff --git a/mobile-web/src/page/shipping/order-success.vue b/mobile-web/src/page/shipping/order-success.vue new file mode 100644 index 000000000..244ea54f0 --- /dev/null +++ b/mobile-web/src/page/shipping/order-success.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/mobile-web/src/page/shipping/order.vue b/mobile-web/src/page/shipping/order.vue index 052b35dce..766ef3f8d 100644 --- a/mobile-web/src/page/shipping/order.vue +++ b/mobile-web/src/page/shipping/order.vue @@ -1,7 +1,7 @@ diff --git a/mobile-web/src/page/user/order/list.vue b/mobile-web/src/page/user/order/list.vue index 94c9f390c..1dfbfbc51 100644 --- a/mobile-web/src/page/user/order/list.vue +++ b/mobile-web/src/page/user/order/list.vue @@ -1,176 +1,249 @@