refactor pages struct
This commit is contained in:
@ -1,20 +1,21 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/main/journal/index",
|
||||
"pages/main/journal-search/index",
|
||||
"pages/main/journal-editor/index",
|
||||
"pages/main/journal-map/index",
|
||||
"pages/main/journal-date/index",
|
||||
"pages/main/portfolio/index",
|
||||
"pages/main/travel/index",
|
||||
"pages/main/travel-detail/index",
|
||||
"pages/main/travel-editor/index",
|
||||
"pages/main/travel-location-detail/index",
|
||||
"pages/main/travel-location-map/index",
|
||||
"pages/main/travel-location-editor/index",
|
||||
"pages/main/about/index",
|
||||
"pages/main/moment/index"
|
||||
"pages/main/tabs/journal/index",
|
||||
"pages/main/tabs/travel/index",
|
||||
"pages/main/tabs/moment/index",
|
||||
"pages/main/tabs/other/index",
|
||||
"pages/main/tabs/about/index",
|
||||
"pages/main/journal/search/index",
|
||||
"pages/main/journal/editor/index",
|
||||
"pages/main/journal/map/index",
|
||||
"pages/main/journal/date/index",
|
||||
"pages/main/other/portfolio/index",
|
||||
"pages/main/travel/detail/index",
|
||||
"pages/main/travel/editor/index",
|
||||
"pages/main/travel/location-detail/index",
|
||||
"pages/main/travel/location-map/index",
|
||||
"pages/main/travel/location-editor/index"
|
||||
],
|
||||
"darkmode": true,
|
||||
"themeLocation": "theme.json",
|
||||
@ -32,31 +33,31 @@
|
||||
"list": [
|
||||
{
|
||||
"text": "归档",
|
||||
"pagePath": "pages/main/journal/index",
|
||||
"pagePath": "pages/main/tabs/journal/index",
|
||||
"iconPath": "@tabBarIconJournal",
|
||||
"selectedIconPath": "@tabBarIconJournalActive"
|
||||
},
|
||||
{
|
||||
"text": "专拍",
|
||||
"pagePath": "pages/main/portfolio/index",
|
||||
"iconPath": "@tabBarIconPortfolio",
|
||||
"selectedIconPath": "@tabBarIconPortfolioActive"
|
||||
},
|
||||
{
|
||||
"text": "瞬间",
|
||||
"pagePath": "pages/main/moment/index",
|
||||
"iconPath": "@tabBarIconMoment",
|
||||
"selectedIconPath": "@tabBarIconMomentActive"
|
||||
},
|
||||
{
|
||||
"text": "出行",
|
||||
"pagePath": "pages/main/travel/index",
|
||||
"pagePath": "pages/main/tabs/travel/index",
|
||||
"iconPath": "@tabBarIconTravel",
|
||||
"selectedIconPath": "@tabBarIconTravelActive"
|
||||
},
|
||||
{
|
||||
"text": "瞬间",
|
||||
"pagePath": "pages/main/tabs/moment/index",
|
||||
"iconPath": "@tabBarIconMoment",
|
||||
"selectedIconPath": "@tabBarIconMomentActive"
|
||||
},
|
||||
{
|
||||
"text": "其他",
|
||||
"pagePath": "pages/main/tabs/other/index",
|
||||
"iconPath": "@tabBarIconOther",
|
||||
"selectedIconPath": "@tabBarIconOtherActive"
|
||||
},
|
||||
{
|
||||
"text": "关于",
|
||||
"pagePath": "pages/main/about/index",
|
||||
"pagePath": "pages/main/tabs/about/index",
|
||||
"iconPath": "@tabBarIconInfo",
|
||||
"selectedIconPath": "@tabBarIconInfoActive"
|
||||
}
|
||||
|
||||
BIN
miniprogram/assets/icon/dark/other.png
Normal file
BIN
miniprogram/assets/icon/dark/other.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
miniprogram/assets/icon/dark/other_active.png
Normal file
BIN
miniprogram/assets/icon/dark/other_active.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB |
BIN
miniprogram/assets/icon/light/other.png
Normal file
BIN
miniprogram/assets/icon/light/other.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
miniprogram/assets/icon/light/other_active.png
Normal file
BIN
miniprogram/assets/icon/light/other_active.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@ -20,7 +20,7 @@ Component({
|
||||
createSnowflake() {
|
||||
const snowflake = {
|
||||
x: Toolkit.random(0, this.data.docWidth),
|
||||
s: Toolkit.random(16, 64),
|
||||
s: Toolkit.random(16, 90),
|
||||
speed: Toolkit.random(14, 26)
|
||||
};
|
||||
this.setData({
|
||||
|
||||
@ -5,6 +5,6 @@
|
||||
wx:for="{{snowflakes}}"
|
||||
wx:key="index"
|
||||
style="left: {{item.x}}px; font-size: {{item.s}}rpx; animation-duration: {{item.speed}}s;"
|
||||
name="snowflake"
|
||||
name="plus"
|
||||
/>
|
||||
</view>
|
||||
|
||||
8
miniprogram/package-lock.json
generated
8
miniprogram/package-lock.json
generated
@ -9,7 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"tdesign-miniprogram": "^1.12.0"
|
||||
"tdesign-miniprogram": "^1.12.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"miniprogram-api-typings": "^4.1.0"
|
||||
@ -22,9 +22,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tdesign-miniprogram": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/tdesign-miniprogram/-/tdesign-miniprogram-1.12.0.tgz",
|
||||
"integrity": "sha512-Ft+B1HWMOKuOpM9+Z0mflprWrxSB/ESo6TVymjxJ6xzMgSfEcbmFaXpd0nJ+Oj/5GCljqP06ZTeWazuk1G6Ugg=="
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/tdesign-miniprogram/-/tdesign-miniprogram-1.12.2.tgz",
|
||||
"integrity": "sha512-ZpOdwonT26RRCK/FWbg9tR2lAJ54Hb4PAdyTWu8URWkbKOmSQhn0JCwCtWWRofKbyWCPsCn5NqljobaGh5VCMg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"tdesign-miniprogram": "^1.12.0"
|
||||
"tdesign-miniprogram": "^1.12.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"miniprogram-api-typings": "^4.1.0"
|
||||
|
||||
@ -27,7 +27,7 @@ Page({
|
||||
type: JournalPageType.PREVIEW
|
||||
});
|
||||
wx.switchTab({
|
||||
url: "/pages/main/journal/index",
|
||||
url: "/pages/main/tabs/journal/index",
|
||||
})
|
||||
} catch (error: any) {
|
||||
if (error?.code === 40100) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* pages/main/journal-date/index.less */
|
||||
/* pages/main/journal/date/index.less */
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
@ -1,7 +1,7 @@
|
||||
// pages/main/journal-date/index.ts
|
||||
import { Journal, JournalPageType } from "../../../types/Journal";
|
||||
import Time from "../../../utils/Time";
|
||||
import { JournalApi } from "../../../api/JournalApi";
|
||||
// pages/main/journal/date/index.ts
|
||||
import { Journal, JournalPageType } from "../../../../types/Journal";
|
||||
import Time from "../../../../utils/Time";
|
||||
import { JournalApi } from "../../../../api/JournalApi";
|
||||
|
||||
interface JournalDateData {
|
||||
// 存储每个日期的日记 id 列表
|
||||
@ -1,5 +1,5 @@
|
||||
<!--pages/main/journal-date/index.wxml-->
|
||||
<t-navbar title="日期查找" left-arrow />
|
||||
<!--pages/main/journal/date/index.wxml-->
|
||||
<t-navbar title="日期查找" placeholder left-arrow />
|
||||
<view class="container">
|
||||
<!-- 日历视图 -->
|
||||
<calendar journal-map="{{journalMap}}" bind:dateselect="onDateSelect" />
|
||||
@ -1,4 +1,4 @@
|
||||
/* pages/main/journal-editor/index.wxss */
|
||||
/* pages/main/journal/editor/index.wxss */
|
||||
.container {
|
||||
|
||||
.content {
|
||||
@ -1,13 +1,13 @@
|
||||
// pages/main/journal-editor/index.ts
|
||||
import Events from "../../../utils/Events";
|
||||
import Time from "../../../utils/Time";
|
||||
import Toolkit from "../../../utils/Toolkit";
|
||||
import config from "../../../config/index";
|
||||
import { Location, MediaItem, MediaItemType, WechatMediaItem } from "../../../types/UI";
|
||||
import { JournalType } from "../../../types/Journal";
|
||||
import { MediaAttachType, PreviewImageMetadata } from "../../../types/Attachment";
|
||||
import IOSize, { Unit } from "../../../utils/IOSize";
|
||||
import { JournalApi } from "../../../api/JournalApi";
|
||||
// pages/main/journal/editor/index.ts
|
||||
import Events from "../../../../utils/Events";
|
||||
import Time from "../../../../utils/Time";
|
||||
import Toolkit from "../../../../utils/Toolkit";
|
||||
import config from "../../../../config/index";
|
||||
import { Location, MediaItem, MediaItemType, WechatMediaItem } from "../../../../types/UI";
|
||||
import { JournalType } from "../../../../types/Journal";
|
||||
import { MediaAttachType, PreviewImageMetadata } from "../../../../types/Attachment";
|
||||
import IOSize, { Unit } from "../../../../utils/IOSize";
|
||||
import { JournalApi } from "../../../../api/JournalApi";
|
||||
|
||||
interface JournalEditorData {
|
||||
/** 模式:create 或 edit */
|
||||
@ -341,7 +341,7 @@ Page({
|
||||
cancel() {
|
||||
if (this.data.mode === "create") {
|
||||
wx.switchTab({
|
||||
url: "/pages/main/journal/index"
|
||||
url: "/pages/main/tabs/journal/index"
|
||||
});
|
||||
} else {
|
||||
wx.navigateBack();
|
||||
@ -459,7 +459,7 @@ Page({
|
||||
});
|
||||
await Toolkit.sleep(1000);
|
||||
wx.switchTab({
|
||||
url: "/pages/main/journal/index"
|
||||
url: "/pages/main/tabs/journal/index"
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("创建日记失败:", error);
|
||||
@ -1,5 +1,5 @@
|
||||
<!--pages/main/journal-editor/index.wxml-->
|
||||
<t-navbar title="{{mode === 'create' ? '新纪录' : '编辑记录'}}">
|
||||
<!--pages/main/journal/editor/index.wxml-->
|
||||
<t-navbar title="{{mode === 'create' ? '新纪录' : '编辑记录'}}" placeholder>
|
||||
<text slot="left" bindtap="cancel">取消</text>
|
||||
</t-navbar>
|
||||
<scroll-view
|
||||
@ -1,4 +1,4 @@
|
||||
/* pages/main/journal-map/index.less */
|
||||
/* pages/main/journal/map/index.less */
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
@ -1,10 +1,10 @@
|
||||
// pages/main/journal-map/index.ts
|
||||
import config from "../../../config/index";
|
||||
import Time from "../../../utils/Time";
|
||||
import { JournalPageType } from "../../../types/Journal";
|
||||
import Toolkit from "../../../utils/Toolkit";
|
||||
import { MapMarker } from "../../../types/UI";
|
||||
import { JournalApi } from "../../../api/JournalApi";
|
||||
// pages/main/journal/map/index.ts
|
||||
import config from "../../../../config/index";
|
||||
import Time from "../../../../utils/Time";
|
||||
import { JournalPageType } from "../../../../types/Journal";
|
||||
import Toolkit from "../../../../utils/Toolkit";
|
||||
import { MapMarker } from "../../../../types/UI";
|
||||
import { JournalApi } from "../../../../api/JournalApi";
|
||||
|
||||
interface LocationMarker {
|
||||
locationKey: string; // 位置键 "lat,lng"
|
||||
@ -1,5 +1,5 @@
|
||||
<!--pages/main/journal-map/index.wxml-->
|
||||
<t-navbar title="地图查找" left-arrow />
|
||||
<!--pages/main/journal/map/index.wxml-->
|
||||
<t-navbar title="地图查找" left-arrow placeholder />
|
||||
<view class="container">
|
||||
<map
|
||||
id="journal-map"
|
||||
@ -1,5 +1,5 @@
|
||||
// pages/main/journal-search/index.ts
|
||||
import Events from "../../../utils/Events";
|
||||
// pages/main/journal/search/index.ts
|
||||
import Events from "../../../../utils/Events";
|
||||
|
||||
Page({
|
||||
onLoad() {
|
||||
@ -13,7 +13,7 @@ Page({
|
||||
onNavigateItem(e: WechatMiniprogram.CustomEvent) {
|
||||
const { id } = e.detail;
|
||||
wx.navigateTo({
|
||||
url: `/pages/main/journal-editor/index?id=${id}`
|
||||
url: `/pages/main/journal/editor/index?id=${id}`
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
<view class="page-container">
|
||||
<view class="navbar">
|
||||
<t-navbar title="列表查找" left-arrow />
|
||||
<t-navbar title="列表查找" left-arrow placeholder />
|
||||
</view>
|
||||
<view class="content">
|
||||
<journal-list
|
||||
@ -1,4 +1,4 @@
|
||||
/* pages/main/portfolio/index.wxss */
|
||||
/* pages/main/other/portfolio/index.wxss */
|
||||
.portfolio-list {
|
||||
width: 100vw;
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
// pages/main/portfolio/index.ts
|
||||
// pages/main/other/portfolio/index.ts
|
||||
|
||||
import Time from "../../../utils/Time";
|
||||
import config from "../../../config/index"
|
||||
import Events from "../../../utils/Events";
|
||||
import Toolkit from "../../../utils/Toolkit";
|
||||
import { Journal, JournalPage, JournalPageType } from "../../../types/Journal";
|
||||
import { OrderType, } from "../../../types/Model";
|
||||
import { PreviewImageMetadata } from "../../../types/Attachment";
|
||||
import { MediaItem, MediaItemType } from "../../../types/UI";
|
||||
import { JournalApi } from "../../../api/JournalApi";
|
||||
import Time from "../../../../utils/Time";
|
||||
import config from "../../../../config/index"
|
||||
import Events from "../../../../utils/Events";
|
||||
import Toolkit from "../../../../utils/Toolkit";
|
||||
import { Journal, JournalPage, JournalPageType } from "../../../../types/Journal";
|
||||
import { OrderType, } from "../../../../types/Model";
|
||||
import { PreviewImageMetadata } from "../../../../types/Attachment";
|
||||
import { MediaItem, MediaItemType } from "../../../../types/UI";
|
||||
import { JournalApi } from "../../../../api/JournalApi";
|
||||
|
||||
interface IPortfolioData {
|
||||
page: JournalPage;
|
||||
@ -1,6 +1,6 @@
|
||||
<!--pages/main/portfolio/index.wxml-->
|
||||
<!--pages/main/other/portfolio/index.wxml-->
|
||||
<view class="custom-navbar">
|
||||
<t-navbar class="custom-navbar" title="专拍" />
|
||||
<t-navbar class="custom-navbar" title="专拍" left-arrow placeholder />
|
||||
</view>
|
||||
<view class="portfolio-list">
|
||||
<t-collapse class="collapse" expandMutex expandIcon>
|
||||
@ -4,6 +4,6 @@
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar",
|
||||
"snowflake": "../../../components/background/snowflake"
|
||||
"snowflake": "/components/background/snowflake"
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
// pages/info/info.ts
|
||||
|
||||
import Time from "../../../utils/Time";
|
||||
import config from "../../../config/index"
|
||||
import Time from "../../../../utils/Time";
|
||||
import config from "../../../../config/index"
|
||||
|
||||
interface IAboutData {
|
||||
timer?: number;
|
||||
@ -61,4 +61,4 @@ Page({
|
||||
"url": "/pages/index/index?from=info"
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -1,6 +1,6 @@
|
||||
<!--pages/info/info.wxml-->
|
||||
<snowflake />
|
||||
<t-navbar title="关于我们" />
|
||||
<t-navbar title="关于我们" placeholder />
|
||||
<scroll-view class="info" scroll-y>
|
||||
<view class="cotainer">
|
||||
<view class="header">
|
||||
@ -1,14 +1,14 @@
|
||||
// pages/journal/index.ts
|
||||
|
||||
import Time from "../../../utils/Time";
|
||||
import config from "../../../config/index"
|
||||
import Events from "../../../utils/Events";
|
||||
import Toolkit from "../../../utils/Toolkit";
|
||||
import { Journal, JournalPage, JournalPageType } from "../../../types/Journal";
|
||||
import { OrderType } from "../../../types/Model";
|
||||
import { PreviewImageMetadata } from "../../../types/Attachment";
|
||||
import { MediaItem, MediaItemType } from "../../../types/UI";
|
||||
import { JournalApi } from "../../../api/JournalApi";
|
||||
import Time from "../../../../utils/Time";
|
||||
import config from "../../../../config/index"
|
||||
import Events from "../../../../utils/Events";
|
||||
import Toolkit from "../../../../utils/Toolkit";
|
||||
import { Journal, JournalPage, JournalPageType } from "../../../../types/Journal";
|
||||
import { OrderType } from "../../../../types/Model";
|
||||
import { PreviewImageMetadata } from "../../../../types/Attachment";
|
||||
import { MediaItem, MediaItemType } from "../../../../types/UI";
|
||||
import { JournalApi } from "../../../../api/JournalApi";
|
||||
|
||||
interface JournalData {
|
||||
page: JournalPage;
|
||||
@ -126,22 +126,22 @@ Page({
|
||||
},
|
||||
toCreater() {
|
||||
wx.navigateTo({
|
||||
"url": "/pages/main/journal-editor/index?from=journal"
|
||||
url: "/pages/main/journal/editor/index?from=journal"
|
||||
})
|
||||
},
|
||||
toSearch() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/main/journal-search/index"
|
||||
url: "/pages/main/journal/search/index"
|
||||
})
|
||||
},
|
||||
toMap() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/main/journal-map/index"
|
||||
url: "/pages/main/journal/map/index"
|
||||
})
|
||||
},
|
||||
toDate() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/main/journal-date/index"
|
||||
url: "/pages/main/journal/date/index"
|
||||
})
|
||||
},
|
||||
async fetch() {
|
||||
@ -1,5 +1,5 @@
|
||||
<view class="custom-navbar">
|
||||
<t-navbar title="我们的记录">
|
||||
<t-navbar title="我们的记录" placeholder>
|
||||
<view slot="left" class="more" bind:tap="toggleMoreMenu">
|
||||
<t-icon name="view-list" size="24px" />
|
||||
</view>
|
||||
@ -7,7 +7,7 @@
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
|
||||
"t-cell-group": "tdesign-miniprogram/cell-group/cell-group",
|
||||
"journal-list": "../../../components/journal-list/index",
|
||||
"journal-list": "/components/journal-list/index",
|
||||
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group"
|
||||
},
|
||||
"styleIsolation": "shared"
|
||||
@ -1,14 +1,14 @@
|
||||
// pages/main/moment/index.ts
|
||||
import config from "../../../config/index";
|
||||
import Events from "../../../utils/Events";
|
||||
import IOSize, { Unit } from "../../../utils/IOSize";
|
||||
import Time from "../../../utils/Time";
|
||||
import Toolkit from "../../../utils/Toolkit";
|
||||
import { Location, MediaItemType } from "../../../types/UI";
|
||||
import { PreviewImageMetadata } from "../../../types/Attachment";
|
||||
import { MomentApi } from "../../../api/MomentApi";
|
||||
import { JournalApi } from "../../../api/JournalApi";
|
||||
import { Network } from "../../../utils/Network";
|
||||
import config from "../../../../config/index";
|
||||
import Events from "../../../../utils/Events";
|
||||
import IOSize, { Unit } from "../../../../utils/IOSize";
|
||||
import Time from "../../../../utils/Time";
|
||||
import Toolkit from "../../../../utils/Toolkit";
|
||||
import { Location, MediaItemType } from "../../../../types/UI";
|
||||
import { PreviewImageMetadata } from "../../../../types/Attachment";
|
||||
import { MomentApi } from "../../../../api/MomentApi";
|
||||
import { JournalApi } from "../../../../api/JournalApi";
|
||||
import { Network } from "../../../../utils/Network";
|
||||
|
||||
type Item = {
|
||||
id: number;
|
||||
@ -459,4 +459,4 @@ Page({
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -1,6 +1,6 @@
|
||||
<!--pages/main/moment/index.wxml-->
|
||||
<view class="custom-navbar">
|
||||
<t-navbar class="custom-navbar" title="瞬间" />
|
||||
<t-navbar class="custom-navbar" title="瞬间" placeholder />
|
||||
</view>
|
||||
<view class="moment">
|
||||
<view class="tips">
|
||||
7
miniprogram/pages/main/tabs/other/index.json
Normal file
7
miniprogram/pages/main/tabs/other/index.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-navbar": "tdesign-miniprogram/navbar/navbar",
|
||||
"t-cell": "tdesign-miniprogram/cell/cell",
|
||||
"t-cell-group": "tdesign-miniprogram/cell-group/cell-group"
|
||||
}
|
||||
}
|
||||
0
miniprogram/pages/main/tabs/other/index.less
Normal file
0
miniprogram/pages/main/tabs/other/index.less
Normal file
33
miniprogram/pages/main/tabs/other/index.ts
Normal file
33
miniprogram/pages/main/tabs/other/index.ts
Normal file
@ -0,0 +1,33 @@
|
||||
type NavItem = {
|
||||
title: string;
|
||||
icon: string;
|
||||
url: string;
|
||||
};
|
||||
|
||||
interface OtherData {
|
||||
navList: NavItem[];
|
||||
}
|
||||
|
||||
Page({
|
||||
data: <OtherData>{
|
||||
navList: [
|
||||
{
|
||||
title: "备忘录",
|
||||
icon: "task-checked",
|
||||
url: "/pages/main/other/portfolio/index"
|
||||
},
|
||||
{
|
||||
title: "专拍",
|
||||
icon: "face-retouching",
|
||||
url: "/pages/main/other/portfolio/index"
|
||||
}
|
||||
],
|
||||
},
|
||||
onNavTap(e: WechatMiniprogram.BaseEvent) {
|
||||
const { url } = e.currentTarget.dataset as { url?: string };
|
||||
if (!url) {
|
||||
return;
|
||||
}
|
||||
wx.navigateTo({ url });
|
||||
}
|
||||
});
|
||||
17
miniprogram/pages/main/tabs/other/index.wxml
Normal file
17
miniprogram/pages/main/tabs/other/index.wxml
Normal file
@ -0,0 +1,17 @@
|
||||
<view class="custom-navbar">
|
||||
<t-navbar title="其他" placeholder />
|
||||
</view>
|
||||
<view class="setting-bg">
|
||||
<t-cell-group class="list">
|
||||
<t-cell
|
||||
wx:for="{{navList}}"
|
||||
wx:for-item="item"
|
||||
wx:key="title"
|
||||
title="{{item.title}}"
|
||||
leftIcon="{{item.icon}}"
|
||||
arrow
|
||||
bind:tap="onNavTap"
|
||||
data-url="{{item.url}}"
|
||||
/>
|
||||
</t-cell-group>
|
||||
</view>
|
||||
@ -1,8 +1,8 @@
|
||||
// pages/main/travel/index.ts
|
||||
|
||||
import Time from "../../../utils/Time";
|
||||
import { TravelApi } from "../../../api/TravelApi";
|
||||
import { Travel, TravelPage, TravelStatus, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TransportationTypeIcon } from "../../../types/Travel";
|
||||
import Time from "../../../../utils/Time";
|
||||
import { TravelApi } from "../../../../api/TravelApi";
|
||||
import { Travel, TravelPage, TravelStatus, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TransportationTypeIcon } from "../../../../types/Travel";
|
||||
|
||||
interface TravelData {
|
||||
/** 分页参数 */
|
||||
@ -163,14 +163,14 @@ Page({
|
||||
/** 新建出行 */
|
||||
toCreate() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/main/travel-editor/index"
|
||||
url: "/pages/main/travel/editor/index"
|
||||
});
|
||||
},
|
||||
/** 查看详情 */
|
||||
toDetail(e: WechatMiniprogram.BaseEvent) {
|
||||
const { id } = e.currentTarget.dataset;
|
||||
wx.navigateTo({
|
||||
url: `/pages/main/travel-detail/index?id=${id}`
|
||||
url: `/pages/main/travel/detail/index?id=${id}`
|
||||
});
|
||||
},
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
<!--pages/main/travel/index.wxml-->
|
||||
<view class="custom-navbar">
|
||||
<t-navbar title="出行计划">
|
||||
<t-navbar title="出行计划" placeholder>
|
||||
<view slot="left" class="filter-btn" bind:tap="toggleFilterMenu">
|
||||
<t-icon name="filter" size="24px" />
|
||||
</view>
|
||||
@ -1,4 +1,4 @@
|
||||
// pages/main/travel-detail/index.less
|
||||
// pages/main/travel/detail/index.less
|
||||
|
||||
.travel-detail {
|
||||
width: 100vw;
|
||||
@ -1,10 +1,10 @@
|
||||
// pages/main/travel-detail/index.ts
|
||||
// pages/main/travel/detail/index.ts
|
||||
|
||||
import Time from "../../../utils/Time";
|
||||
import { TravelApi } from "../../../api/TravelApi";
|
||||
import { TravelLocationApi } from "../../../api/TravelLocationApi";
|
||||
import config from "../../../config/index";
|
||||
import { Travel, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TravelLocation, TravelLocationTypeLabel, TravelLocationTypeIcon, TransportationTypeIcon, TravelLocationType } from "../../../types/Travel";
|
||||
import Time from "../../../../utils/Time";
|
||||
import { TravelApi } from "../../../../api/TravelApi";
|
||||
import { TravelLocationApi } from "../../../../api/TravelLocationApi";
|
||||
import config from "../../../../config/index";
|
||||
import { Travel, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TravelLocation, TravelLocationTypeLabel, TravelLocationTypeIcon, TransportationTypeIcon, TravelLocationType } from "../../../../types/Travel";
|
||||
|
||||
interface TravelLocationView extends TravelLocation {
|
||||
/** 预览图 */
|
||||
@ -174,7 +174,7 @@ Page({
|
||||
const { travel } = this.data;
|
||||
if (travel && travel.id) {
|
||||
wx.navigateTo({
|
||||
url: `/pages/main/travel-editor/index?id=${travel.id}`
|
||||
url: `/pages/main/travel/editor/index?id=${travel.id}`
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -184,7 +184,7 @@ Page({
|
||||
const { travel } = this.data;
|
||||
if (travel && travel.id) {
|
||||
wx.navigateTo({
|
||||
url: `/pages/main/travel-location-editor/index?travelId=${travel.id}`
|
||||
url: `/pages/main/travel/location-editor/index?travelId=${travel.id}`
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -195,7 +195,7 @@ Page({
|
||||
const { travel } = this.data;
|
||||
if (id && travel && travel.id) {
|
||||
wx.navigateTo({
|
||||
url: `/pages/main/travel-location-detail/index?id=${id}&travelId=${travel.id}`
|
||||
url: `/pages/main/travel/location-detail/index?id=${id}&travelId=${travel.id}`
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -205,7 +205,7 @@ Page({
|
||||
const { travel } = this.data;
|
||||
if (travel && travel.id) {
|
||||
wx.navigateTo({
|
||||
url: `/pages/main/travel-location-map/index?travelId=${travel.id}`
|
||||
url: `/pages/main/travel/location-map/index?travelId=${travel.id}`
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -1,6 +1,6 @@
|
||||
<!--pages/main/travel-detail/index.wxml-->
|
||||
<!--pages/main/travel/detail/index.wxml-->
|
||||
<view class="custom-navbar">
|
||||
<t-navbar title="出行详情" leftArrow bind:go-back="goBack">
|
||||
<t-navbar title="出行详情" leftArrow placeholder bind:go-back="goBack">
|
||||
<view slot="right" class="edit-btn" bind:tap="toEdit">
|
||||
<t-icon name="edit" size="24px" />
|
||||
</view>
|
||||
@ -1,4 +1,4 @@
|
||||
// pages/main/travel-editor/index.less
|
||||
// pages/main/travel/editor/index.less
|
||||
|
||||
.travel-editor {
|
||||
width: 100vw;
|
||||
@ -1,8 +1,8 @@
|
||||
// pages/main/travel-editor/index.ts
|
||||
// pages/main/travel/editor/index.ts
|
||||
|
||||
import Time from "../../../utils/Time";
|
||||
import { TravelApi } from "../../../api/TravelApi";
|
||||
import { TravelStatus, TransportationType } from "../../../types/Travel";
|
||||
import Time from "../../../../utils/Time";
|
||||
import { TravelApi } from "../../../../api/TravelApi";
|
||||
import { TravelStatus, TransportationType } from "../../../../types/Travel";
|
||||
|
||||
interface TravelEditorData {
|
||||
/** 模式:create 或 edit */
|
||||
@ -1,5 +1,5 @@
|
||||
<!--pages/main/travel-editor/index.wxml-->
|
||||
<t-navbar title="{{mode === 'create' ? '新建出行' : '编辑出行'}}">
|
||||
<!--pages/main/travel/editor/index.wxml-->
|
||||
<t-navbar title="{{mode === 'create' ? '新建出行' : '编辑出行'}}" placeholder>
|
||||
<text slot="left" bindtap="cancel">取消</text>
|
||||
</t-navbar>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// pages/main/travel-location-detail/index.less
|
||||
// pages/main/travel/location-detail/index.less
|
||||
.travel-location-detail {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
@ -1,11 +1,11 @@
|
||||
// pages/main/travel-location-detail/index.ts
|
||||
// pages/main/travel/location-detail/index.ts
|
||||
|
||||
import config from "../../../config/index";
|
||||
import { TravelLocationApi } from "../../../api/TravelLocationApi";
|
||||
import { TravelLocation, TravelLocationTypeIcon, TravelLocationTypeLabel } from "../../../types/Travel";
|
||||
import { MediaAttachType, PreviewImageMetadata } from "../../../types/Attachment";
|
||||
import { MapMarker, MediaItem, MediaItemType } from "../../../types/UI";
|
||||
import Toolkit from "../../../utils/Toolkit";
|
||||
import config from "../../../../config/index";
|
||||
import { TravelLocationApi } from "../../../../api/TravelLocationApi";
|
||||
import { TravelLocation, TravelLocationTypeIcon, TravelLocationTypeLabel } from "../../../../types/Travel";
|
||||
import { MediaAttachType, PreviewImageMetadata } from "../../../../types/Attachment";
|
||||
import { MapMarker, MediaItem, MediaItemType } from "../../../../types/UI";
|
||||
import Toolkit from "../../../../utils/Toolkit";
|
||||
|
||||
interface TravelLocationView extends TravelLocation {
|
||||
/** 媒体列表 */
|
||||
@ -161,7 +161,7 @@ Page({
|
||||
const { location, travelId } = this.data;
|
||||
if (location && location.id) {
|
||||
wx.navigateTo({
|
||||
url: `/pages/main/travel-location-editor/index?id=${location.id}&travelId=${travelId || location.travelId || ""}`
|
||||
url: `/pages/main/travel/location-editor/index?id=${location.id}&travelId=${travelId || location.travelId || ""}`
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -1,6 +1,6 @@
|
||||
<!--pages/main/travel-location-detail/index.wxml-->
|
||||
<!--pages/main/travel/location-detail/index.wxml-->
|
||||
<view class="custom-navbar">
|
||||
<t-navbar title="地点详情" leftArrow bind:go-back="goBack">
|
||||
<t-navbar title="地点详情" leftArrow placeholder bind:go-back="goBack">
|
||||
<view slot="right" class="edit-btn" bind:tap="toEdit">
|
||||
<t-icon name="edit" size="24px" />
|
||||
</view>
|
||||
@ -1,4 +1,4 @@
|
||||
// pages/main/travel-location-editor/index.less
|
||||
// pages/main/travel/location-editor/index.less
|
||||
|
||||
.travel-location-editor {
|
||||
width: 100vw;
|
||||
@ -1,11 +1,11 @@
|
||||
// pages/main/travel-location-editor/index.ts
|
||||
// pages/main/travel/location-editor/index.ts
|
||||
|
||||
import { Network, WechatMediaItem } from "../../../utils/Network";
|
||||
import { TravelLocationApi } from "../../../api/TravelLocationApi";
|
||||
import { TravelLocationType, TravelLocationTypeLabel } from "../../../types/Travel";
|
||||
import { MediaAttachType, PreviewImageMetadata } from "../../../types/Attachment";
|
||||
import config from "../../../config/index";
|
||||
import { MediaItem, MediaItemType } from "../../../types/UI";
|
||||
import { Network, WechatMediaItem } from "../../../../utils/Network";
|
||||
import { TravelLocationApi } from "../../../../api/TravelLocationApi";
|
||||
import { TravelLocationType, TravelLocationTypeLabel } from "../../../../types/Travel";
|
||||
import { MediaAttachType, PreviewImageMetadata } from "../../../../types/Attachment";
|
||||
import config from "../../../../config/index";
|
||||
import { MediaItem, MediaItemType } from "../../../../types/UI";
|
||||
|
||||
interface TravelLocationEditorData {
|
||||
/** 模式:create 或 edit */
|
||||
@ -1,5 +1,5 @@
|
||||
<!--pages/main/travel-location-editor/index.wxml-->
|
||||
<t-navbar title="{{mode === 'create' ? '添加地点' : '编辑地点'}}">
|
||||
<!--pages/main/travel/location-editor/index.wxml-->
|
||||
<t-navbar title="{{mode === 'create' ? '添加地点' : '编辑地点'}}" placeholder>
|
||||
<text slot="left" bindtap="cancel">取消</text>
|
||||
</t-navbar>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* pages/main/travel-location-map/index.less */
|
||||
/* pages/main/travel/location-map/index.less */
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
@ -1,8 +1,8 @@
|
||||
// pages/main/travel-location-map/index.ts
|
||||
// pages/main/travel/location-map/index.ts
|
||||
|
||||
import { TravelLocationApi } from "../../../api/TravelLocationApi";
|
||||
import { TravelLocation, TravelLocationTypeLabel } from "../../../types/Travel";
|
||||
import Toolkit from "../../../utils/Toolkit";
|
||||
import { TravelLocationApi } from "../../../../api/TravelLocationApi";
|
||||
import { TravelLocation, TravelLocationTypeLabel } from "../../../../types/Travel";
|
||||
import Toolkit from "../../../../utils/Toolkit";
|
||||
|
||||
interface MapMarker {
|
||||
id: number;
|
||||
@ -1,5 +1,5 @@
|
||||
<!--pages/main/travel-location-map/index.wxml-->
|
||||
<t-navbar title="地点地图" left-arrow />
|
||||
<!--pages/main/travel/location-map/index.wxml-->
|
||||
<t-navbar title="地点地图" left-arrow placeholder />
|
||||
<view class="container">
|
||||
<map
|
||||
id="travel-location-map"
|
||||
@ -12,12 +12,12 @@
|
||||
"tabBarBorderStyle": "white",
|
||||
"tabBarIconJournal": "assets/icon/light/journal.png",
|
||||
"tabBarIconJournalActive": "assets/icon/light/journal_active.png",
|
||||
"tabBarIconPortfolio": "assets/icon/light/portfolio.png",
|
||||
"tabBarIconPortfolioActive": "assets/icon/light/portfolio_active.png",
|
||||
"tabBarIconMoment": "assets/icon/light/moment.png",
|
||||
"tabBarIconMomentActive": "assets/icon/light/moment_active.png",
|
||||
"tabBarIconTravel": "assets/icon/light/travel.png",
|
||||
"tabBarIconTravelActive": "assets/icon/light/travel_active.png",
|
||||
"tabBarIconOther": "assets/icon/light/other.png",
|
||||
"tabBarIconOtherActive": "assets/icon/light/other_active.png",
|
||||
"tabBarIconInfo": "assets/icon/light/info.png",
|
||||
"tabBarIconInfoActive": "assets/icon/light/info_active.png"
|
||||
},
|
||||
@ -34,12 +34,12 @@
|
||||
"tabBarBorderStyle": "black",
|
||||
"tabBarIconJournal": "assets/icon/dark/journal.png",
|
||||
"tabBarIconJournalActive": "assets/icon/dark/journal_active.png",
|
||||
"tabBarIconPortfolio": "assets/icon/dark/portfolio.png",
|
||||
"tabBarIconPortfolioActive": "assets/icon/dark/portfolio_active.png",
|
||||
"tabBarIconMoment": "assets/icon/dark/moment.png",
|
||||
"tabBarIconMomentActive": "assets/icon/dark/moment_active.png",
|
||||
"tabBarIconTravel": "assets/icon/dark/travel.png",
|
||||
"tabBarIconTravelActive": "assets/icon/dark/travel_active.png",
|
||||
"tabBarIconOther": "assets/icon/dark/other.png",
|
||||
"tabBarIconOtherActive": "assets/icon/dark/other_active.png",
|
||||
"tabBarIconInfo": "assets/icon/dark/info.png",
|
||||
"tabBarIconInfoActive": "assets/icon/dark/info_active.png"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user