代码更新

This commit is contained in:
GaoHao
2025-03-04 18:30:16 +08:00
parent fd0c452a76
commit 4f65b08c06
32 changed files with 622 additions and 1616 deletions

View File

@@ -25,7 +25,7 @@ export default {
label: '退单'
},
{
key: 'part-refund',
key: 'part_refund',
label: '部分退单'
},
{
@@ -49,21 +49,17 @@ export default {
// label: '支付中'
// }
],
sendType: [
dineMode: [
{
key: 'post',
label: '快递'
},
{
key: 'takeaway',
key: 'take-away',
label: '外卖'
},
{
key: 'takeself',
key: 'take-out',
label: '自提'
},
{
key: 'table',
key: 'dine-in',
label: '堂食'
}
],

View File

@@ -24,10 +24,11 @@ export function isTuiCai(item) {
return item.status == 'return'
}
export function isTui(item) {
return item.status == 'return' || item.status == 'refund' || item.status == 'refunding'
console.log(item)
return item.status == 'return' || item.status == 'refund' || item.status == 'refunding' || item.status == 'part_refund'
}
export function isGift(item) {
return !isTui(item) && item.payAmount<=0
return !isTui(item) && item.isGift == 1
}
export function numSum(arr) {
const sum = arr.reduce((a, b) => {

View File

@@ -39,15 +39,15 @@ class WebsocketUtil {
// 连接成功后启动心跳和消息监听
this.startHeartbeat();
this.listenForMessages();
// 注意:这里的 onClose 监听器应该放在 uni.connectSocket 调用之后
this.socketTask.onClose((result) => {
this.isOpen = false;
// if( this.isOpen ){
this.reconnect();
// }
});
});
// 注意:这里的 onClose 监听器应该放在 uni.connectSocket 调用之后
this.socketTask.onClose((result) => {
this.isOpen = false;
// if( this.isOpen ){
this.reconnect();
// }
});
}