feat:添加发货内容详情,优化积分商城接口,取消订单添加确认框,物流追踪样式修改,收银台页面优化,添加小程序直播组件

This commit is contained in:
kele
2023-03-09 18:45:09 +08:00
parent 8a78cb9a7a
commit 8eb4e4609d
16 changed files with 670 additions and 96 deletions
+20 -12
View File
@@ -287,7 +287,7 @@
function onTabsChange(e) {
if (state.currentTab === e.index) return;
state.pagination = pagination
state.pagination = pagination;
state.currentTab = e.index;
getOrderList();
@@ -354,11 +354,19 @@
// 取消订单
async function onCancel(orderId) {
const { error, data } = await sheep.$api.order.cancel(orderId);
if (error === 0) {
let index = state.pagination.data.findIndex((order) => order.id === orderId);
state.pagination.data[index] = data;
}
uni.showModal({
title: '提示',
content: '确定要取消订单吗?',
success: async function (res) {
if (res.confirm) {
const { error, data } = await sheep.$api.order.cancel(orderId);
if (error === 0) {
let index = state.pagination.data.findIndex((order) => order.id === orderId);
state.pagination.data[index] = data;
}
}
},
});
}
// 删除订单
@@ -408,11 +416,11 @@
});
state.error = res.error;
if (res.error === 0) {
let orderList = _.concat(state.pagination.data, res.data.data);
state.pagination = {
...res.data,
data: orderList,
};
let orderList = _.concat(state.pagination.data, res.data.data);
state.pagination = {
...res.data,
data: orderList,
};
if (state.pagination.current_page < state.pagination.last_page) {
state.loadStatus = 'more';
@@ -443,7 +451,7 @@
//下拉刷新
onPullDownRefresh(() => {
state.pagination = pagination
state.pagination = pagination;
getOrderList();
setTimeout(function () {
uni.stopPullDownRefresh();