From efa9168a99be5b6b15ac88315f245ec5d7a43b27 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Tue, 17 Oct 2023 15:35:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=B8=9A=E4=B8=BB=E7=AB=AF=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=8F=B0=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/app.js | 2 +- weapp/app.json | 157 ++++++++++++++------------- weapp/pages/workbench/workbench.js | 70 ++++++++++++ weapp/pages/workbench/workbench.json | 3 + weapp/pages/workbench/workbench.wxml | 2 + weapp/pages/workbench/workbench.wxss | 1 + 6 files changed, 158 insertions(+), 77 deletions(-) create mode 100644 weapp/pages/workbench/workbench.js create mode 100644 weapp/pages/workbench/workbench.json create mode 100644 weapp/pages/workbench/workbench.wxml create mode 100644 weapp/pages/workbench/workbench.wxss diff --git a/weapp/app.js b/weapp/app.js index 395a29f..978d3eb 100644 --- a/weapp/app.js +++ b/weapp/app.js @@ -45,7 +45,7 @@ App({ "text": "首页" }, { - "pagePath": "/pages/overview/overview", + "pagePath": "/pages/workbench/workbench", "iconPath": "/images/tabBar/icon_menu.png", "selectedIconPath": "/images/tabBar/icon_menu_active.png", "text": "工作台" diff --git a/weapp/app.json b/weapp/app.json index db6e7c8..018206b 100644 --- a/weapp/app.json +++ b/weapp/app.json @@ -1,78 +1,83 @@ { - "pages": [ - "pages/index/index", - "pages/login/login", - "pages/myInfo/myInfo", - "pages/overview/overview", - "pages/home/home", - "custom-tab-bar/index" - ], - "subPackages": [ - { - "root": "package", - "pages": [ - "polling/polling", - "polling/inspectionRecordDetail/inspectionRecordDetail", - "basic/basic", - "startInspection/startInspection", - "inspectionInput/inspectionInput", - "troubleshooting/index", - "troubleshooting/shootingForm/index", - "inspectionReport/inspectionReport", - "pointsStatus/pointsStatus", - "pie/index", - "subSystem/subSystem" - ] - } - ], - "window": { - "backgroundTextStyle": "dark", - "navigationBarBackgroundColor": "#1979ff", - "navigationBarTextStyle": "white" - }, - "tabBar": { - "custom": true, - "color": "#000000", - "selectedColor": "#2F54FF", - "borderStyle": "black", - "backgroundColor": "#ffffff", - "list": [ - { - "pagePath": "pages/index/index", - "iconPath": "images/tabBar/icon_polling.png", - "selectedIconPath": "images/tabBar/icon_polling_active.png", - "text": "巡检总览" - }, - { - "pagePath": "pages/overview/overview", - "iconPath": "images/tabBar/icon_menu.png", - "selectedIconPath": "images/tabBar/icon_menu_active.png", - "text": "工作台" - }, - { - "pagePath": "pages/myInfo/myInfo", - "iconPath": "images/tabBar/icon_person.png", - "selectedIconPath": "images/tabBar/icon_person_active.png", - "text": "我的" - } - , - { - "pagePath": "pages/home/home", - "iconPath": "/images/tabBar/icon_home.png", - "selectedIconPath": "/images/tabBar/icon_home_active.png", - "text": "首页" - } - ] - }, - "permission": { - "scope.userLocation": { - "desc": "你的位置信息将用于小程序位置接口的效果展示" - } - }, - "requiredPrivateInfos": [ - "getLocation" - ], - "sitemapLocation": "sitemap.json", - "lazyCodeLoading": "requiredComponents", - "usingComponents": {} + "pages": [ + "pages/index/index", + "pages/login/login", + "pages/myInfo/myInfo", + "pages/overview/overview", + "pages/home/home", + "custom-tab-bar/index", + "pages/workbench/workbench" + ], + "subPackages": [ + { + "root": "package", + "pages": [ + "polling/polling", + "polling/inspectionRecordDetail/inspectionRecordDetail", + "basic/basic", + "startInspection/startInspection", + "inspectionInput/inspectionInput", + "troubleshooting/index", + "troubleshooting/shootingForm/index", + "inspectionReport/inspectionReport", + "pointsStatus/pointsStatus", + "subSystem/subSystem" + ] + } + ], + "window": { + "backgroundTextStyle": "dark", + "navigationBarBackgroundColor": "#1979ff", + "navigationBarTextStyle": "white" + }, + "tabBar": { + "custom": true, + "color": "#000000", + "selectedColor": "#2F54FF", + "borderStyle": "black", + "backgroundColor": "#ffffff", + "list": [ + { + "pagePath": "pages/index/index", + "iconPath": "images/tabBar/icon_polling.png", + "selectedIconPath": "images/tabBar/icon_polling_active.png", + "text": "巡检总览" + }, + { + "pagePath": "pages/overview/overview", + "iconPath": "images/tabBar/icon_menu.png", + "selectedIconPath": "images/tabBar/icon_menu_active.png", + "text": "工作台" + }, + { + "pagePath": "pages/myInfo/myInfo", + "iconPath": "images/tabBar/icon_person.png", + "selectedIconPath": "images/tabBar/icon_person_active.png", + "text": "我的" + }, + { + "pagePath": "pages/home/home", + "iconPath": "/images/tabBar/icon_home.png", + "selectedIconPath": "/images/tabBar/icon_home_active.png", + "text": "首页" + }, + { + "pagePath": "pages/workbench/workbench", + "iconPath": "images/tabBar/icon_menu.png", + "selectedIconPath": "images/tabBar/icon_menu_active.png", + "text": "工作台" + } + ] + }, + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于小程序位置接口的效果展示" + } + }, + "requiredPrivateInfos": [ + "getLocation" + ], + "sitemapLocation": "sitemap.json", + "lazyCodeLoading": "requiredComponents", + "usingComponents": {} } \ No newline at end of file diff --git a/weapp/pages/workbench/workbench.js b/weapp/pages/workbench/workbench.js new file mode 100644 index 0000000..e017ee9 --- /dev/null +++ b/weapp/pages/workbench/workbench.js @@ -0,0 +1,70 @@ +// pages/workbench/workbench.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + if (typeof this.getTabBar === 'function' && this.getTabBar()) { + this.getTabBar().setData({ + selected: 1 + }) + } + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/weapp/pages/workbench/workbench.json b/weapp/pages/workbench/workbench.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/weapp/pages/workbench/workbench.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/weapp/pages/workbench/workbench.wxml b/weapp/pages/workbench/workbench.wxml new file mode 100644 index 0000000..615d0ba --- /dev/null +++ b/weapp/pages/workbench/workbench.wxml @@ -0,0 +1,2 @@ + +pages/workbench/workbench.wxml \ No newline at end of file diff --git a/weapp/pages/workbench/workbench.wxss b/weapp/pages/workbench/workbench.wxss new file mode 100644 index 0000000..00cf49c --- /dev/null +++ b/weapp/pages/workbench/workbench.wxss @@ -0,0 +1 @@ +/* pages/workbench/workbench.wxss */ \ No newline at end of file