From 6843e3d25623edf6ca812449fd6b8b38dba084eb Mon Sep 17 00:00:00 2001 From: lifengge <1058105477@qq.com> Date: Sat, 9 May 2020 09:43:37 +0800 Subject: [PATCH] 增加首页、执行、我的页面 --- app.js | 39 +++++++++++++++++++++++++++++++++++++++ app.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ app.wxss | 12 ++++++++++++ custom-tab-bar/index.js | 35 +++++++++++++++++++++++++++++++++++ custom-tab-bar/index.json | 3 +++ custom-tab-bar/index.wxml | 8 ++++++++ custom-tab-bar/index.wxss | 39 +++++++++++++++++++++++++++++++++++++++ images/banner1.png | Bin 0 -> 55615 bytes images/counticon1.png | Bin 0 -> 4678 bytes images/counticon2.png | Bin 0 -> 4287 bytes images/counticon3.png | Bin 0 -> 4304 bytes images/headimg.png | Bin 0 -> 2463 bytes images/home.png | Bin 0 -> 2678 bytes images/home_on.png | Bin 0 -> 3510 bytes images/menuicon1.png | Bin 0 -> 56714 bytes images/menuicon2.png | Bin 0 -> 56352 bytes images/menuicon3.png | Bin 0 -> 51288 bytes images/mine.png | Bin 0 -> 2610 bytes images/mine_on.png | Bin 0 -> 3480 bytes images/minebg.png | Bin 0 -> 67878 bytes images/mineicon1.png | Bin 0 -> 2035 bytes images/mineicon2.png | Bin 0 -> 2509 bytes images/mineicon3.png | Bin 0 -> 2361 bytes images/mineicon4.png | Bin 0 -> 1963 bytes images/more.png | Bin 0 -> 343 bytes images/tabicon1.png | Bin 0 -> 6797 bytes images/tabicon2.png | Bin 0 -> 6450 bytes images/tabicon3.png | Bin 0 -> 6727 bytes images/tipsicon.png | Bin 0 -> 13493 bytes images/work.png | Bin 0 -> 3226 bytes images/work_on.png | Bin 0 -> 4135 bytes pages/index/index.js | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/index/index.json | 4 ++++ pages/index/index.wxml | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/index/index.wxss | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/logs/logs.js | 15 +++++++++++++++ pages/logs/logs.json | 4 ++++ pages/logs/logs.wxml | 6 ++++++ pages/logs/logs.wxss | 8 ++++++++ pages/mine/mine.js | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/mine/mine.json | 4 ++++ pages/mine/mine.wxml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/mine/mine.wxss | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/work/work.js | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/work/work.json | 4 ++++ pages/work/work.wxml | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/work/work.wxss | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ project.config.json | 46 ++++++++++++++++++++++++++++++++++++++++++++++ sitemap.json | 7 +++++++ utils/util.js | 19 +++++++++++++++++++ 50 files changed, 1090 insertions(+), 0 deletions(-) create mode 100644 app.js create mode 100644 app.json create mode 100644 app.wxss create mode 100644 custom-tab-bar/index.js create mode 100644 custom-tab-bar/index.json create mode 100644 custom-tab-bar/index.wxml create mode 100644 custom-tab-bar/index.wxss create mode 100644 images/banner1.png create mode 100644 images/counticon1.png create mode 100644 images/counticon2.png create mode 100644 images/counticon3.png create mode 100644 images/headimg.png create mode 100644 images/home.png create mode 100644 images/home_on.png create mode 100644 images/menuicon1.png create mode 100644 images/menuicon2.png create mode 100644 images/menuicon3.png create mode 100644 images/mine.png create mode 100644 images/mine_on.png create mode 100644 images/minebg.png create mode 100644 images/mineicon1.png create mode 100644 images/mineicon2.png create mode 100644 images/mineicon3.png create mode 100644 images/mineicon4.png create mode 100644 images/more.png create mode 100644 images/tabicon1.png create mode 100644 images/tabicon2.png create mode 100644 images/tabicon3.png create mode 100644 images/tipsicon.png create mode 100644 images/work.png create mode 100644 images/work_on.png create mode 100644 pages/index/index.js create mode 100644 pages/index/index.json create mode 100644 pages/index/index.wxml create mode 100644 pages/index/index.wxss create mode 100644 pages/logs/logs.js create mode 100644 pages/logs/logs.json create mode 100644 pages/logs/logs.wxml create mode 100644 pages/logs/logs.wxss create mode 100644 pages/mine/mine.js create mode 100644 pages/mine/mine.json create mode 100644 pages/mine/mine.wxml create mode 100644 pages/mine/mine.wxss create mode 100644 pages/work/work.js create mode 100644 pages/work/work.json create mode 100644 pages/work/work.wxml create mode 100644 pages/work/work.wxss create mode 100644 project.config.json create mode 100644 sitemap.json create mode 100644 utils/util.js diff --git a/app.js b/app.js new file mode 100644 index 0000000..b545190 --- /dev/null +++ b/app.js @@ -0,0 +1,39 @@ +//app.js +App({ + onLaunch: function () { + // 展示本地存储能力 + var logs = wx.getStorageSync('logs') || [] + logs.unshift(Date.now()) + wx.setStorageSync('logs', logs) + + // 登录 + wx.login({ + success: res => { + // 发送 res.code 到后台换取 openId, sessionKey, unionId + } + }) + // 获取用户信息 + wx.getSetting({ + success: res => { + if (res.authSetting['scope.userInfo']) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 + wx.getUserInfo({ + success: res => { + // 可以将 res 发送给后台解码出 unionId + this.globalData.userInfo = res.userInfo + + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 + // 所以此处加入 callback 以防止这种情况 + if (this.userInfoReadyCallback) { + this.userInfoReadyCallback(res) + } + } + }) + } + } + }) + }, + globalData: { + userInfo: null + } +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..89bd9b1 --- /dev/null +++ b/app.json @@ -0,0 +1,44 @@ +{ + "pages": [ + "pages/index/index", + "pages/work/work", + "pages/mine/mine", + "pages/logs/logs" + ], + "tabBar": { + "custom": true, + "color": "#9498a4", + "selectedColor": "#35dab5", + "borderStyle": "black", + "backgroundColor": "#ffffff", + "list": [ + { + "pagePath": "pages/index/index", + "iconPath": "images/home.png", + "selectedIconPath": "images/home_on.png", + "text": "首页" + }, + { + "pagePath": "pages/work/work", + "iconPath": "images/work.png", + "selectedIconPath": "images/work_on.png", + "text": "办理" + }, + { + "pagePath": "pages/mine/mine", + "iconPath": "images/mine.png", + "selectedIconPath": "images/mine_on.png", + "text": "我的" + } + ] + }, + "window": { + "backgroundColor": "#f6f6f6", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTitleText": "", + "navigationBarTextStyle": "black" + }, + "style": "v2", + "sitemapLocation": "sitemap.json" +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..24e2881 --- /dev/null +++ b/app.wxss @@ -0,0 +1,12 @@ +/**app.wxss**/ +page{ + background-color: #f6f6f6; +} +.container { + width: 100%; + min-height: 100%; + padding-bottom: 50px; + box-sizing: border-box; + font-size: 32rpx; + color: #333; +} diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js new file mode 100644 index 0000000..cd91c3d --- /dev/null +++ b/custom-tab-bar/index.js @@ -0,0 +1,35 @@ +Component({ + data: { + selected: 0, + color: "#9498a4", + selectedColor: "#35dab5", + list: [{ + pagePath: "/pages/index/index", + iconPath: "/images/home.png", + selectedIconPath: "/images/home_on.png", + text: "首页" + }, { + pagePath: "/pages/work/work", + iconPath: "/images/work.png", + selectedIconPath: "/images/work_on.png", + text: "办理" + }, { + pagePath: "/pages/mine/mine", + iconPath: "/images/mine.png", + selectedIconPath: "/images/mine_on.png", + text: "我的" + }] + }, + attached() { + }, + methods: { + switchTab(e) { + const data = e.currentTarget.dataset + const url = data.path + wx.switchTab({url}) + this.setData({ + selected: data.index + }) + } + } +}) \ No newline at end of file diff --git a/custom-tab-bar/index.json b/custom-tab-bar/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/custom-tab-bar/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml new file mode 100644 index 0000000..9e5b3b0 --- /dev/null +++ b/custom-tab-bar/index.wxml @@ -0,0 +1,8 @@ + + + + + + {{item.text}} + + \ No newline at end of file diff --git a/custom-tab-bar/index.wxss b/custom-tab-bar/index.wxss new file mode 100644 index 0000000..863e8b2 --- /dev/null +++ b/custom-tab-bar/index.wxss @@ -0,0 +1,39 @@ +.tab-bar { + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 50px; + background: white; + display: flex; + padding-bottom: env(safe-area-inset-bottom); +} + +.tab-bar-border { + background-color: rgba(0, 0, 0, 0.2); + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 1px; + transform: scaleY(0.25); +} + +.tab-bar-item { + flex: 1; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.tab-bar-item cover-image { + width: 24px; + height: 24px; +} + +.tab-bar-item cover-view { + margin-top: 2px; + font-size: 12px; +} diff --git a/images/banner1.png b/images/banner1.png new file mode 100644 index 0000000..6051f77 Binary files /dev/null and b/images/banner1.png differ diff --git a/images/counticon1.png b/images/counticon1.png new file mode 100644 index 0000000..537a6ea Binary files /dev/null and b/images/counticon1.png differ diff --git a/images/counticon2.png b/images/counticon2.png new file mode 100644 index 0000000..fee5990 Binary files /dev/null and b/images/counticon2.png differ diff --git a/images/counticon3.png b/images/counticon3.png new file mode 100644 index 0000000..82afd68 Binary files /dev/null and b/images/counticon3.png differ diff --git a/images/headimg.png b/images/headimg.png new file mode 100644 index 0000000..ab225fa Binary files /dev/null and b/images/headimg.png differ diff --git a/images/home.png b/images/home.png new file mode 100644 index 0000000..ce5947f Binary files /dev/null and b/images/home.png differ diff --git a/images/home_on.png b/images/home_on.png new file mode 100644 index 0000000..fb5a776 Binary files /dev/null and b/images/home_on.png differ diff --git a/images/menuicon1.png b/images/menuicon1.png new file mode 100644 index 0000000..3dede9c Binary files /dev/null and b/images/menuicon1.png differ diff --git a/images/menuicon2.png b/images/menuicon2.png new file mode 100644 index 0000000..3d7904f Binary files /dev/null and b/images/menuicon2.png differ diff --git a/images/menuicon3.png b/images/menuicon3.png new file mode 100644 index 0000000..2f475af Binary files /dev/null and b/images/menuicon3.png differ diff --git a/images/mine.png b/images/mine.png new file mode 100644 index 0000000..a7375d9 Binary files /dev/null and b/images/mine.png differ diff --git a/images/mine_on.png b/images/mine_on.png new file mode 100644 index 0000000..e18eb03 Binary files /dev/null and b/images/mine_on.png differ diff --git a/images/minebg.png b/images/minebg.png new file mode 100644 index 0000000..132e7f8 Binary files /dev/null and b/images/minebg.png differ diff --git a/images/mineicon1.png b/images/mineicon1.png new file mode 100644 index 0000000..c4ff612 Binary files /dev/null and b/images/mineicon1.png differ diff --git a/images/mineicon2.png b/images/mineicon2.png new file mode 100644 index 0000000..15aecbb Binary files /dev/null and b/images/mineicon2.png differ diff --git a/images/mineicon3.png b/images/mineicon3.png new file mode 100644 index 0000000..76fd306 Binary files /dev/null and b/images/mineicon3.png differ diff --git a/images/mineicon4.png b/images/mineicon4.png new file mode 100644 index 0000000..1fe19e6 Binary files /dev/null and b/images/mineicon4.png differ diff --git a/images/more.png b/images/more.png new file mode 100644 index 0000000..44fcaa1 Binary files /dev/null and b/images/more.png differ diff --git a/images/tabicon1.png b/images/tabicon1.png new file mode 100644 index 0000000..effc00a Binary files /dev/null and b/images/tabicon1.png differ diff --git a/images/tabicon2.png b/images/tabicon2.png new file mode 100644 index 0000000..145ba3f Binary files /dev/null and b/images/tabicon2.png differ diff --git a/images/tabicon3.png b/images/tabicon3.png new file mode 100644 index 0000000..82e2ab6 Binary files /dev/null and b/images/tabicon3.png differ diff --git a/images/tipsicon.png b/images/tipsicon.png new file mode 100644 index 0000000..f1682eb Binary files /dev/null and b/images/tipsicon.png differ diff --git a/images/work.png b/images/work.png new file mode 100644 index 0000000..c43bd40 Binary files /dev/null and b/images/work.png differ diff --git a/images/work_on.png b/images/work_on.png new file mode 100644 index 0000000..4947763 Binary files /dev/null and b/images/work_on.png differ diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..7751d55 --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,74 @@ +//index.js +//获取应用实例 +const app = getApp() + +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + if (typeof this.getTabBar === 'function' && + this.getTabBar()) { + this.getTabBar().setData({ + selected: 0 + }) + } + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) diff --git a/pages/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..965b8e8 --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml new file mode 100644 index 0000000..9b54d7d --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,71 @@ + + + + + + + + + + 设备库 + + + + 新建案例 + + + + 归档案例 + + + + + + + + + ·您有1个案件正在执行中 + + + ·李凤阁上传了化工厂污水排放的调查案件 + + + + + + + + 最新归档案件 + + + + + 关于工程水质污染案件的调查 + 重点 + + 案件地点:汉阳区张家湾街道201号 + 案件类型:环境保护类 + 勘查单位:武汉市人民检察院 + + 2020/05/06 + + + + + + + 关于化工厂不合格排放烟尘的案件 + 一般 + + 案件地点:汉阳区张家湾街道201号 + 案件类型:环境保护类 + 勘查单位:武汉市人民检察院 + + 2020/05/05 + + + + + diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..ccd6075 --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,166 @@ +/**index.wxss**/ +.banner { + width: 100%; + height: 400rpx; +} + +.banner image { + width: 100%; + height: 100%; +} + +.menubox { + width: 100%; + background-color: #fff; +} + +.menubox{ + box-sizing: border-box; + padding: 24rpx 12rpx 0 12rpx; + background-color: #fff; +} + +.menu { + display: inline-flex; + align-items: center; + flex-direction: column; + width: calc(100% / 3); + height: 280rpx; + padding: 0 12rpx; + box-sizing: border-box; + position: relative; +} + +.menuicon { + width: 100%; + height: 100%; +} + +.menu cover-view { + position: absolute; + top: 30rpx; + width: 100%; + color: #fff; + text-align: center; +} + +.tips{ + margin-bottom: 24rpx; + display: inline-flex; + width: 100%; + padding: 24rpx; + box-sizing: border-box; + background-color: #fff; + border-bottom: 1rpx solid #dedede; +} + +.tipsicon{ + margin-right: 15rpx; + width: 100rpx; + height: 100rpx; +} + +.newsbox{ + width: calc(100% - 120rpx); + height: 100rpx; + display: flex; + flex-flow: row wrap; + align-content: space-around; +} + +.news{ + font-size: 30rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.news text{ + margin-right: 20rpx; + color: #35dab5; +} + +.item{ + width: 100%; + padding: 24rpx; + box-sizing: border-box; + background-color: #fff; + border-top: 1rpx solid #dedede; + border-bottom: 1rpx solid #dedede; + display: flex; + align-items: center; +} + +.itemicon{ + margin-right: 20rpx; + width: 14rpx; + height: 36rpx; + background-color: #35dab5; + border-radius: 8rpx; +} + +.case{ + width: 100%; + box-sizing: border-box; + padding: 24rpx 24rpx 0 24rpx; + background-color: #fff; +} + +.caseinfo{ + padding-bottom: 24rpx; + border-bottom: 1rpx dashed #dedede; + position: relative; +} + +.title{ + margin-bottom: 10rpx; + width: 85%; + line-height: 46rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.level{ + position: absolute; + top: 0; + right: 0; + display: flex; + padding: 0 18rpx; + color: #fff; + font-size: 26rpx; + line-height: 46rpx; + align-content: center; + border-radius: 25rpx; +} + +.danger{ + background-color: #f56c6c; +} + +.warning{ + background-color: #f0ad4e; +} + +.subinfo{ + width: 75%; +} + +.subinfo view{ + margin-top: 10rpx; + color: #9498a4; + font-size: 30rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis +} + +.time{ + width: 25%; + color: #b4b4b4; + font-size: 26rpx; + text-align: right; + position: absolute; + right: 0; + bottom: 24rpx; +} \ No newline at end of file diff --git a/pages/logs/logs.js b/pages/logs/logs.js new file mode 100644 index 0000000..b2b967d --- /dev/null +++ b/pages/logs/logs.js @@ -0,0 +1,15 @@ +//logs.js +const util = require('../../utils/util.js') + +Page({ + data: { + logs: [] + }, + onLoad: function () { + this.setData({ + logs: (wx.getStorageSync('logs') || []).map(log => { + return util.formatTime(new Date(log)) + }) + }) + } +}) diff --git a/pages/logs/logs.json b/pages/logs/logs.json new file mode 100644 index 0000000..3ee76c1 --- /dev/null +++ b/pages/logs/logs.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "查看启动日志", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/logs/logs.wxml b/pages/logs/logs.wxml new file mode 100644 index 0000000..b5a85ac --- /dev/null +++ b/pages/logs/logs.wxml @@ -0,0 +1,6 @@ + + + + {{index + 1}}. {{log}} + + diff --git a/pages/logs/logs.wxss b/pages/logs/logs.wxss new file mode 100644 index 0000000..94d4b88 --- /dev/null +++ b/pages/logs/logs.wxss @@ -0,0 +1,8 @@ +.log-list { + display: flex; + flex-direction: column; + padding: 40rpx; +} +.log-item { + margin: 10rpx; +} diff --git a/pages/mine/mine.js b/pages/mine/mine.js new file mode 100644 index 0000000..5454c63 --- /dev/null +++ b/pages/mine/mine.js @@ -0,0 +1,71 @@ +// pages/mine/mine.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + if (typeof this.getTabBar === 'function' && + this.getTabBar()) { + this.getTabBar().setData({ + selected: 2 + }) + } + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/mine/mine.json b/pages/mine/mine.json new file mode 100644 index 0000000..965b8e8 --- /dev/null +++ b/pages/mine/mine.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml new file mode 100644 index 0000000..614d019 --- /dev/null +++ b/pages/mine/mine.wxml @@ -0,0 +1,55 @@ + + + + + + + 李凤阁 + 武汉市人民检察院 + + + + + 我的案件 + + + + 执行中(2) + + + + 待上传(5) + + + + 已执行(18) + + + + + + + + + 实名认证 + + + + + 系统消息 + + + + + 意见反馈 + + + + + 关于我们 + + + + + 退出登录 + diff --git a/pages/mine/mine.wxss b/pages/mine/mine.wxss new file mode 100644 index 0000000..222b4ac --- /dev/null +++ b/pages/mine/mine.wxss @@ -0,0 +1,117 @@ +/* pages/mine/mine.wxss */ +.top{ + width: 100%; + height: 450rpx; + position: relative; +} + +.minebg{ + width: 100%; + height: 100%; +} + +.userinfo{ + width: 100%; + position: absolute; + z-index: 100; + top: 120rpx; + text-align: center; +} + +.headimg{ + margin-bottom: 10rpx; + width: 150rpx; + height: 150rpx; + border-radius: 50%; + border: 6rpx solid rgba(255, 255, 255, 0.25); +} + +.userinfo view{ + color: #fff; + line-height: 50rpx; +} + +.mycase{ + margin: 24rpx; + background-color: #fff; + border-radius: 15rpx; +} + +.item{ + width: 100%; + padding: 24rpx; + box-sizing: border-box; + border-bottom: 1rpx solid #dedede; + display: flex; + align-items: center; +} + +.count{ + padding: 24rpx 0; +} + +.count-item{ + display: inline-flex; + align-items: center; + flex-direction: column; + width: calc(100% / 3); +} + +.counticon{ + margin-bottom: 10rpx; + width: 70rpx; + height: 70rpx; +} + +.count-item view{ + color: #9498a4; + font-size: 30rpx; +} + +.count-item view text{ + color: #35dab5; +} + +.menu{ + margin: 24rpx; + padding: 0 24rpx; + background-color: #fff; + border-radius: 15rpx; +} + +.menu-item{ + display: flex; + align-items:center; + border-bottom: 1rpx solid #dedede; +} + +.menu-item:last-child{ + border-bottom: none !important; +} + +.mineicon{ + margin-right: 20rpx; + width: 45rpx; + height: 45rpx; +} + +.menu-item view{ + width: calc(100% - 93rpx); + line-height: 90rpx; +} + +.more{ + width: 32rpx; + height: 32rpx; +} + +.exit{ + margin:24rpx 25%; + padding: 26rpx 0; + background-color: #fff; + border-radius: 10rpx; + border: 1rpx solid #dedede; + font-size: 32rpx; + font-weight: normal; + text-align: center; +} \ No newline at end of file diff --git a/pages/work/work.js b/pages/work/work.js new file mode 100644 index 0000000..616034d --- /dev/null +++ b/pages/work/work.js @@ -0,0 +1,82 @@ +// pages/work/work.js +//获取应用实例 +const app = getApp() + +Page({ + + /** + * 页面的初始数据 + */ + data: { + menuTapCurrent:0 + }, + // 点击按钮选项卡切换 + menuTap: function (e) { + var current = e.currentTarget.dataset.current;//获取到绑定的数据 + //改变menuTapCurrent的值为当前选中的menu所绑定的数据 + this.setData({ + menuTapCurrent: current + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + if (typeof this.getTabBar === 'function' && + this.getTabBar()) { + this.getTabBar().setData({ + selected: 1 + }) + } + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/work/work.json b/pages/work/work.json new file mode 100644 index 0000000..91254a9 --- /dev/null +++ b/pages/work/work.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "办理" +} \ No newline at end of file diff --git a/pages/work/work.wxml b/pages/work/work.wxml new file mode 100644 index 0000000..7fa188e --- /dev/null +++ b/pages/work/work.wxml @@ -0,0 +1,71 @@ + + + + + + + 执行中 + + + + 待上传 + + + + 已执行 + + + + + + + + + + + + + diff --git a/pages/work/work.wxss b/pages/work/work.wxss new file mode 100644 index 0000000..070d55b --- /dev/null +++ b/pages/work/work.wxss @@ -0,0 +1,86 @@ +/* pages/work/work.wxss */ +.tab{ + margin-bottom: 20rpx; + width: 100%; + background-color: #fff; + border-bottom: 1rpx solid #e8e8e8; +} + +.tab-item{ + display: inline-flex; + align-items: center; + flex-direction: column; + width: calc(100% / 3); + padding: 24rpx 0; +} + +.active{ + border-bottom: 5rpx solid #35dab5; +} + +.tabicon{ + margin-bottom: 20rpx; + width: 100rpx; + height: 100rpx; +} + +.case{ + margin: 24rpx; + padding: 24rpx; + background-color: #fff; + border-radius: 15rpx; + position: relative; +} + +.title{ + margin-bottom: 10rpx; + width: 85%; + line-height: 46rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.level{ + position: absolute; + top: 24rpx; + right: 24rpx; + display: flex; + padding: 0 18rpx; + color: #fff; + font-size: 26rpx; + line-height: 46rpx; + align-content: center; + border-radius: 25rpx; +} + +.danger{ + background-color: #f56c6c; +} + +.warning{ + background-color: #f0ad4e; +} + +.subinfo{ + width: 75%; +} + +.subinfo view{ + margin-top: 10rpx; + color: #9498a4; + font-size: 30rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis +} + +.time{ + width: 25%; + color: #b4b4b4; + font-size: 26rpx; + text-align: right; + position: absolute; + right: 24rpx; + bottom: 24rpx; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..c65b1cd --- /dev/null +++ b/project.config.json @@ -0,0 +1,46 @@ +{ + "description": "项目配置文件", + "packOptions": { + "ignore": [] + }, + "setting": { + "urlCheck": true, + "es6": true, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": true, + "autoAudits": false, + "coverView": true, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false + }, + "compileType": "miniprogram", + "libVersion": "2.11.0", + "appid": "wx66cca6da45618e42", + "projectname": "public_welfare", + "debugOptions": { + "hidedInDevtools": [] + }, + "isGameTourist": false, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "condition": { + "search": { + "current": -1, + "list": [] + }, + "conversation": { + "current": -1, + "list": [] + }, + "game": { + "currentL": -1, + "list": [] + }, + "miniprogram": { + "current": -1, + "list": [] + } + } +} \ No newline at end of file diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..ca02add --- /dev/null +++ b/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/utils/util.js b/utils/util.js new file mode 100644 index 0000000..dbadbb8 --- /dev/null +++ b/utils/util.js @@ -0,0 +1,19 @@ +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + + return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') +} + +const formatNumber = n => { + n = n.toString() + return n[1] ? n : '0' + n +} + +module.exports = { + formatTime: formatTime +} -- libgit2 0.21.4