feat: 调整样式
This commit is contained in:
@@ -80,6 +80,30 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
deleteLog(e) {
|
||||
const id = e.currentTarget.dataset.id;
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '确定要删除这条识别记录吗?',
|
||||
confirmColor: '#EF5350',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
wx.showLoading({ title: '删除中' });
|
||||
request.post('/classify/deleteClassifyLog', { ids: [id] }).then(() => {
|
||||
wx.hideLoading();
|
||||
wx.showToast({ title: '删除成功', icon: 'success' });
|
||||
const newRecords = this.data.records.filter(r => r.id !== id);
|
||||
this.setData({ records: newRecords });
|
||||
}).catch(err => {
|
||||
wx.hideLoading();
|
||||
console.error('Delete log failed', err);
|
||||
wx.showToast({ title: '删除失败', icon: 'none' });
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_formatTime(dateStr) {
|
||||
if (!dateStr) return '';
|
||||
const d = new Date(dateStr);
|
||||
|
||||
Reference in New Issue
Block a user