update style
This commit is contained in:
@ -7,7 +7,7 @@ import { TravelStatus, TransportationType } from "../../../types/Travel";
|
||||
interface TravelEditorData {
|
||||
/** 模式:create 或 edit */
|
||||
mode: "create" | "edit";
|
||||
/** 旅行 ID(编辑模式) */
|
||||
/** 出行 ID(编辑模式) */
|
||||
id?: number;
|
||||
/** 标题 */
|
||||
title: string;
|
||||
@ -105,7 +105,7 @@ Page({
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 加载旅行详情(编辑模式) */
|
||||
/** 加载出行详情(编辑模式) */
|
||||
async loadTravelDetail(id: number) {
|
||||
wx.showLoading({ title: "加载中...", mask: true });
|
||||
try {
|
||||
@ -230,7 +230,7 @@ Page({
|
||||
this.updateTravel();
|
||||
}
|
||||
},
|
||||
/** 创建旅行 */
|
||||
/** 创建出行 */
|
||||
async createTravel() {
|
||||
this.setData({ isSaving: true });
|
||||
|
||||
@ -238,9 +238,7 @@ Page({
|
||||
await TravelApi.create({
|
||||
title: this.data.title.trim(),
|
||||
content: this.data.content.trim(),
|
||||
travelAt: this.data.travelAtUndecided
|
||||
? null
|
||||
: new Date(`${this.data.date}T${this.data.time}:00`).getTime(),
|
||||
travelAt: this.data.travelAtUndecided ? null : Time.now(),
|
||||
days: this.data.daysUndecided ? null : this.data.days,
|
||||
transportationType: this.data.transportationType,
|
||||
status: this.data.status
|
||||
@ -256,7 +254,7 @@ Page({
|
||||
this.setData({ isSaving: false });
|
||||
}
|
||||
},
|
||||
/** 更新旅行 */
|
||||
/** 更新出行 */
|
||||
async updateTravel() {
|
||||
this.setData({ isSaving: true });
|
||||
try {
|
||||
@ -283,7 +281,7 @@ Page({
|
||||
this.setData({ isSaving: false });
|
||||
}
|
||||
},
|
||||
/** 删除旅行 */
|
||||
/** 删除出行 */
|
||||
deleteTravel() {
|
||||
this.setData({
|
||||
deleteDialogVisible: true,
|
||||
|
||||
Reference in New Issue
Block a user