diff --git a/src/pages.json b/src/pages.json
index 74b2adca..f4f72671 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -33,13 +33,29 @@
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
- },
+ }
+ ],
+ "subPackages": [
{
- "path": "pages/detail/detail",
- "style": {
- "navigationBarTitleText": "详情",
- "navigationStyle": "custom"
- }
+ "root": "pages/home",
+ "pages": [
+ {
+ "path": "address-change",
+ "style": {
+ "navigationBarTitleText": "城市",
+ "navigationStyle": "default",
+ "navigationBarBackgroundColor": "#222222",
+ "navigationBarTextStyle": "white"
+ }
+ },
+ {
+ "path": "detail",
+ "style": {
+ "navigationBarTitleText": "详情",
+ "navigationStyle": "custom"
+ }
+ }
+ ]
}
],
"globalStyle": {
diff --git a/src/pages/home/address-change.vue b/src/pages/home/address-change.vue
new file mode 100644
index 00000000..41879727
--- /dev/null
+++ b/src/pages/home/address-change.vue
@@ -0,0 +1,5 @@
+1
+
+
+
+
diff --git a/src/pages/detail/detail.vue b/src/pages/home/detail.vue
similarity index 87%
rename from src/pages/detail/detail.vue
rename to src/pages/home/detail.vue
index 083e5b33..b80eca91 100644
--- a/src/pages/detail/detail.vue
+++ b/src/pages/home/detail.vue
@@ -15,7 +15,18 @@
-
+
@@ -54,13 +65,28 @@
- {{ index }}
+ {{ index }}
+
+
diff --git a/src/pages/home/home.vue b/src/pages/home/home.vue
index 3b2c736f..ad4c1540 100644
--- a/src/pages/home/home.vue
+++ b/src/pages/home/home.vue
@@ -14,9 +14,9 @@
-
+
- 金华市
+ {{}}
@@ -32,7 +32,6 @@
@refresherrefresh="onRefresherRefresh"
@refresherabort="onRefresherAbort"
@scrolltolower="onScrollToLower"
- @scroll="onScroll"
>
@@ -78,13 +77,15 @@ const {
const current = ref(0);
const segmentedItems = ["广场", "最近", "新人"];
-const onScroll = (e: any) => {
- // console.log('滚动:', e.detail);
+const selectAddress = () => {
+ uni.navigateTo({
+ url: "/pages/home/address-change",
+ });
};
const detail = () => {
uni.navigateTo({
- url: "/pages/detail/detail",
+ url: "/pages/home/detail",
});
};
diff --git a/src/pages/messages/messages.vue b/src/pages/messages/messages.vue
index dab221bd..7facb97d 100644
--- a/src/pages/messages/messages.vue
+++ b/src/pages/messages/messages.vue
@@ -12,7 +12,7 @@
-
+
@@ -43,104 +43,7 @@ interface Message {
unread: number;
}
-const messageList = ref([
- {
- id: 1,
- username: "晨晨",
- avatar: "/static/avatar1.jpg",
- lastMessage: "你好,很高兴认识你!",
- time: "10:30",
- unread: 2,
- },
- {
- id: 2,
- username: "艾伯特",
- avatar: "/static/avatar2.jpg",
- lastMessage: "今天天气不错呢",
- time: "09:15",
- unread: 0,
- },
- {
- id: 3,
- username: "粒儿云",
- avatar: "/static/avatar3.jpg",
- lastMessage: "晚上一起吃饭吗?",
- time: "昨天",
- unread: 1,
- },
- {
- id: 4,
- username: "蓝天",
- avatar: "/static/avatar4.jpg",
- lastMessage: "周末有什么安排?",
- time: "昨天",
- unread: 0,
- },
- {
- id: 1,
- username: "晨晨",
- avatar: "/static/avatar1.jpg",
- lastMessage: "你好,很高兴认识你!",
- time: "10:30",
- unread: 2,
- },
- {
- id: 2,
- username: "艾伯特",
- avatar: "/static/avatar2.jpg",
- lastMessage: "今天天气不错呢",
- time: "09:15",
- unread: 0,
- },
- {
- id: 3,
- username: "粒儿云",
- avatar: "/static/avatar3.jpg",
- lastMessage: "晚上一起吃饭吗?",
- time: "昨天",
- unread: 1,
- },
- {
- id: 4,
- username: "蓝天",
- avatar: "/static/avatar4.jpg",
- lastMessage: "周末有什么安排?",
- time: "昨天",
- unread: 0,
- },
- {
- id: 1,
- username: "晨晨",
- avatar: "/static/avatar1.jpg",
- lastMessage: "你好,很高兴认识你!",
- time: "10:30",
- unread: 2,
- },
- {
- id: 2,
- username: "艾伯特",
- avatar: "/static/avatar2.jpg",
- lastMessage: "今天天气不错呢",
- time: "09:15",
- unread: 0,
- },
- {
- id: 3,
- username: "粒儿云",
- avatar: "/static/avatar3.jpg",
- lastMessage: "晚上一起吃饭吗?",
- time: "昨天",
- unread: 1,
- },
- {
- id: 4,
- username: "蓝天",
- avatar: "/static/avatar4.jpg",
- lastMessage: "周末有什么安排?",
- time: "昨天",
- unread: 0,
- },
-]);
+const messageList = ref();
const unreadCount = computed(() => {
return messageList.value.reduce((total, message) => total + message.unread, 0);
diff --git a/src/pages/moments/moments.vue b/src/pages/moments/moments.vue
index 1abb1527..6db86741 100644
--- a/src/pages/moments/moments.vue
+++ b/src/pages/moments/moments.vue
@@ -1,251 +1,83 @@
-
-
diff --git a/src/pages/profile/profile.vue b/src/pages/profile/profile.vue
index 23cd9d32..bb534ce9 100644
--- a/src/pages/profile/profile.vue
+++ b/src/pages/profile/profile.vue
@@ -23,7 +23,7 @@
@@ -55,36 +55,12 @@ const userInfo = ref({
});
const menuList = ref