!106 【功能优化】确认收货添加提示确认,提交售后信息后直接返回到订单详情

Merge pull request !106 from Lcp/pr
pull/104/MERGE
芋道源码 2024-10-01 09:33:30 +00:00 committed by Gitee
commit 6abad0df4d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 37 additions and 14 deletions

View File

@ -171,7 +171,7 @@
uni.showToast({
title: '申请成功',
});
sheep.$router.go('/pages/order/aftersale/list');
sheep.$router.redirect('/pages/order/aftersale/list');
}
}

View File

@ -260,7 +260,7 @@
<script setup>
import sheep from '@/sheep';
import { onLoad } from '@dcloudio/uni-app';
import { onLoad, onShow } from '@dcloudio/uni-app';
import { reactive, ref } from 'vue';
import { isEmpty } from 'lodash-es';
import {
@ -345,11 +345,20 @@
return;
}
//
const { code } = await OrderApi.receiveOrder(orderId);
if (code === 0) {
await getOrderDetail(orderId);
}
uni.showModal({
title: '提示',
content: '确认收货吗?',
success: async function (res) {
if (!res.confirm) {
return;
}
//
const { code } = await OrderApi.receiveOrder(orderId);
if (code === 0) {
await getOrderDetail(orderId);
}
},
});
}
// #ifdef MP-WEIXIN
@ -420,6 +429,11 @@
}
}
onShow(async () => {
//onShow,
await getOrderDetail(state.orderInfo.id);
})
onLoad(async (options) => {
let id = 0;
if (options.id) {
@ -430,7 +444,7 @@
if (state.comeinType === 'wechat') {
state.merchantTradeNo = options.merchant_trade_no;
}
await getOrderDetail(id);
state.orderInfo.id = id
});
</script>

View File

@ -223,12 +223,21 @@
return;
}
//
const { code } = await OrderApi.receiveOrder(order.id);
if (code === 0) {
resetPagination(state.pagination);
await getOrderList();
}
uni.showModal({
title: '提示',
content: '确认收货吗?',
success: async function (res) {
if (!res.confirm) {
return;
}
//
const { code } = await OrderApi.receiveOrder(order.id);
if (code === 0) {
resetPagination(state.pagination);
await getOrderList();
}
},
});
}
// #ifdef MP-WEIXIN