Compare commits
7 Commits
9f7df3cfed
...
84fc382c91
| Author | SHA1 | Date | |
|---|---|---|---|
| 84fc382c91 | |||
| 107177d095 | |||
| 2966289930 | |||
| 6f74559c01 | |||
| 186a74bc77 | |||
| 51e679dd83 | |||
| 1ad1da1c4e |
@ -57,7 +57,7 @@
|
||||
.loading,
|
||||
.finished {
|
||||
color: var(--td-text-color-placeholder);
|
||||
padding: 32rpx 0;
|
||||
padding: 32rpx 0 64rpx 0;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@ -8,22 +8,19 @@
|
||||
.map {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.custom-callout {
|
||||
.location {
|
||||
width: fit-content;
|
||||
min-width: 350rpx;
|
||||
max-width: 450rpx;
|
||||
background: var(--theme-bg-card-secondary);
|
||||
background: var(--theme-bg-card);
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, .15);
|
||||
border-radius: 6rpx;
|
||||
|
||||
.callout-content {
|
||||
.content {
|
||||
display: flex;
|
||||
padding: 8rpx 16rpx 8rpx 8rpx;
|
||||
align-items: flex-start;
|
||||
|
||||
.thumb-container {
|
||||
.thumb {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
position: relative;
|
||||
@ -32,12 +29,12 @@
|
||||
overflow: hidden;
|
||||
border-radius: 6rpx;
|
||||
|
||||
.thumb {
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.count-badge {
|
||||
.badge {
|
||||
top: 4rpx;
|
||||
right: 4rpx;
|
||||
color: #fff;
|
||||
@ -49,14 +46,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
.text-container {
|
||||
.text {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
flex-direction: column;
|
||||
|
||||
.location {
|
||||
.value {
|
||||
color: var(--theme-text-primary);
|
||||
width: calc(var(--title-length) * 30rpx);
|
||||
overflow: hidden;
|
||||
font-size: 30rpx;
|
||||
white-space: nowrap;
|
||||
@ -82,6 +80,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loading {
|
||||
top: 50%;
|
||||
|
||||
@ -13,23 +13,28 @@
|
||||
bindcallouttap="onCalloutTap"
|
||||
>
|
||||
<cover-view slot="callout">
|
||||
<block wx:for="{{locations}}" wx:key="locationKey" wx:for-index="markerIndex">
|
||||
<cover-view class="custom-callout" marker-id="{{markerIndex}}">
|
||||
<cover-view class="callout-content">
|
||||
<cover-view wx:if="{{item.previewThumb}}" class="thumb-container">
|
||||
<cover-image class="thumb" src="{{item.previewThumb}}" />
|
||||
<cover-view wx:if="{{item.count > 1}}" class="count-badge">{{item.count}}</cover-view>
|
||||
<cover-view
|
||||
class="location"
|
||||
wx:for="{{locations}}"
|
||||
wx:key="locationKey"
|
||||
wx:for-index="locationIndex"
|
||||
marker-id="{{locationIndex}}"
|
||||
style="{{'--title-length: ' + item.location.length}}"
|
||||
>
|
||||
<cover-view class="content">
|
||||
<cover-view wx:if="{{item.previewThumb}}" class="thumb">
|
||||
<cover-image class="img" src="{{item.previewThumb}}" />
|
||||
<cover-view wx:if="{{1 < item.count}}" class="badge">{{item.count}}</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="text-container">
|
||||
<cover-view wx:if="{{item.location}}" class="location">{{item.location}}</cover-view>
|
||||
<cover-view class="text">
|
||||
<cover-view wx:if="{{item.location}}" class="value">{{item.location}}</cover-view>
|
||||
<cover-view class="date-count">
|
||||
<cover-view class="date">{{item.date}}</cover-view>
|
||||
<cover-view wx:if="{{item.count > 1}}" class="count">{{item.count}} 条日记</cover-view>
|
||||
<cover-view wx:if="{{1 < item.count}}" class="count">{{item.count}} 条日记</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</block>
|
||||
</cover-view>
|
||||
</map>
|
||||
<view wx:if="{{isLoading}}" class="loading">
|
||||
|
||||
@ -1,8 +1,21 @@
|
||||
page {
|
||||
height: 100vh;
|
||||
background: var(--td-bg-color-page);
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100vw;
|
||||
height: calc(100vh - var(--navbar-height, 88rpx));
|
||||
.page-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
flex-direction: column;
|
||||
|
||||
.navbar {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
<view class="custom-navbar">
|
||||
<view class="page-container">
|
||||
<view class="navbar">
|
||||
<t-navbar title="列表查找" left-arrow />
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
</view>
|
||||
<view class="content">
|
||||
<journal-list
|
||||
id="listRef"
|
||||
searchable="{{true}}"
|
||||
mode="navigate"
|
||||
bind:navigate="onNavigateItem"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import Time from "../../../utils/Time";
|
||||
import { TravelApi } from "../../../api/TravelApi";
|
||||
import { TravelLocationApi } from "../../../api/TravelLocationApi";
|
||||
import { Travel, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TravelLocation, TravelLocationTypeLabel, TravelLocationTypeIcon } from "../../../types/Travel";
|
||||
import { Travel, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TravelLocation, TravelLocationTypeLabel, TravelLocationTypeIcon, TransportationTypeIcon } from "../../../types/Travel";
|
||||
|
||||
interface TravelDetailData {
|
||||
/** 出行详情 */
|
||||
@ -22,6 +22,8 @@ interface TravelDetailData {
|
||||
statusIcons: typeof TravelStatusIcon;
|
||||
/** 交通类型标签映射 */
|
||||
transportLabels: typeof TransportationTypeLabel;
|
||||
/** 交通类型图标映射 */
|
||||
transportIcons: typeof TransportationTypeIcon;
|
||||
/** 地点类型标签映射 */
|
||||
locationTypeLabels: typeof TravelLocationTypeLabel;
|
||||
/** 地点类型图标映射 */
|
||||
@ -42,6 +44,7 @@ Page({
|
||||
statusLabels: TravelStatusLabel,
|
||||
statusIcons: TravelStatusIcon,
|
||||
transportLabels: TransportationTypeLabel,
|
||||
transportIcons: TransportationTypeIcon,
|
||||
locationTypeLabels: TravelLocationTypeLabel,
|
||||
locationTypeIcons: TravelLocationTypeIcon,
|
||||
deleteDialogVisible: false,
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
<text wx:else class="undecided-value">未定</text>
|
||||
</view>
|
||||
</t-cell>
|
||||
<t-cell left-icon="{{travel.transportationType === 'PLANE' ? 'flight-takeoff' : travel.transportationType === 'TRAIN' ? 'map-route' : travel.transportationType === 'SELF_DRIVING' ? 'control-platform' : 'location'}}" title="交通方式">
|
||||
<t-cell left-icon="{{transportIcons[travel.transportationType]}}" title="交通方式">
|
||||
<view slot="note">{{transportLabels[travel.transportationType]}}</view>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
|
||||
@ -55,28 +55,21 @@
|
||||
|
||||
.map {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mini-map {
|
||||
.instance {
|
||||
width: 100%;
|
||||
height: 520rpx;
|
||||
}
|
||||
|
||||
.custom-callout {
|
||||
width: fit-content;
|
||||
max-width: 400rpx;
|
||||
background: var(--theme-bg-card-secondary);
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, .15);
|
||||
border-radius: 8rpx;
|
||||
|
||||
.callout-content {
|
||||
padding: 12rpx 20rpx;
|
||||
|
||||
.callout-text {
|
||||
.marker {
|
||||
width: calc(var(--title-length) * 28rpx);
|
||||
color: var(--theme-text-primary);
|
||||
padding: 8rpx;
|
||||
overflow: hidden;
|
||||
font-size: 28rpx;
|
||||
background: var(--theme-bg-card);
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, .15);
|
||||
white-space: nowrap;
|
||||
border-radius: 8rpx;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
@ -91,11 +84,10 @@
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
|
||||
.media-item {
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.thumbnail {
|
||||
width: 100%;
|
||||
|
||||
@ -120,15 +120,12 @@ Page({
|
||||
width: 24,
|
||||
height: 30,
|
||||
customCallout: {
|
||||
anchorY: 0,
|
||||
anchorY: -2,
|
||||
anchorX: 0,
|
||||
display: "ALWAYS"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
console.log(mediaItems);
|
||||
|
||||
this.setData({
|
||||
location: {
|
||||
...location,
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
<t-cell class="map">
|
||||
<map
|
||||
slot="description"
|
||||
class="mini-map"
|
||||
class="instance"
|
||||
latitude="{{location.lat}}"
|
||||
longitude="{{location.lng}}"
|
||||
markers="{{mapMarkers}}"
|
||||
@ -43,10 +43,8 @@
|
||||
show-location
|
||||
>
|
||||
<cover-view slot="callout">
|
||||
<cover-view class="custom-callout" marker-id="0">
|
||||
<cover-view class="callout-content">
|
||||
<cover-view class="callout-text">{{location.title || '地点'}}</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="marker" marker-id="0" style="--title-length: {{location.title.length}}">
|
||||
{{location.title || '地点'}}
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</map>
|
||||
@ -92,9 +90,9 @@
|
||||
</t-cell-group>
|
||||
<!-- 照片/视频 -->
|
||||
<t-cell-group wx:if="{{location.mediaItems && 0 < location.mediaItems.length}}" class="section media">
|
||||
<view slot="title" class="title">照片/视频</view>
|
||||
<view slot="title" class="title">照片视频</view>
|
||||
<t-cell>
|
||||
<view class="media-grid">
|
||||
<view slot="title" class="media-grid">
|
||||
<view
|
||||
wx:for="{{location.mediaItems}}"
|
||||
wx:key="attachmentId"
|
||||
|
||||
@ -7,13 +7,11 @@
|
||||
"t-input": "tdesign-miniprogram/input/input",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
||||
"t-picker": "tdesign-miniprogram/picker/picker",
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar",
|
||||
"t-loading": "tdesign-miniprogram/loading/loading",
|
||||
"t-stepper": "tdesign-miniprogram/stepper/stepper",
|
||||
"t-textarea": "tdesign-miniprogram/textarea/textarea",
|
||||
"t-cell-group": "tdesign-miniprogram/cell-group/cell-group",
|
||||
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item"
|
||||
"t-cell-group": "tdesign-miniprogram/cell-group/cell-group"
|
||||
},
|
||||
"styleIsolation": "shared"
|
||||
}
|
||||
|
||||
@ -23,6 +23,34 @@
|
||||
.section {
|
||||
margin-top: 48rpx;
|
||||
|
||||
.rate-cell {
|
||||
|
||||
&.decided {
|
||||
|
||||
.rate {
|
||||
display: block;
|
||||
gap: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.text {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.undecided {
|
||||
|
||||
.rate {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.text {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .title {
|
||||
color: var(--theme-text-secondary);
|
||||
padding: 0 32rpx;
|
||||
@ -53,8 +81,8 @@
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
|
||||
.item {
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: var(--theme-bg-card);
|
||||
@ -149,11 +177,11 @@
|
||||
display: flex;
|
||||
padding: 24rpx 16rpx 48rpx 16rpx;
|
||||
|
||||
.delete-btn {
|
||||
.delete {
|
||||
flex: .6;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
.submit {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,8 +34,12 @@ interface TravelLocationEditorData {
|
||||
requireAppointment: boolean;
|
||||
/** 评分 */
|
||||
score: number;
|
||||
/** 评分是否未定 */
|
||||
scoreUndecided: boolean;
|
||||
/** 重要程度 */
|
||||
importance: number;
|
||||
/** 重要程度是否未定 */
|
||||
importanceUndecided: boolean;
|
||||
/** 媒体列表(创建和编辑模式使用) */
|
||||
mediaList: (MediaItem | WechatMediaItem)[];
|
||||
/** 新媒体列表(编辑模式使用) */
|
||||
@ -67,7 +71,7 @@ Page({
|
||||
mode: "create",
|
||||
id: undefined,
|
||||
travelId: 0,
|
||||
type: TravelLocationType.ATTRACTION,
|
||||
type: TravelLocationType.FOOD,
|
||||
title: "",
|
||||
description: "",
|
||||
location: "",
|
||||
@ -77,7 +81,9 @@ Page({
|
||||
requireIdCard: false,
|
||||
requireAppointment: false,
|
||||
score: 3,
|
||||
scoreUndecided: true,
|
||||
importance: 1,
|
||||
importanceUndecided: true,
|
||||
mediaList: [],
|
||||
newMediaList: [],
|
||||
isLoading: false,
|
||||
@ -167,6 +173,14 @@ Page({
|
||||
} as MediaItem;
|
||||
});
|
||||
|
||||
// 判断评分是否未定
|
||||
const scoreUndecided = location.score === null || location.score === undefined;
|
||||
const score = location.score !== null && location.score !== undefined ? location.score : 3;
|
||||
|
||||
// 判断重要程度是否未定
|
||||
const importanceUndecided = location.importance === null || location.importance === undefined;
|
||||
const importance = location.importance !== null && location.importance !== undefined ? location.importance : 1;
|
||||
|
||||
this.setData({
|
||||
type,
|
||||
locationTypeIndex: locationTypeIndex >= 0 ? locationTypeIndex : 0,
|
||||
@ -178,8 +192,10 @@ Page({
|
||||
amount: location.amount || 0,
|
||||
requireIdCard: location.requireIdCard || false,
|
||||
requireAppointment: location.requireAppointment || false,
|
||||
score: location.score !== undefined ? location.score : 3,
|
||||
importance: location.importance !== undefined ? location.importance : 1,
|
||||
score,
|
||||
scoreUndecided,
|
||||
importance,
|
||||
importanceUndecided,
|
||||
mediaList,
|
||||
isLoading: false
|
||||
});
|
||||
@ -225,6 +241,32 @@ Page({
|
||||
this.setData({ importance: e.detail.value });
|
||||
},
|
||||
|
||||
/** 清除评分 */
|
||||
clearScore() {
|
||||
this.setData({ scoreUndecided: true });
|
||||
},
|
||||
|
||||
/** 清除重要程度 */
|
||||
clearImportance() {
|
||||
this.setData({ importanceUndecided: true });
|
||||
},
|
||||
|
||||
/** 点击未定文字选择评分 */
|
||||
selectScore() {
|
||||
this.setData({
|
||||
scoreUndecided: false,
|
||||
score: 3
|
||||
});
|
||||
},
|
||||
|
||||
/** 点击未定文字选择重要程度 */
|
||||
selectImportance() {
|
||||
this.setData({
|
||||
importanceUndecided: false,
|
||||
importance: 1
|
||||
});
|
||||
},
|
||||
|
||||
/** 选择位置 */
|
||||
chooseLocation() {
|
||||
wx.chooseLocation({
|
||||
@ -483,8 +525,8 @@ Page({
|
||||
amount: this.data.amount,
|
||||
requireIdCard: this.data.requireIdCard,
|
||||
requireAppointment: this.data.requireAppointment,
|
||||
score: this.data.score,
|
||||
importance: this.data.importance,
|
||||
score: this.data.scoreUndecided ? null : this.data.score,
|
||||
importance: this.data.importanceUndecided ? null : this.data.importance,
|
||||
tempFileIds
|
||||
});
|
||||
wx.showToast({
|
||||
@ -539,8 +581,8 @@ Page({
|
||||
amount: this.data.amount,
|
||||
requireIdCard: this.data.requireIdCard,
|
||||
requireAppointment: this.data.requireAppointment,
|
||||
score: this.data.score,
|
||||
importance: this.data.importance,
|
||||
score: this.data.scoreUndecided ? null : this.data.score,
|
||||
importance: this.data.importanceUndecided ? null : this.data.importance,
|
||||
attachmentIds,
|
||||
tempFileIds
|
||||
});
|
||||
|
||||
@ -61,29 +61,53 @@
|
||||
<switch checked="{{requireAppointment}}" bindchange="onChangeRequireAppointment" />
|
||||
</view>
|
||||
</t-cell>
|
||||
<t-cell title="重要程度">
|
||||
<view slot="right-icon">
|
||||
<t-cell title="重要程度" class="rate-cell importance {{importanceUndecided ? 'undecided' : 'decided'}}">
|
||||
<view slot="note">
|
||||
<view class="rate">
|
||||
<t-rate
|
||||
value="{{importance}}"
|
||||
count="{{5}}"
|
||||
size="24px"
|
||||
size="20px"
|
||||
bind:change="onChangeImportance"
|
||||
/>
|
||||
<t-icon
|
||||
name="close-circle-filled"
|
||||
size="20px"
|
||||
class="clear-icon"
|
||||
bindtap="clearImportance"
|
||||
/>
|
||||
</view>
|
||||
<view class="text" bindtap="selectImportance">
|
||||
未定
|
||||
</view>
|
||||
</view>
|
||||
</t-cell>
|
||||
<t-cell title="评分">
|
||||
<view slot="right-icon">
|
||||
<t-cell title="评分" class="rate-cell score {{scoreUndecided ? 'undecided' : 'decided'}}">
|
||||
<view slot="note">
|
||||
<view class="rate">
|
||||
<t-rate
|
||||
value="{{score}}"
|
||||
count="{{5}}"
|
||||
size="24px"
|
||||
size="20px"
|
||||
bind:change="onChangeScore"
|
||||
/>
|
||||
<t-icon
|
||||
name="close-circle-filled"
|
||||
size="20px"
|
||||
class="clear-icon"
|
||||
bindtap="clearScore"
|
||||
/>
|
||||
</view>
|
||||
<view class="text" bindtap="selectScore">
|
||||
未定
|
||||
</view>
|
||||
</view>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<view class="section media">
|
||||
<view class="gallery">
|
||||
<t-cell-group class="section media">
|
||||
<view slot="title" class="title">图片视频</view>
|
||||
<t-cell>
|
||||
<view slot="title" class="gallery">
|
||||
<!-- 创建模式:mediaList 显示新选择的媒体 -->
|
||||
<block wx:if="{{mode === 'create'}}">
|
||||
<block wx:for="{{mediaList}}" wx:key="index">
|
||||
@ -207,7 +231,8 @@
|
||||
<t-icon name="add" />
|
||||
</t-button>
|
||||
</view>
|
||||
</view>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
|
||||
<!-- 上传进度提示 -->
|
||||
<view wx:if="{{isUploading}}" class="section upload">
|
||||
|
||||
@ -9,20 +9,17 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.custom-callout {
|
||||
.marker {
|
||||
width: fit-content;
|
||||
padding: 12rpx 16rpx;
|
||||
display: flex;
|
||||
min-width: 300rpx;
|
||||
max-width: 400rpx;
|
||||
background: var(--theme-bg-card-secondary);
|
||||
background: var(--theme-bg-card);
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, .15);
|
||||
border-radius: 6rpx;
|
||||
flex-direction: column;
|
||||
|
||||
.location-item {
|
||||
.location {
|
||||
display: flex;
|
||||
padding: 6rpx 0;
|
||||
padding: 8rpx 16rpx 8rpx 8rpx;
|
||||
align-items: center;
|
||||
|
||||
.type {
|
||||
@ -37,6 +34,7 @@
|
||||
|
||||
.title {
|
||||
flex: 1;
|
||||
width: calc(var(--title-length) * 28rpx);
|
||||
color: var(--theme-text-primary, #333);
|
||||
overflow: hidden;
|
||||
font-size: 28rpx;
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
import { TravelLocationApi } from "../../../api/TravelLocationApi";
|
||||
import { TravelLocation, TravelLocationTypeLabel } from "../../../types/Travel";
|
||||
import Toolkit from "../../../utils/Toolkit";
|
||||
|
||||
interface MapMarker {
|
||||
id: number;
|
||||
@ -110,7 +111,8 @@ Page({
|
||||
height: 30,
|
||||
customCallout: {
|
||||
anchorY: -2,
|
||||
anchorX: 0,
|
||||
// 随机错位避免近距离重叠
|
||||
anchorX: Toolkit.random(-10, 10),
|
||||
display: "ALWAYS"
|
||||
},
|
||||
locations: locs
|
||||
|
||||
@ -13,16 +13,25 @@
|
||||
bindcallouttap="onCalloutTap"
|
||||
>
|
||||
<cover-view slot="callout">
|
||||
<block wx:for="{{markers}}" wx:key="id" wx:for-index="markerIndex">
|
||||
<cover-view class="custom-callout" marker-id="{{markerIndex}}">
|
||||
<block wx:for="{{item.locations}}" wx:key="id" wx:for-item="location">
|
||||
<cover-view class="location-item">
|
||||
<cover-view
|
||||
class="marker"
|
||||
wx:for="{{markers}}"
|
||||
wx:key="id"
|
||||
wx:for-item="marker"
|
||||
wx:for-index="markerIndex"
|
||||
marker-id="{{markerIndex}}"
|
||||
>
|
||||
<cover-view
|
||||
class="location"
|
||||
wx:for="{{marker.locations}}"
|
||||
wx:key="id"
|
||||
wx:for-item="location"
|
||||
style="{{'--title-length: ' + location.title.length}}"
|
||||
>
|
||||
<cover-view wx:if="{{location.typeLabel}}" class="type">{{location.typeLabel}}</cover-view>
|
||||
<cover-view class="title">{{location.title || '未命名地点'}}</cover-view>
|
||||
</cover-view>
|
||||
</block>
|
||||
</cover-view>
|
||||
</block>
|
||||
</cover-view>
|
||||
</map>
|
||||
<view wx:if="{{isLoading}}" class="loading">
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
import Time from "../../../utils/Time";
|
||||
import { TravelApi } from "../../../api/TravelApi";
|
||||
import { Travel, TravelPage, TravelStatus, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TransportationTypeIcon } from "../../../types/Travel";
|
||||
import { OrderType } from "../../../types/Model";
|
||||
|
||||
interface TravelData {
|
||||
/** 分页参数 */
|
||||
@ -35,10 +34,7 @@ Page({
|
||||
data: <TravelData>{
|
||||
page: {
|
||||
index: 0,
|
||||
size: 10,
|
||||
orderMap: {
|
||||
travelAt: OrderType.DESC
|
||||
}
|
||||
size: 10
|
||||
},
|
||||
list: [],
|
||||
currentStatus: "ALL",
|
||||
@ -79,9 +75,6 @@ Page({
|
||||
page: {
|
||||
index: 0,
|
||||
size: 10,
|
||||
orderMap: {
|
||||
travelAt: OrderType.DESC
|
||||
},
|
||||
equalsExample: this.data.currentStatus === "ALL" ? undefined : {
|
||||
status: this.data.currentStatus as TravelStatus
|
||||
}
|
||||
|
||||
@ -68,9 +68,9 @@ page {
|
||||
--theme-bg-wx: #111;
|
||||
--theme-bg-primary: #1A1A1A;
|
||||
--theme-bg-secondary: #2A2A2A;
|
||||
--theme-bg-card: #2C2C2C;
|
||||
--theme-bg-card-secondary: #404040;
|
||||
--theme-bg-journal: #404040;
|
||||
--theme-bg-card: #3D3D3D;
|
||||
--theme-bg-card-secondary: #525252;
|
||||
--theme-bg-journal: #4B4B4B;
|
||||
--theme-bg-overlay: rgba(0, 0, 0, .3);
|
||||
--theme-bg-menu: rgba(40, 40, 40, .95);
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ export enum TravelLocationType {
|
||||
ATTRACTION = "ATTRACTION",
|
||||
SHOPPING = "SHOPPING",
|
||||
PLAY = "PLAY",
|
||||
LIFE = "LEFE"
|
||||
LIFE = "LIFE"
|
||||
}
|
||||
|
||||
/** 地点类型中文映射 */
|
||||
@ -118,7 +118,7 @@ export const TravelLocationTypeIcon: Record<TravelLocationType, string> = {
|
||||
[TravelLocationType.ATTRACTION]: "image-1",
|
||||
[TravelLocationType.SHOPPING]: "shop",
|
||||
[TravelLocationType.PLAY]: "ferris-wheel",
|
||||
[TravelLocationType.LIFE]: "cart"
|
||||
[TravelLocationType.LIFE]: "location"
|
||||
};
|
||||
|
||||
/** 出行地点实体 */
|
||||
@ -154,10 +154,10 @@ export interface TravelLocation extends Model {
|
||||
requireAppointment?: boolean;
|
||||
|
||||
/** 评分 */
|
||||
score?: number;
|
||||
score?: number | null;
|
||||
|
||||
/** 重要程度 */
|
||||
importance?: number;
|
||||
importance?: number | null;
|
||||
|
||||
/** 附件 */
|
||||
items?: Attachment[];
|
||||
|
||||
Reference in New Issue
Block a user