update style

This commit is contained in:
Timi
2025-12-17 16:16:10 +08:00
parent 423775c255
commit 369cfe2bf2
40 changed files with 375 additions and 507 deletions

View File

@ -2,13 +2,13 @@
import Time from "../../../utils/Time";
import { TravelApi } from "../../../api/TravelApi";
import { Travel, TravelPage, TravelStatus, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel } from "../../../types/Travel";
import { Travel, TravelPage, TravelStatus, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TransportationTypeIcon } from "../../../types/Travel";
import { OrderType } from "../../../types/Model";
interface TravelData {
/** 分页参数 */
page: TravelPage;
/** 行列表 */
/** 行列表 */
list: Travel[];
/** 当前筛选状态 */
currentStatus: TravelStatus | "ALL";
@ -27,6 +27,8 @@ interface TravelData {
statusIcons: typeof TravelStatusIcon;
/** 交通类型标签映射 */
transportLabels: typeof TransportationTypeLabel;
/** 交通类型图标映射 */
transportIcons: typeof TransportationTypeIcon;
}
Page({
@ -47,7 +49,8 @@ Page({
menuLeft: 0,
statusLabels: TravelStatusLabel,
statusIcons: TravelStatusIcon,
transportLabels: TransportationTypeLabel
transportLabels: TransportationTypeLabel,
transportIcons: TransportationTypeIcon
},
onLoad() {
this.resetAndFetch();
@ -89,7 +92,7 @@ Page({
});
this.fetch();
},
/** 获取行列表 */
/** 获取行列表 */
async fetch() {
if (this.data.isFetching || this.data.isFinished) {
return;
@ -123,7 +126,7 @@ Page({
isFinished: list.length < this.data.page.size
});
} catch (error) {
console.error("获取行列表失败:", error);
console.error("获取行列表失败:", error);
} finally {
this.setData({ isFetching: false });
}
@ -164,7 +167,7 @@ Page({
});
this.resetAndFetch();
},
/** 新建行 */
/** 新建行 */
toCreate() {
wx.navigateTo({
url: "/pages/main/travel-editor/index"