提交 01e5404e authored 作者: sin's avatar sin

添加申请退货

上级 1c5f413c
......@@ -11,16 +11,16 @@
"dependencies": {
"axios": "^0.18.0",
"moment": "^2.24.0",
"pingpp-js": "^2.2.13",
"vant": "^1.3.1",
"vue": "^2.5.17",
"vue-router": "^3.0.1",
"vuex": "^3.1.0",
"pingpp-js": "^2.2.13"
"vuex": "^3.1.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.4.1",
"@vue/cli-plugin-eslint": "^3.4.1",
"@vue/cli-service": "^3.4.1",
"@vue/cli-service": "^3.6.0",
"babel-plugin-import": "^1.8.0",
"less": "^3.8.1",
"less-loader": "^4.1.0",
......
......@@ -142,3 +142,26 @@ export function getLogisticsInfo(params) {
}
});
}
// 退货信息
export function getOrderReturnReason() {
return request({
url: '/order-api/users/order_return/reason',
method: 'get',
});
}
export function orderReturnApply(params) {
return request({
headers: {
'Content-Type': 'application/json',
},
url: '/order-api/users/order_return/apply',
method: 'POST',
data: {
...params,
},
});
}
......@@ -133,7 +133,7 @@ const routes = [
}
},
{
path: '/user/aftersale/apply',
path: '/user/aftersale/apply/:orderId',
component: () => import('../page/user/aftersale/apply'),
meta: {
title: '申请售后'
......
......@@ -46,7 +46,7 @@
</van-cell-group>
<div class="footer">
<div class="munu">
<van-button v-if="orderInfo.status === 3 " size="small">退货</van-button>
<van-button size="small">申请售后</van-button>
<van-button v-if="orderInfo.status === 3 " size="small" v-on:click="clickConfirmReceiving(orderId)">确认收货</van-button>
<van-button v-if="orderInfo.status === 1 " size="small" type="danger" @click="goPay(orderInfo.id)">支付</van-button>
</div>
......@@ -74,12 +74,6 @@
price: '499',
quantity: 2
},
{
imageURL: 'https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712',
title: 'BEYOND博洋家纺 床上套件 秋冬保暖纯棉床单被套 双人被罩 磨毛全棉印花床品四件套',
price: '499',
quantity: 2
},
]
}
},
......@@ -97,7 +91,7 @@
const { id } = this.$route.params;
this.orderId = id;
getOrderInfo(id).then(res => {
const { status, recipient, latestLogisticsDetail} = res;
const { status, recipient, latestLogisticsDetail, orderItems} = res;
// 提交订单、配送中、交易成功
if ([1, 2].indexOf(status) !== -1) {
this.active = 0
......@@ -126,6 +120,13 @@
...latestLogisticsDetail,
logisticsTimeText: logisticsTimeText,
}
this.products = orderItems.map(item => {
return {
...item,
picUrls: [item.skuImage],
}
})
})
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论