diff --git a/src/component/order.vue b/src/component/order.vue
index a547a4d..bce906f 100644
--- a/src/component/order.vue
+++ b/src/component/order.vue
@@ -1,45 +1,47 @@
-
-
+
+
{{ getStatus() }}
-
-
+
+
+
+
共计:¥{{ total }}
-
-
+
+
{{ groupLeader.address }}
自行取货
-
+
快递配送
-
+
-
+
-
+
@@ -63,11 +65,11 @@ interface Goods {
interface Props {
id: String
- order_status: 'open' | 'cancel' | 'close' | 'finish'
+ orderStatus: 'open' | 'cancel' | 'close' | 'finish'
total:String
type:'express' | 'pickup'
- pay_status: 'pending' | 'failure' | 'success' | 'refunding' | 'refunded'
- express_status: 'init' | 'pending' | 'receiving' | 'received' | 'merchant_receiving' | 'merchant_received'
+ payStatus: 'pending' | 'failure' | 'success' | 'refunding' | 'refunded'
+ expressStatus: 'init' | 'pending' | 'receiving' | 'received' | 'merchant_receiving' | 'merchant_received'
groupLeader:GroupLeader
itemList:Goods[]
}
@@ -100,17 +102,17 @@ function getCodeHandler(id) {
}
function getStatus() {
- if (props.order_status === 'cancel') {
+ if (props.orderStatus === 'cancel') {
return '订单取消'
- } else if (props.order_status === 'finish') {
+ } else if (props.orderStatus === 'finish') {
return '订单完成';
- } else if (props.order_status === 'open') {
+ } else if (props.orderStatus === 'open') {
// 订单中间状态 判断支付状态
- if (props.pay_status === 'pending') {
+ if (props.payStatus === 'pending') {
return '待支付'
- } else if (props.pay_status === 'success') {
+ } else if (props.payStatus === 'success') {
// 支付完成判断物流状态
- switch (props.express_status) {
+ switch (props.expressStatus) {
case 'init':
return '待发货';
case 'pending':
@@ -120,13 +122,13 @@ function getStatus() {
case 'received':
return '已收货';
}
- } else if (props.pay_status === 'refunding') {
+ } else if (props.payStatus === 'refunding') {
return '退款中'
}
- } else if (props.order_status === 'close') {
- if (props.pay_status === 'failure') {
+ } else if (props.orderStatus === 'close') {
+ if (props.payStatus === 'failure') {
return '支付失败'
- } else if (props.pay_status === 'refunded') {
+ } else if (props.payStatus === 'refunded') {
return '已退款'
}
}
@@ -149,13 +151,54 @@ function getStatus() {
margin: 8px;
}
-.flex-c-m-8 {
+.flex-s-between-m-8-w-400 {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ width:400rpx;
+ margin: 8px;
+}
+
+.flex-s-between-m-8-w-200 {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ width:260rpx;
+ margin: 8px;
+}
+
+.flex-c-8 {
display: flex;
align-items: center;
margin-left: 8rpx;
margin-right: 8rpx;
- margin-top: 20rpx;
- margin-bottom: 10rpx;
+}
+
+.header-name {
+ display: flex;
+ align-items: center;
+ width: 150rpx;
+}
+
+.order-top {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-top:20rpx;
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+}
+
+.express-m-8 {
+ display: flex;
+ align-items: center;
+ width:160rpx;
+ margin-left: 8rpx;
+ margin-right: 8rpx;
+}
+
+.btn-l-8 {
+ margin-left: 8rpx;
}
.avatar {
@@ -164,4 +207,10 @@ function getStatus() {
border-radius: 50%;
}
+.goods-img {
+ margin: 8rpx;
+ width: 100rpx;
+ height: 100rpx;
+}
+
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 11d3cd1..abe2ef6 100644
--- a/src/main.js
+++ b/src/main.js
@@ -2,12 +2,16 @@ import {
createSSRApp
} from "vue";
import App from "./App.vue";
-import GroupOrderComponent from "./component/grouporder.vue";
import { setupInterceptors } from "@/utils/interceptors";
+import GroupOrderComponent from "./component/grouporder.vue";
+import OrderComponent from "@/component/order.vue";
+
export function createApp() {
const app = createSSRApp(App);
app.use(setupInterceptors)
app.component('GroupOrderComponent',GroupOrderComponent)
+ app.component('OrderComponent',OrderComponent)
+
return {
app,
};
diff --git a/src/pages/order/index.vue b/src/pages/order/index.vue
index 224995f..dae5476 100644
--- a/src/pages/order/index.vue
+++ b/src/pages/order/index.vue
@@ -8,11 +8,26 @@
{{item.name}}
-
+
+
+