diff --git a/App.vue b/App.vue
index 4e49130..28f9a35 100644
--- a/App.vue
+++ b/App.vue
@@ -60,7 +60,7 @@ export default {
console.log('小程序切前台/首次显示')
const token = getToken() || this.globalData.mqtt.token
if (token) {
- this.$tab.reLaunch('/pages/control/index')
+ this.$tab.reLaunch('/pages/index')
// 兜底检查:如果globalData里没有列表,但缓存里有,补充恢复
if (this.globalData.mqtt.subscribeList.length === 0) {
const savedSubscribeList = uni.getStorageSync('mqtt_subscribe_list')
diff --git a/pages.json b/pages.json
index f8a3869..92f8ccf 100644
--- a/pages.json
+++ b/pages.json
@@ -12,8 +12,17 @@
}, {
"path": "pages/index",
"style": {
- "navigationBarTitleText": "智能农业移动端框架",
- "navigationStyle": "custom"
+ "navigationBarTitleText": "首页"
+ }
+ },{
+ "path": "pages/data/index",
+ "style": {
+ "navigationBarTitleText": "数据中心"
+ }
+ }, {
+ "path": "pages/news/index",
+ "style": {
+ "navigationBarTitleText": "消息中心"
}
}, {
"path": "pages/work/index",
@@ -88,21 +97,27 @@
}],
"tabBar": {
"color": "#000000",
- "selectedColor": "#000000",
+ "selectedColor": "#406ee9",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [
{
- "pagePath": "pages/control/index",
- "iconPath": "static/images/tabbar/work.png",
- "selectedIconPath": "static/images/tabbar/work_.png",
- "text": "控制中心"
+ "pagePath": "pages/index",
+ "iconPath": "static/images/tabbar/home.png",
+ "selectedIconPath": "static/images/tabbar/home_.png",
+ "text": "首页"
},
{
- "pagePath": "pages/work/index",
- "iconPath": "static/images/tabbar/work.png",
- "selectedIconPath": "static/images/tabbar/work_.png",
- "text": "工作台"
+ "pagePath": "pages/data/index",
+ "iconPath": "static/images/tabbar/data.png",
+ "selectedIconPath": "static/images/tabbar/data_.png",
+ "text": "历史数据"
+ },
+ {
+ "pagePath": "pages/news/index",
+ "iconPath": "static/images/tabbar/news.png",
+ "selectedIconPath": "static/images/tabbar/news_.png",
+ "text": "消息中心"
},
{
"pagePath": "pages/mine/index",
diff --git a/pages/data/index.vue b/pages/data/index.vue
new file mode 100644
index 0000000..ecd7045
--- /dev/null
+++ b/pages/data/index.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+ 页面建设中~
+
+
+
+
+
diff --git a/pages/login.vue b/pages/login.vue
index 7dd16ad..0a455d5 100644
--- a/pages/login.vue
+++ b/pages/login.vue
@@ -113,7 +113,7 @@
onLoad() {
//#ifdef H5
if (getToken()) {
- this.$tab.reLaunch('/pages/control/index')
+ this.$tab.reLaunch('/pages/index')
}
//#endif
// ========== 新增:页面加载时自动回填密码 ==========
@@ -282,7 +282,7 @@
app.loginSuccess(token)
// ========== 原有逻辑保留 ==========
- this.$tab.reLaunch('/pages/control/index')
+ this.$tab.reLaunch('/pages/index')
})
}
}
diff --git a/pages/mine/setting/index.vue b/pages/mine/setting/index.vue
index 6c3be69..73a3ea7 100644
--- a/pages/mine/setting/index.vue
+++ b/pages/mine/setting/index.vue
@@ -56,7 +56,7 @@
// 2. 调用App.vue的logout方法(断开MQTT+清空订阅列表)
app.logout()
}).finally(()=>{
- this.$tab.reLaunch('/pages/control/index')
+ this.$tab.reLaunch('/pages/index')
})
})
}
diff --git a/pages/news/index.vue b/pages/news/index.vue
new file mode 100644
index 0000000..ddf0356
--- /dev/null
+++ b/pages/news/index.vue
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
+ {{ msg.preview }}
+
+
+ {{ msg.unreadCount }}
+
+
+
+
+ 加载中...
+
+
+
+
+
+
+ 暂无消息
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/static/alarm.png b/static/alarm.png
new file mode 100644
index 0000000..4b17190
Binary files /dev/null and b/static/alarm.png differ
diff --git a/static/cs.png b/static/cs.png
new file mode 100644
index 0000000..c43936d
Binary files /dev/null and b/static/cs.png differ
diff --git a/static/images/tabbar/data.png b/static/images/tabbar/data.png
new file mode 100644
index 0000000..20edc25
Binary files /dev/null and b/static/images/tabbar/data.png differ
diff --git a/static/images/tabbar/data_.png b/static/images/tabbar/data_.png
new file mode 100644
index 0000000..0584c01
Binary files /dev/null and b/static/images/tabbar/data_.png differ
diff --git a/static/images/tabbar/home.png b/static/images/tabbar/home.png
index 50acdfd..e9a2f5d 100644
Binary files a/static/images/tabbar/home.png and b/static/images/tabbar/home.png differ
diff --git a/static/images/tabbar/home_.png b/static/images/tabbar/home_.png
index a408f71..153bc15 100644
Binary files a/static/images/tabbar/home_.png and b/static/images/tabbar/home_.png differ
diff --git a/static/images/tabbar/mine.png b/static/images/tabbar/mine.png
index f13fe44..c78e47a 100644
Binary files a/static/images/tabbar/mine.png and b/static/images/tabbar/mine.png differ
diff --git a/static/images/tabbar/mine_.png b/static/images/tabbar/mine_.png
index 8a0a742..41e90c6 100644
Binary files a/static/images/tabbar/mine_.png and b/static/images/tabbar/mine_.png differ
diff --git a/static/images/tabbar/news.png b/static/images/tabbar/news.png
new file mode 100644
index 0000000..5d8af10
Binary files /dev/null and b/static/images/tabbar/news.png differ
diff --git a/static/images/tabbar/news_.png b/static/images/tabbar/news_.png
new file mode 100644
index 0000000..2c34dc0
Binary files /dev/null and b/static/images/tabbar/news_.png differ
diff --git a/static/news.png b/static/news.png
new file mode 100644
index 0000000..b8fdce2
Binary files /dev/null and b/static/news.png differ
diff --git a/static/消息中心 (2).png b/static/消息中心 (2).png
new file mode 100644
index 0000000..ca2d665
Binary files /dev/null and b/static/消息中心 (2).png differ
diff --git a/static/消息中心 (3).png b/static/消息中心 (3).png
new file mode 100644
index 0000000..ea60f26
Binary files /dev/null and b/static/消息中心 (3).png differ
diff --git a/static/消息中心 (4).png b/static/消息中心 (4).png
new file mode 100644
index 0000000..50ab78c
Binary files /dev/null and b/static/消息中心 (4).png differ