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

@ -40,9 +40,8 @@
&.locations {
.action {
gap: 32rpx;
display: flex;
.header {
padding: 16rpx 32rpx;
}
.location {

View File

@ -6,9 +6,9 @@ import { TravelLocationApi } from "../../../api/TravelLocationApi";
import { Travel, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TravelLocation, TravelLocationTypeLabel, TravelLocationTypeIcon } from "../../../types/Travel";
interface TravelDetailData {
/** 行详情 */
/** 行详情 */
travel: Travel | null;
/** 行 ID */
/** 行 ID */
travelId: string;
/** 是否正在加载 */
isLoading: boolean;
@ -71,7 +71,7 @@ Page({
}
},
/** 获取行详情 */
/** 获取行详情 */
async fetchDetail(id: string) {
this.setData({ isLoading: true });
@ -88,7 +88,7 @@ Page({
// 获取地点列表
this.fetchLocations(id);
} catch (error) {
console.error("获取行详情失败:", error);
console.error("获取行详情失败:", error);
wx.showToast({
title: "加载失败",
icon: "error"
@ -122,7 +122,7 @@ Page({
}
},
/** 编辑行 */
/** 编辑行 */
toEdit() {
const { travel } = this.data;
if (travel && travel.id) {
@ -163,7 +163,7 @@ Page({
}
},
/** 删除行 */
/** 删除行 */
deleteTravel() {
this.setData({
deleteDialogVisible: true,

View File

@ -1,6 +1,6 @@
<!--pages/main/travel-detail/index.wxml-->
<view class="custom-navbar">
<t-navbar title="行详情" leftArrow bind:go-back="goBack">
<t-navbar title="行详情" leftArrow bind:go-back="goBack">
<view slot="right" class="edit-btn" bind:tap="toEdit">
<t-icon name="edit" size="24px" />
</view>
@ -24,7 +24,7 @@
</t-tag>
</view>
<!-- 标题 -->
<view class="section title">{{travel.title || '未命名行'}}</view>
<view class="section title">{{travel.title || '未命名行'}}</view>
<!-- 基本信息 -->
<t-cell-group class="section info">
<view slot="title" class="title">基本信息</view>
@ -34,7 +34,7 @@
<text wx:else class="undecided-value">未定</text>
</view>
</t-cell>
<t-cell left-icon="calendar" title="行天数">
<t-cell left-icon="calendar" title="行天数">
<view slot="note">
<text wx:if="{{travel.days}}">{{travel.days}} 天</text>
<text wx:else class="undecided-value">未定</text>
@ -44,18 +44,16 @@
<view slot="note">{{transportLabels[travel.transportationType]}}</view>
</t-cell>
</t-cell-group>
<!-- 行内容 -->
<t-cell-group class="section">
<!-- 行内容 -->
<t-cell-group wx:if="{{travel.content}}" class="section">
<view slot="title" class="title">详细说明</view>
<t-cell title="{{travel.content || '暂无'}}" />
<t-cell title="{{travel.content}}" />
</t-cell-group>
<t-cell-group class="section locations">
<view slot="title" class="title">地点列表</view>
<t-cell>
<view slot="right-icon" class="action">
<t-icon name="map" size="20px" color="var(--theme-wx)" bind:tap="toMap" />
<t-icon name="add" size="20px" color="var(--theme-wx)" bind:tap="toAddLocation" />
</view>
<t-cell class="header">
<t-button slot="left-icon" theme="primary" icon="map" size="small" bind:tap="toMap">地图浏览</t-button>
<t-icon slot="right-icon" name="add" size="20px" color="var(--theme-wx)" bind:tap="toAddLocation" />
</t-cell>
<t-cell wx:if="{{isLoadingLocations}}" class="loading">
<t-loading slot="title" theme="dots" size="40rpx" />
@ -73,14 +71,18 @@
>
<view slot="note" class="note">{{locationTypeLabels[item.type]}}</view>
<view slot="description" class="description">
<view wx:if="{{item.amount}}" class="item">
<t-icon name="money" size="14px" />
<text>¥{{item.amount}}</text>
</view>
<view wx:if="{{item.requireIdCard}}" class="item">
<t-icon name="user" size="14px" />
<text>需要身份证</text>
</view>
<view wx:if="{{item.requireAppointment}}" class="item">
<t-icon name="user" size="14px" />
<text>需要预约</text>
</view>
<view wx:if="{{item.amount}}" class="item">
<t-icon name="money" size="14px" />
<text>¥{{item.amount}}</text>
</view>
<view wx:if="{{item.importance}}" class="item">
<t-icon name="chart-bubble" size="14px" />
<text>重要程度</text>
@ -97,8 +99,7 @@
</view>
</t-cell>
</block>
<t-cell wx:else class="empty-state" description="暂无地点信息">
</t-cell>
<t-cell wx:else class="empty-state" description="暂无地点信息" />
</t-cell-group>
<!-- 操作按钮 -->
<view class="section action">
@ -119,7 +120,7 @@
t-class="edit"
bind:tap="toEdit"
>
编辑行计划
编辑行计划
</t-button>
</view>
</view>
@ -128,7 +129,7 @@
<!-- 删除确认对话框 -->
<t-dialog
visible="{{deleteDialogVisible}}"
title="删除行计划"
title="删除行计划"
confirm-btn="{{ {content: '删除', variant: 'text', theme: 'danger'} }}"
cancel-btn="取消"
bind:confirm="confirmDelete"