From d5c1c29795f2d464b5620142fbfdf5421ec9b36e Mon Sep 17 00:00:00 2001 From: sfmind <130201237@qq.com> Date: Wed, 14 Dec 2022 00:58:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E5=92=8C?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5=E5=88=9D=E6=AD=A5?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-app/api/order.js | 2 + yudao-ui-app/common/orderStatus.js | 7 + yudao-ui-app/pages.json | 8 +- yudao-ui-app/pages/order/detail.vue | 252 ++++++++++++++++++++++++++++ yudao-ui-app/pages/order/list.vue | 195 +++++++++++++++++++++ yudao-ui-app/pages/order/order.vue | 87 ---------- yudao-ui-app/pages/user/user.vue | 53 +++--- yudao-ui-app/uni.scss | 4 +- 8 files changed, 493 insertions(+), 115 deletions(-) create mode 100644 yudao-ui-app/common/orderStatus.js create mode 100644 yudao-ui-app/pages/order/detail.vue create mode 100644 yudao-ui-app/pages/order/list.vue delete mode 100644 yudao-ui-app/pages/order/order.vue diff --git a/yudao-ui-app/api/order.js b/yudao-ui-app/api/order.js index 6de577975..cc305f15c 100644 --- a/yudao-ui-app/api/order.js +++ b/yudao-ui-app/api/order.js @@ -2,3 +2,5 @@ const { http } = uni.$u // 获得订单交易分页 export const getOrderPage = params => http.get('/trade/order/page', { params }) +// 获得交易订单详情 +export const getOrderDetail = params => http.get('/trade/order/get-detail', { params }) diff --git a/yudao-ui-app/common/orderStatus.js b/yudao-ui-app/common/orderStatus.js new file mode 100644 index 000000000..475d4cfb0 --- /dev/null +++ b/yudao-ui-app/common/orderStatus.js @@ -0,0 +1,7 @@ +export default { + '0': { name: '待付款', icon: 'red-packet'}, + '10': { name: '待发货', icon: 'car'}, + '20': { name: '待收货', icon: 'order'}, + '30': { name: '已完成', icon: 'integral'}, + '40': { name: '已取消', icon: 'close-circle'} +} diff --git a/yudao-ui-app/pages.json b/yudao-ui-app/pages.json index 228ba5cf9..3bda77165 100644 --- a/yudao-ui-app/pages.json +++ b/yudao-ui-app/pages.json @@ -75,11 +75,17 @@ } }, { - "path": "pages/order/order", + "path": "pages/order/list", "style": { "navigationBarTitleText": "我的订单" } }, + { + "path": "pages/order/detail", + "style": { + "navigationBarTitleText": "订单详情" + } + }, { "path": "pages/address/list", "style": { diff --git a/yudao-ui-app/pages/order/detail.vue b/yudao-ui-app/pages/order/detail.vue new file mode 100644 index 000000000..32324d2d4 --- /dev/null +++ b/yudao-ui-app/pages/order/detail.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/yudao-ui-app/pages/order/list.vue b/yudao-ui-app/pages/order/list.vue new file mode 100644 index 000000000..9501a6984 --- /dev/null +++ b/yudao-ui-app/pages/order/list.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/yudao-ui-app/pages/order/order.vue b/yudao-ui-app/pages/order/order.vue deleted file mode 100644 index 76c8c03b1..000000000 --- a/yudao-ui-app/pages/order/order.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - diff --git a/yudao-ui-app/pages/user/user.vue b/yudao-ui-app/pages/user/user.vue index b72c522e5..8221e19ae 100644 --- a/yudao-ui-app/pages/user/user.vue +++ b/yudao-ui-app/pages/user/user.vue @@ -4,7 +4,7 @@ - {{ hasLogin ? userInfo.nickname || ' ' : '匿名用户' }} + {{ hasLogin ? userInfo.nickname || '会员用户' : '匿名用户' }} {{ hasLogin ? userInfo.mobile || ' ' : '登录/注册' }} @@ -26,9 +26,9 @@ - + - {{ item.title }} + {{ item.name }} @@ -37,8 +37,8 @@ - + + {{ item.value }} {{ item.title }} @@ -53,21 +53,16 @@ - diff --git a/yudao-ui-app/uni.scss b/yudao-ui-app/uni.scss index 7b272df42..cc8852e5c 100644 --- a/yudao-ui-app/uni.scss +++ b/yudao-ui-app/uni.scss @@ -28,14 +28,14 @@ $custom-border-style: 1rpx solid #f3f3f3; display: flex; flex-direction: $direction; align-items: center; - justify-content: left; + justify-content: flex-start; } @mixin flex-right($direction: row) { display: flex; flex-direction: $direction; align-items: center; - justify-content: right; + justify-content: flex-end; } @mixin flex-center($direction: row) {