update style
This commit is contained in:
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user