From daf3f4c8c712efdc17c2a86ec87b836f0876b165 Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Sun, 14 Apr 2019 18:16:28 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=B7=BB=E5=8A=A0=E8=AE=A2=E5=8D=95=20info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile-web/package.json | 1 + mobile-web/src/api/order.js | 36 ++-- mobile-web/src/page/user/order/info.vue | 254 +++++++++++++++--------- 3 files changed, 184 insertions(+), 107 deletions(-) diff --git a/mobile-web/package.json b/mobile-web/package.json index 4d1794fa6..430724bc5 100644 --- a/mobile-web/package.json +++ b/mobile-web/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "axios": "^0.18.0", + "moment": "^2.24.0", "vant": "^1.3.1", "vue": "^2.5.17", "vue-router": "^3.0.1", diff --git a/mobile-web/src/api/order.js b/mobile-web/src/api/order.js index 72fdb1f6f..edc977caa 100644 --- a/mobile-web/src/api/order.js +++ b/mobile-web/src/api/order.js @@ -1,5 +1,19 @@ import request from "../config/request"; +// order + +export function createOrder(params) { + return request({ + headers: { + 'Content-Type': 'application/json', + }, + url: '/order-api/users/order/create_order', + method: 'post', + data: { + ...params, + }, + }); +} export function getOrderPage(params) { return request({ @@ -32,21 +46,19 @@ export function getOrderConfirmCreateOrder(skuId, quantity) { }); } -export function createOrder(params) { +export function getOrderInfo(orderId) { return request({ - headers: { - 'Content-Type': 'application/json', - }, - url: '/order-api/users/order/create_order', - method: 'post', - data: { - ...params, - }, + url: '/order-api/users/order/info', + method: 'get', + params: { + orderId, + } }); } -export function createOrderFromCart(userAddressId, - remark) { +// Cart + +export function createOrderFromCart(userAddressId, remark) { return request({ url: '/order-api/users/order/create_order_from_cart', method: 'post', @@ -57,8 +69,6 @@ export function createOrderFromCart(userAddressId, }); } -// Cart - export function addCart(skuId, quantity) { return request({ url: '/order-api/users/cart/add', diff --git a/mobile-web/src/page/user/order/info.vue b/mobile-web/src/page/user/order/info.vue index f64915b38..0a2e48ad8 100644 --- a/mobile-web/src/page/user/order/info.vue +++ b/mobile-web/src/page/user/order/info.vue @@ -1,110 +1,176 @@