Commit 6843e3d25623edf6ca812449fd6b8b38dba084eb
0 parents
增加首页、执行、我的页面
Showing
50 changed files
with
1090 additions
and
0 deletions
app.js
0 → 100644
| 1 | +++ a/app.js | |
| 1 | +//app.js | |
| 2 | +App({ | |
| 3 | + onLaunch: function () { | |
| 4 | + // 展示本地存储能力 | |
| 5 | + var logs = wx.getStorageSync('logs') || [] | |
| 6 | + logs.unshift(Date.now()) | |
| 7 | + wx.setStorageSync('logs', logs) | |
| 8 | + | |
| 9 | + // 登录 | |
| 10 | + wx.login({ | |
| 11 | + success: res => { | |
| 12 | + // 发送 res.code 到后台换取 openId, sessionKey, unionId | |
| 13 | + } | |
| 14 | + }) | |
| 15 | + // 获取用户信息 | |
| 16 | + wx.getSetting({ | |
| 17 | + success: res => { | |
| 18 | + if (res.authSetting['scope.userInfo']) { | |
| 19 | + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 | |
| 20 | + wx.getUserInfo({ | |
| 21 | + success: res => { | |
| 22 | + // 可以将 res 发送给后台解码出 unionId | |
| 23 | + this.globalData.userInfo = res.userInfo | |
| 24 | + | |
| 25 | + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 | |
| 26 | + // 所以此处加入 callback 以防止这种情况 | |
| 27 | + if (this.userInfoReadyCallback) { | |
| 28 | + this.userInfoReadyCallback(res) | |
| 29 | + } | |
| 30 | + } | |
| 31 | + }) | |
| 32 | + } | |
| 33 | + } | |
| 34 | + }) | |
| 35 | + }, | |
| 36 | + globalData: { | |
| 37 | + userInfo: null | |
| 38 | + } | |
| 39 | +}) | |
| 0 | 40 | \ No newline at end of file | ... | ... |
app.json
0 → 100644
| 1 | +++ a/app.json | |
| 1 | +{ | |
| 2 | + "pages": [ | |
| 3 | + "pages/index/index", | |
| 4 | + "pages/work/work", | |
| 5 | + "pages/mine/mine", | |
| 6 | + "pages/logs/logs" | |
| 7 | + ], | |
| 8 | + "tabBar": { | |
| 9 | + "custom": true, | |
| 10 | + "color": "#9498a4", | |
| 11 | + "selectedColor": "#35dab5", | |
| 12 | + "borderStyle": "black", | |
| 13 | + "backgroundColor": "#ffffff", | |
| 14 | + "list": [ | |
| 15 | + { | |
| 16 | + "pagePath": "pages/index/index", | |
| 17 | + "iconPath": "images/home.png", | |
| 18 | + "selectedIconPath": "images/home_on.png", | |
| 19 | + "text": "首页" | |
| 20 | + }, | |
| 21 | + { | |
| 22 | + "pagePath": "pages/work/work", | |
| 23 | + "iconPath": "images/work.png", | |
| 24 | + "selectedIconPath": "images/work_on.png", | |
| 25 | + "text": "办理" | |
| 26 | + }, | |
| 27 | + { | |
| 28 | + "pagePath": "pages/mine/mine", | |
| 29 | + "iconPath": "images/mine.png", | |
| 30 | + "selectedIconPath": "images/mine_on.png", | |
| 31 | + "text": "我的" | |
| 32 | + } | |
| 33 | + ] | |
| 34 | + }, | |
| 35 | + "window": { | |
| 36 | + "backgroundColor": "#f6f6f6", | |
| 37 | + "backgroundTextStyle": "light", | |
| 38 | + "navigationBarBackgroundColor": "#ffffff", | |
| 39 | + "navigationBarTitleText": "", | |
| 40 | + "navigationBarTextStyle": "black" | |
| 41 | + }, | |
| 42 | + "style": "v2", | |
| 43 | + "sitemapLocation": "sitemap.json" | |
| 44 | +} | |
| 0 | 45 | \ No newline at end of file | ... | ... |
app.wxss
0 → 100644
custom-tab-bar/index.js
0 → 100644
| 1 | +++ a/custom-tab-bar/index.js | |
| 1 | +Component({ | |
| 2 | + data: { | |
| 3 | + selected: 0, | |
| 4 | + color: "#9498a4", | |
| 5 | + selectedColor: "#35dab5", | |
| 6 | + list: [{ | |
| 7 | + pagePath: "/pages/index/index", | |
| 8 | + iconPath: "/images/home.png", | |
| 9 | + selectedIconPath: "/images/home_on.png", | |
| 10 | + text: "首页" | |
| 11 | + }, { | |
| 12 | + pagePath: "/pages/work/work", | |
| 13 | + iconPath: "/images/work.png", | |
| 14 | + selectedIconPath: "/images/work_on.png", | |
| 15 | + text: "办理" | |
| 16 | + }, { | |
| 17 | + pagePath: "/pages/mine/mine", | |
| 18 | + iconPath: "/images/mine.png", | |
| 19 | + selectedIconPath: "/images/mine_on.png", | |
| 20 | + text: "我的" | |
| 21 | + }] | |
| 22 | + }, | |
| 23 | + attached() { | |
| 24 | + }, | |
| 25 | + methods: { | |
| 26 | + switchTab(e) { | |
| 27 | + const data = e.currentTarget.dataset | |
| 28 | + const url = data.path | |
| 29 | + wx.switchTab({url}) | |
| 30 | + this.setData({ | |
| 31 | + selected: data.index | |
| 32 | + }) | |
| 33 | + } | |
| 34 | + } | |
| 35 | +}) | |
| 0 | 36 | \ No newline at end of file | ... | ... |
custom-tab-bar/index.json
0 → 100644
custom-tab-bar/index.wxml
0 → 100644
| 1 | +++ a/custom-tab-bar/index.wxml | |
| 1 | +<!--miniprogram/custom-tab-bar/index.wxml--> | |
| 2 | +<cover-view class="tab-bar"> | |
| 3 | + <cover-view class="tab-bar-border"></cover-view> | |
| 4 | + <cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab"> | |
| 5 | + <cover-image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></cover-image> | |
| 6 | + <cover-view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view> | |
| 7 | + </cover-view> | |
| 8 | +</cover-view> | |
| 0 | 9 | \ No newline at end of file | ... | ... |
custom-tab-bar/index.wxss
0 → 100644
| 1 | +++ a/custom-tab-bar/index.wxss | |
| 1 | +.tab-bar { | |
| 2 | + position: fixed; | |
| 3 | + bottom: 0; | |
| 4 | + left: 0; | |
| 5 | + right: 0; | |
| 6 | + height: 50px; | |
| 7 | + background: white; | |
| 8 | + display: flex; | |
| 9 | + padding-bottom: env(safe-area-inset-bottom); | |
| 10 | +} | |
| 11 | + | |
| 12 | +.tab-bar-border { | |
| 13 | + background-color: rgba(0, 0, 0, 0.2); | |
| 14 | + position: absolute; | |
| 15 | + left: 0; | |
| 16 | + top: 0; | |
| 17 | + width: 100%; | |
| 18 | + height: 1px; | |
| 19 | + transform: scaleY(0.25); | |
| 20 | +} | |
| 21 | + | |
| 22 | +.tab-bar-item { | |
| 23 | + flex: 1; | |
| 24 | + text-align: center; | |
| 25 | + display: flex; | |
| 26 | + justify-content: center; | |
| 27 | + align-items: center; | |
| 28 | + flex-direction: column; | |
| 29 | +} | |
| 30 | + | |
| 31 | +.tab-bar-item cover-image { | |
| 32 | + width: 24px; | |
| 33 | + height: 24px; | |
| 34 | +} | |
| 35 | + | |
| 36 | +.tab-bar-item cover-view { | |
| 37 | + margin-top: 2px; | |
| 38 | + font-size: 12px; | |
| 39 | +} | ... | ... |
images/banner1.png
0 → 100644
54.3 KB
images/counticon1.png
0 → 100644
4.57 KB
images/counticon2.png
0 → 100644
4.19 KB
images/counticon3.png
0 → 100644
4.2 KB
images/headimg.png
0 → 100644
2.41 KB
images/home.png
0 → 100644
2.62 KB
images/home_on.png
0 → 100644
3.43 KB
images/menuicon1.png
0 → 100644
55.4 KB
images/menuicon2.png
0 → 100644
55 KB
images/menuicon3.png
0 → 100644
50.1 KB
images/mine.png
0 → 100644
2.55 KB
images/mine_on.png
0 → 100644
3.4 KB
images/minebg.png
0 → 100644
66.3 KB
images/mineicon1.png
0 → 100644
1.99 KB
images/mineicon2.png
0 → 100644
2.45 KB
images/mineicon3.png
0 → 100644
2.31 KB
images/mineicon4.png
0 → 100644
1.92 KB
images/more.png
0 → 100644
343 Bytes
images/tabicon1.png
0 → 100644
6.64 KB
images/tabicon2.png
0 → 100644
6.3 KB
images/tabicon3.png
0 → 100644
6.57 KB
images/tipsicon.png
0 → 100644
13.2 KB
images/work.png
0 → 100644
3.15 KB
images/work_on.png
0 → 100644
4.04 KB
pages/index/index.js
0 → 100644
| 1 | +++ a/pages/index/index.js | |
| 1 | +//index.js | |
| 2 | +//获取应用实例 | |
| 3 | +const app = getApp() | |
| 4 | + | |
| 5 | +Page({ | |
| 6 | + | |
| 7 | + /** | |
| 8 | + * 页面的初始数据 | |
| 9 | + */ | |
| 10 | + data: { | |
| 11 | + | |
| 12 | + }, | |
| 13 | + | |
| 14 | + /** | |
| 15 | + * 生命周期函数--监听页面加载 | |
| 16 | + */ | |
| 17 | + onLoad: function (options) { | |
| 18 | + | |
| 19 | + }, | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * 生命周期函数--监听页面初次渲染完成 | |
| 23 | + */ | |
| 24 | + onReady: function () { | |
| 25 | + | |
| 26 | + }, | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 生命周期函数--监听页面显示 | |
| 30 | + */ | |
| 31 | + onShow: function () { | |
| 32 | + if (typeof this.getTabBar === 'function' && | |
| 33 | + this.getTabBar()) { | |
| 34 | + this.getTabBar().setData({ | |
| 35 | + selected: 0 | |
| 36 | + }) | |
| 37 | + } | |
| 38 | + }, | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 生命周期函数--监听页面隐藏 | |
| 42 | + */ | |
| 43 | + onHide: function () { | |
| 44 | + | |
| 45 | + }, | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 生命周期函数--监听页面卸载 | |
| 49 | + */ | |
| 50 | + onUnload: function () { | |
| 51 | + | |
| 52 | + }, | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 页面相关事件处理函数--监听用户下拉动作 | |
| 56 | + */ | |
| 57 | + onPullDownRefresh: function () { | |
| 58 | + | |
| 59 | + }, | |
| 60 | + | |
| 61 | + /** | |
| 62 | + * 页面上拉触底事件的处理函数 | |
| 63 | + */ | |
| 64 | + onReachBottom: function () { | |
| 65 | + | |
| 66 | + }, | |
| 67 | + | |
| 68 | + /** | |
| 69 | + * 用户点击右上角分享 | |
| 70 | + */ | |
| 71 | + onShareAppMessage: function () { | |
| 72 | + | |
| 73 | + } | |
| 74 | +}) | ... | ... |
pages/index/index.json
0 → 100644
pages/index/index.wxml
0 → 100644
| 1 | +++ a/pages/index/index.wxml | |
| 1 | +<!--index.wxml--> | |
| 2 | +<view class="container"> | |
| 3 | + <!-- banner --> | |
| 4 | + <view class='banner'> | |
| 5 | + <image src='../../images/banner1.png'></image> | |
| 6 | + </view> | |
| 7 | + <!-- banner --> | |
| 8 | + <!-- 菜单 --> | |
| 9 | + <view class="menubox"> | |
| 10 | + <navigator class="menu" hover-class="none" url=""> | |
| 11 | + <image class='menuicon' src='../../images/menuicon1.png'></image> | |
| 12 | + <cover-view>设备库</cover-view> | |
| 13 | + </navigator> | |
| 14 | + <navigator class="menu" hover-class="none" url=""> | |
| 15 | + <image class='menuicon' src='../../images/menuicon2.png'></image> | |
| 16 | + <cover-view>新建案例</cover-view> | |
| 17 | + </navigator> | |
| 18 | + <navigator class='menu' hover-class="none" url=""> | |
| 19 | + <image class='menuicon' src='../../images/menuicon3.png'></image> | |
| 20 | + <cover-view>归档案例</cover-view> | |
| 21 | + </navigator> | |
| 22 | + </view> | |
| 23 | + <!-- 菜单 --> | |
| 24 | + <!-- 提示 --> | |
| 25 | + <view class="tips"> | |
| 26 | + <image class='tipsicon' src='../../images/tipsicon.png'></image> | |
| 27 | + <view class="newsbox"> | |
| 28 | + <navigator class="news" hover-class="none" url=""> | |
| 29 | + <text>·</text>您有1个案件正在执行中 | |
| 30 | + </navigator> | |
| 31 | + <navigator class="news" hover-class="none" url=""> | |
| 32 | + <text>·</text>李凤阁上传了化工厂污水排放的调查案件 | |
| 33 | + </navigator> | |
| 34 | + </view> | |
| 35 | + </view> | |
| 36 | + <!-- 提示 --> | |
| 37 | + <!-- 最新归档案件 --> | |
| 38 | + <view class='item'> | |
| 39 | + <view class='itemicon'></view> | |
| 40 | + <text>最新归档案件</text> | |
| 41 | + </view> | |
| 42 | + <!-- 案件1 --> | |
| 43 | + <navigator class="case" hover-class="none" url=""> | |
| 44 | + <view class="caseinfo"> | |
| 45 | + <view class="title">关于工程水质污染案件的调查</view> | |
| 46 | + <text class="level danger">重点</text> | |
| 47 | + <view class="subinfo"> | |
| 48 | + <view>案件地点:汉阳区张家湾街道201号</view> | |
| 49 | + <view>案件类型:环境保护类</view> | |
| 50 | + <view>勘查单位:武汉市人民检察院</view> | |
| 51 | + </view> | |
| 52 | + <view class="time">2020/05/06</view> | |
| 53 | + </view> | |
| 54 | + </navigator> | |
| 55 | + <!-- 案件1 --> | |
| 56 | + <!-- 案件2 --> | |
| 57 | + <navigator class="case" hover-class="none" url=""> | |
| 58 | + <view class="caseinfo"> | |
| 59 | + <view class="title">关于化工厂不合格排放烟尘的案件</view> | |
| 60 | + <text class="level warning">一般</text> | |
| 61 | + <view class="subinfo"> | |
| 62 | + <view>案件地点:汉阳区张家湾街道201号</view> | |
| 63 | + <view>案件类型:环境保护类</view> | |
| 64 | + <view>勘查单位:武汉市人民检察院</view> | |
| 65 | + </view> | |
| 66 | + <view class="time">2020/05/05</view> | |
| 67 | + </view> | |
| 68 | + </navigator> | |
| 69 | + <!-- 案件2 --> | |
| 70 | + <!-- 最新归档案件 --> | |
| 71 | +</view> | ... | ... |
pages/index/index.wxss
0 → 100644
| 1 | +++ a/pages/index/index.wxss | |
| 1 | +/**index.wxss**/ | |
| 2 | +.banner { | |
| 3 | + width: 100%; | |
| 4 | + height: 400rpx; | |
| 5 | +} | |
| 6 | + | |
| 7 | +.banner image { | |
| 8 | + width: 100%; | |
| 9 | + height: 100%; | |
| 10 | +} | |
| 11 | + | |
| 12 | +.menubox { | |
| 13 | + width: 100%; | |
| 14 | + background-color: #fff; | |
| 15 | +} | |
| 16 | + | |
| 17 | +.menubox{ | |
| 18 | + box-sizing: border-box; | |
| 19 | + padding: 24rpx 12rpx 0 12rpx; | |
| 20 | + background-color: #fff; | |
| 21 | +} | |
| 22 | + | |
| 23 | +.menu { | |
| 24 | + display: inline-flex; | |
| 25 | + align-items: center; | |
| 26 | + flex-direction: column; | |
| 27 | + width: calc(100% / 3); | |
| 28 | + height: 280rpx; | |
| 29 | + padding: 0 12rpx; | |
| 30 | + box-sizing: border-box; | |
| 31 | + position: relative; | |
| 32 | +} | |
| 33 | + | |
| 34 | +.menuicon { | |
| 35 | + width: 100%; | |
| 36 | + height: 100%; | |
| 37 | +} | |
| 38 | + | |
| 39 | +.menu cover-view { | |
| 40 | + position: absolute; | |
| 41 | + top: 30rpx; | |
| 42 | + width: 100%; | |
| 43 | + color: #fff; | |
| 44 | + text-align: center; | |
| 45 | +} | |
| 46 | + | |
| 47 | +.tips{ | |
| 48 | + margin-bottom: 24rpx; | |
| 49 | + display: inline-flex; | |
| 50 | + width: 100%; | |
| 51 | + padding: 24rpx; | |
| 52 | + box-sizing: border-box; | |
| 53 | + background-color: #fff; | |
| 54 | + border-bottom: 1rpx solid #dedede; | |
| 55 | +} | |
| 56 | + | |
| 57 | +.tipsicon{ | |
| 58 | + margin-right: 15rpx; | |
| 59 | + width: 100rpx; | |
| 60 | + height: 100rpx; | |
| 61 | +} | |
| 62 | + | |
| 63 | +.newsbox{ | |
| 64 | + width: calc(100% - 120rpx); | |
| 65 | + height: 100rpx; | |
| 66 | + display: flex; | |
| 67 | + flex-flow: row wrap; | |
| 68 | + align-content: space-around; | |
| 69 | +} | |
| 70 | + | |
| 71 | +.news{ | |
| 72 | + font-size: 30rpx; | |
| 73 | + white-space: nowrap; | |
| 74 | + overflow: hidden; | |
| 75 | + text-overflow: ellipsis; | |
| 76 | +} | |
| 77 | + | |
| 78 | +.news text{ | |
| 79 | + margin-right: 20rpx; | |
| 80 | + color: #35dab5; | |
| 81 | +} | |
| 82 | + | |
| 83 | +.item{ | |
| 84 | + width: 100%; | |
| 85 | + padding: 24rpx; | |
| 86 | + box-sizing: border-box; | |
| 87 | + background-color: #fff; | |
| 88 | + border-top: 1rpx solid #dedede; | |
| 89 | + border-bottom: 1rpx solid #dedede; | |
| 90 | + display: flex; | |
| 91 | + align-items: center; | |
| 92 | +} | |
| 93 | + | |
| 94 | +.itemicon{ | |
| 95 | + margin-right: 20rpx; | |
| 96 | + width: 14rpx; | |
| 97 | + height: 36rpx; | |
| 98 | + background-color: #35dab5; | |
| 99 | + border-radius: 8rpx; | |
| 100 | +} | |
| 101 | + | |
| 102 | +.case{ | |
| 103 | + width: 100%; | |
| 104 | + box-sizing: border-box; | |
| 105 | + padding: 24rpx 24rpx 0 24rpx; | |
| 106 | + background-color: #fff; | |
| 107 | +} | |
| 108 | + | |
| 109 | +.caseinfo{ | |
| 110 | + padding-bottom: 24rpx; | |
| 111 | + border-bottom: 1rpx dashed #dedede; | |
| 112 | + position: relative; | |
| 113 | +} | |
| 114 | + | |
| 115 | +.title{ | |
| 116 | + margin-bottom: 10rpx; | |
| 117 | + width: 85%; | |
| 118 | + line-height: 46rpx; | |
| 119 | + white-space: nowrap; | |
| 120 | + overflow: hidden; | |
| 121 | + text-overflow: ellipsis; | |
| 122 | +} | |
| 123 | + | |
| 124 | +.level{ | |
| 125 | + position: absolute; | |
| 126 | + top: 0; | |
| 127 | + right: 0; | |
| 128 | + display: flex; | |
| 129 | + padding: 0 18rpx; | |
| 130 | + color: #fff; | |
| 131 | + font-size: 26rpx; | |
| 132 | + line-height: 46rpx; | |
| 133 | + align-content: center; | |
| 134 | + border-radius: 25rpx; | |
| 135 | +} | |
| 136 | + | |
| 137 | +.danger{ | |
| 138 | + background-color: #f56c6c; | |
| 139 | +} | |
| 140 | + | |
| 141 | +.warning{ | |
| 142 | + background-color: #f0ad4e; | |
| 143 | +} | |
| 144 | + | |
| 145 | +.subinfo{ | |
| 146 | + width: 75%; | |
| 147 | +} | |
| 148 | + | |
| 149 | +.subinfo view{ | |
| 150 | + margin-top: 10rpx; | |
| 151 | + color: #9498a4; | |
| 152 | + font-size: 30rpx; | |
| 153 | + white-space: nowrap; | |
| 154 | + overflow: hidden; | |
| 155 | + text-overflow: ellipsis | |
| 156 | +} | |
| 157 | + | |
| 158 | +.time{ | |
| 159 | + width: 25%; | |
| 160 | + color: #b4b4b4; | |
| 161 | + font-size: 26rpx; | |
| 162 | + text-align: right; | |
| 163 | + position: absolute; | |
| 164 | + right: 0; | |
| 165 | + bottom: 24rpx; | |
| 166 | +} | |
| 0 | 167 | \ No newline at end of file | ... | ... |
pages/logs/logs.js
0 → 100644
| 1 | +++ a/pages/logs/logs.js | |
| 1 | +//logs.js | |
| 2 | +const util = require('../../utils/util.js') | |
| 3 | + | |
| 4 | +Page({ | |
| 5 | + data: { | |
| 6 | + logs: [] | |
| 7 | + }, | |
| 8 | + onLoad: function () { | |
| 9 | + this.setData({ | |
| 10 | + logs: (wx.getStorageSync('logs') || []).map(log => { | |
| 11 | + return util.formatTime(new Date(log)) | |
| 12 | + }) | |
| 13 | + }) | |
| 14 | + } | |
| 15 | +}) | ... | ... |
pages/logs/logs.json
0 → 100644
pages/logs/logs.wxml
0 → 100644
pages/logs/logs.wxss
0 → 100644
pages/mine/mine.js
0 → 100644
| 1 | +++ a/pages/mine/mine.js | |
| 1 | +// pages/mine/mine.js | |
| 2 | +Page({ | |
| 3 | + | |
| 4 | + /** | |
| 5 | + * 页面的初始数据 | |
| 6 | + */ | |
| 7 | + data: { | |
| 8 | + | |
| 9 | + }, | |
| 10 | + | |
| 11 | + /** | |
| 12 | + * 生命周期函数--监听页面加载 | |
| 13 | + */ | |
| 14 | + onLoad: function (options) { | |
| 15 | + | |
| 16 | + }, | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 生命周期函数--监听页面初次渲染完成 | |
| 20 | + */ | |
| 21 | + onReady: function () { | |
| 22 | + | |
| 23 | + }, | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 生命周期函数--监听页面显示 | |
| 27 | + */ | |
| 28 | + onShow: function () { | |
| 29 | + if (typeof this.getTabBar === 'function' && | |
| 30 | + this.getTabBar()) { | |
| 31 | + this.getTabBar().setData({ | |
| 32 | + selected: 2 | |
| 33 | + }) | |
| 34 | + } | |
| 35 | + }, | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 生命周期函数--监听页面隐藏 | |
| 39 | + */ | |
| 40 | + onHide: function () { | |
| 41 | + | |
| 42 | + }, | |
| 43 | + | |
| 44 | + /** | |
| 45 | + * 生命周期函数--监听页面卸载 | |
| 46 | + */ | |
| 47 | + onUnload: function () { | |
| 48 | + | |
| 49 | + }, | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * 页面相关事件处理函数--监听用户下拉动作 | |
| 53 | + */ | |
| 54 | + onPullDownRefresh: function () { | |
| 55 | + | |
| 56 | + }, | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 页面上拉触底事件的处理函数 | |
| 60 | + */ | |
| 61 | + onReachBottom: function () { | |
| 62 | + | |
| 63 | + }, | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 用户点击右上角分享 | |
| 67 | + */ | |
| 68 | + onShareAppMessage: function () { | |
| 69 | + | |
| 70 | + } | |
| 71 | +}) | |
| 0 | 72 | \ No newline at end of file | ... | ... |
pages/mine/mine.json
0 → 100644
pages/mine/mine.wxml
0 → 100644
| 1 | +++ a/pages/mine/mine.wxml | |
| 1 | +<!--pages/mine/mine.wxml--> | |
| 2 | +<view class="container"> | |
| 3 | + <view class="top"> | |
| 4 | + <image class="minebg" src='../../images/minebg.png'></image> | |
| 5 | + <view class="userinfo"> | |
| 6 | + <image class='headimg' src='../../images/headimg.png'></image> | |
| 7 | + <view>李凤阁</view> | |
| 8 | + <view>武汉市人民检察院</view> | |
| 9 | + </view> | |
| 10 | + </view> | |
| 11 | + <!-- 我的案件 --> | |
| 12 | + <view class="mycase"> | |
| 13 | + <view class="item">我的案件</view> | |
| 14 | + <view class="count"> | |
| 15 | + <view class='count-item'> | |
| 16 | + <image class="counticon" src='../../images/counticon1.png'></image> | |
| 17 | + <view>执行中(<text>2</text>)</view> | |
| 18 | + </view> | |
| 19 | + <view class='count-item'> | |
| 20 | + <image class="counticon" src='../../images/counticon2.png'></image> | |
| 21 | + <view>待上传(<text>5</text>)</view> | |
| 22 | + </view> | |
| 23 | + <view class='count-item'> | |
| 24 | + <image class="counticon" src='../../images/counticon3.png'></image> | |
| 25 | + <view>已执行(<text>18</text>)</view> | |
| 26 | + </view> | |
| 27 | + </view> | |
| 28 | + </view> | |
| 29 | + <!-- 我的案件 --> | |
| 30 | + <!-- 菜单 --> | |
| 31 | + <view class="menu"> | |
| 32 | + <navigator class="menu-item" hover-class="none"> | |
| 33 | + <image class="mineicon" src='../../images/mineicon1.png'></image> | |
| 34 | + <view>实名认证</view> | |
| 35 | + <image class="more" src='../../images/more.png'></image> | |
| 36 | + </navigator> | |
| 37 | + <navigator class="menu-item" hover-class="none"> | |
| 38 | + <image class="mineicon" src='../../images/mineicon2.png'></image> | |
| 39 | + <view>系统消息</view> | |
| 40 | + <image class="more" src='../../images/more.png'></image> | |
| 41 | + </navigator> | |
| 42 | + <navigator class="menu-item" hover-class="none"> | |
| 43 | + <image class="mineicon" src='../../images/mineicon3.png'></image> | |
| 44 | + <view>意见反馈</view> | |
| 45 | + <image class="more" src='../../images/more.png'></image> | |
| 46 | + </navigator> | |
| 47 | + <navigator class="menu-item" hover-class="none"> | |
| 48 | + <image class="mineicon" src='../../images/mineicon4.png'></image> | |
| 49 | + <view>关于我们</view> | |
| 50 | + <image class="more" src='../../images/more.png'></image> | |
| 51 | + </navigator> | |
| 52 | + </view> | |
| 53 | + <!-- 菜单 --> | |
| 54 | + <view class="exit">退出登录</view> | |
| 55 | +</view> | ... | ... |
pages/mine/mine.wxss
0 → 100644
| 1 | +++ a/pages/mine/mine.wxss | |
| 1 | +/* pages/mine/mine.wxss */ | |
| 2 | +.top{ | |
| 3 | + width: 100%; | |
| 4 | + height: 450rpx; | |
| 5 | + position: relative; | |
| 6 | +} | |
| 7 | + | |
| 8 | +.minebg{ | |
| 9 | + width: 100%; | |
| 10 | + height: 100%; | |
| 11 | +} | |
| 12 | + | |
| 13 | +.userinfo{ | |
| 14 | + width: 100%; | |
| 15 | + position: absolute; | |
| 16 | + z-index: 100; | |
| 17 | + top: 120rpx; | |
| 18 | + text-align: center; | |
| 19 | +} | |
| 20 | + | |
| 21 | +.headimg{ | |
| 22 | + margin-bottom: 10rpx; | |
| 23 | + width: 150rpx; | |
| 24 | + height: 150rpx; | |
| 25 | + border-radius: 50%; | |
| 26 | + border: 6rpx solid rgba(255, 255, 255, 0.25); | |
| 27 | +} | |
| 28 | + | |
| 29 | +.userinfo view{ | |
| 30 | + color: #fff; | |
| 31 | + line-height: 50rpx; | |
| 32 | +} | |
| 33 | + | |
| 34 | +.mycase{ | |
| 35 | + margin: 24rpx; | |
| 36 | + background-color: #fff; | |
| 37 | + border-radius: 15rpx; | |
| 38 | +} | |
| 39 | + | |
| 40 | +.item{ | |
| 41 | + width: 100%; | |
| 42 | + padding: 24rpx; | |
| 43 | + box-sizing: border-box; | |
| 44 | + border-bottom: 1rpx solid #dedede; | |
| 45 | + display: flex; | |
| 46 | + align-items: center; | |
| 47 | +} | |
| 48 | + | |
| 49 | +.count{ | |
| 50 | + padding: 24rpx 0; | |
| 51 | +} | |
| 52 | + | |
| 53 | +.count-item{ | |
| 54 | + display: inline-flex; | |
| 55 | + align-items: center; | |
| 56 | + flex-direction: column; | |
| 57 | + width: calc(100% / 3); | |
| 58 | +} | |
| 59 | + | |
| 60 | +.counticon{ | |
| 61 | + margin-bottom: 10rpx; | |
| 62 | + width: 70rpx; | |
| 63 | + height: 70rpx; | |
| 64 | +} | |
| 65 | + | |
| 66 | +.count-item view{ | |
| 67 | + color: #9498a4; | |
| 68 | + font-size: 30rpx; | |
| 69 | +} | |
| 70 | + | |
| 71 | +.count-item view text{ | |
| 72 | + color: #35dab5; | |
| 73 | +} | |
| 74 | + | |
| 75 | +.menu{ | |
| 76 | + margin: 24rpx; | |
| 77 | + padding: 0 24rpx; | |
| 78 | + background-color: #fff; | |
| 79 | + border-radius: 15rpx; | |
| 80 | +} | |
| 81 | + | |
| 82 | +.menu-item{ | |
| 83 | + display: flex; | |
| 84 | + align-items:center; | |
| 85 | + border-bottom: 1rpx solid #dedede; | |
| 86 | +} | |
| 87 | + | |
| 88 | +.menu-item:last-child{ | |
| 89 | + border-bottom: none !important; | |
| 90 | +} | |
| 91 | + | |
| 92 | +.mineicon{ | |
| 93 | + margin-right: 20rpx; | |
| 94 | + width: 45rpx; | |
| 95 | + height: 45rpx; | |
| 96 | +} | |
| 97 | + | |
| 98 | +.menu-item view{ | |
| 99 | + width: calc(100% - 93rpx); | |
| 100 | + line-height: 90rpx; | |
| 101 | +} | |
| 102 | + | |
| 103 | +.more{ | |
| 104 | + width: 32rpx; | |
| 105 | + height: 32rpx; | |
| 106 | +} | |
| 107 | + | |
| 108 | +.exit{ | |
| 109 | + margin:24rpx 25%; | |
| 110 | + padding: 26rpx 0; | |
| 111 | + background-color: #fff; | |
| 112 | + border-radius: 10rpx; | |
| 113 | + border: 1rpx solid #dedede; | |
| 114 | + font-size: 32rpx; | |
| 115 | + font-weight: normal; | |
| 116 | + text-align: center; | |
| 117 | +} | |
| 0 | 118 | \ No newline at end of file | ... | ... |
pages/work/work.js
0 → 100644
| 1 | +++ a/pages/work/work.js | |
| 1 | +// pages/work/work.js | |
| 2 | +//获取应用实例 | |
| 3 | +const app = getApp() | |
| 4 | + | |
| 5 | +Page({ | |
| 6 | + | |
| 7 | + /** | |
| 8 | + * 页面的初始数据 | |
| 9 | + */ | |
| 10 | + data: { | |
| 11 | + menuTapCurrent:0 | |
| 12 | + }, | |
| 13 | + // 点击按钮选项卡切换 | |
| 14 | + menuTap: function (e) { | |
| 15 | + var current = e.currentTarget.dataset.current;//获取到绑定的数据 | |
| 16 | + //改变menuTapCurrent的值为当前选中的menu所绑定的数据 | |
| 17 | + this.setData({ | |
| 18 | + menuTapCurrent: current | |
| 19 | + }); | |
| 20 | + }, | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 生命周期函数--监听页面加载 | |
| 24 | + */ | |
| 25 | + onLoad: function (options) { | |
| 26 | + | |
| 27 | + }, | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 生命周期函数--监听页面初次渲染完成 | |
| 31 | + */ | |
| 32 | + onReady: function () { | |
| 33 | + | |
| 34 | + }, | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 生命周期函数--监听页面显示 | |
| 38 | + */ | |
| 39 | + onShow: function () { | |
| 40 | + if (typeof this.getTabBar === 'function' && | |
| 41 | + this.getTabBar()) { | |
| 42 | + this.getTabBar().setData({ | |
| 43 | + selected: 1 | |
| 44 | + }) | |
| 45 | + } | |
| 46 | + }, | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 生命周期函数--监听页面隐藏 | |
| 50 | + */ | |
| 51 | + onHide: function () { | |
| 52 | + | |
| 53 | + }, | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 生命周期函数--监听页面卸载 | |
| 57 | + */ | |
| 58 | + onUnload: function () { | |
| 59 | + | |
| 60 | + }, | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * 页面相关事件处理函数--监听用户下拉动作 | |
| 64 | + */ | |
| 65 | + onPullDownRefresh: function () { | |
| 66 | + | |
| 67 | + }, | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * 页面上拉触底事件的处理函数 | |
| 71 | + */ | |
| 72 | + onReachBottom: function () { | |
| 73 | + | |
| 74 | + }, | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 用户点击右上角分享 | |
| 78 | + */ | |
| 79 | + onShareAppMessage: function () { | |
| 80 | + | |
| 81 | + } | |
| 82 | +}) | |
| 0 | 83 | \ No newline at end of file | ... | ... |
pages/work/work.json
0 → 100644
pages/work/work.wxml
0 → 100644
| 1 | +++ a/pages/work/work.wxml | |
| 1 | +<!--pages/work/work.wxml--> | |
| 2 | +<view class="container"> | |
| 3 | + <!-- tab --> | |
| 4 | + <scroll-view class="tab"> | |
| 5 | + <view class='tab-item {{menuTapCurrent=="0"?"active":""}}' data-current="0" catchtap="menuTap"> | |
| 6 | + <image class="tabicon" src='../../images/tabicon1.png'></image> | |
| 7 | + <view>执行中</view> | |
| 8 | + </view> | |
| 9 | + <view class='tab-item {{menuTapCurrent=="1"?"active":""}}' data-current="1" catchtap="menuTap"> | |
| 10 | + <image class="tabicon" src='../../images/tabicon2.png'></image> | |
| 11 | + <view>待上传</view> | |
| 12 | + </view> | |
| 13 | + <view class='tab-item {{menuTapCurrent=="2"?"active":""}}' data-current="2" catchtap="menuTap"> | |
| 14 | + <image class="tabicon" src='../../images/tabicon3.png'></image> | |
| 15 | + <view>已执行</view> | |
| 16 | + </view> | |
| 17 | + </scroll-view > | |
| 18 | + <!-- tab --> | |
| 19 | + <!-- 执行中 --> | |
| 20 | + <view class="content" hidden="{{menuTapCurrent!='0'}}"> | |
| 21 | + <navigator class="case" url=""> | |
| 22 | + <view class="title">关于工程水质污染案件的调查</view> | |
| 23 | + <text class="level danger">重点</text> | |
| 24 | + <view class="subinfo"> | |
| 25 | + <view>案件编号:鄂[备]202005061120</view> | |
| 26 | + <view>案件地点:汉阳区张家湾街道201号</view> | |
| 27 | + <view>案件类型:环境保护类</view> | |
| 28 | + </view> | |
| 29 | + <view class="time">2020/05/06</view> | |
| 30 | + </navigator> | |
| 31 | + <navigator class="case" url=""> | |
| 32 | + <view class="title">关于化工厂不合格排放烟尘的调查</view> | |
| 33 | + <text class="level warning">一般</text> | |
| 34 | + <view class="subinfo"> | |
| 35 | + <view>案件编号:鄂[备]202005061120</view> | |
| 36 | + <view>案件地点:汉阳区张家湾街道201号</view> | |
| 37 | + <view>案件类型:环境保护类</view> | |
| 38 | + </view> | |
| 39 | + <view class="time">2020/05/06</view> | |
| 40 | + </navigator> | |
| 41 | + </view> | |
| 42 | + <!-- 执行中 --> | |
| 43 | + <!-- 待上传 --> | |
| 44 | + <view class="content" hidden="{{menuTapCurrent!='1'}}"> | |
| 45 | + <navigator class="case" url=""> | |
| 46 | + <view class="title">关于工程水质污染案件的调查</view> | |
| 47 | + <text class="level danger">重点</text> | |
| 48 | + <view class="subinfo"> | |
| 49 | + <view>案件编号:鄂[备]202005061120</view> | |
| 50 | + <view>案件地点:汉阳区张家湾街道201号</view> | |
| 51 | + <view>案件类型:环境保护类</view> | |
| 52 | + </view> | |
| 53 | + <view class="time">2020/05/06</view> | |
| 54 | + </navigator> | |
| 55 | + </view> | |
| 56 | + <!-- 待上传 --> | |
| 57 | + <!-- 已执行 --> | |
| 58 | + <view class="content" hidden="{{menuTapCurrent!='2'}}"> | |
| 59 | + <navigator class="case" url=""> | |
| 60 | + <view class="title">关于化工厂不合格排放烟尘的调查</view> | |
| 61 | + <text class="level warning">一般</text> | |
| 62 | + <view class="subinfo"> | |
| 63 | + <view>案件编号:鄂[备]202005061120</view> | |
| 64 | + <view>案件地点:汉阳区张家湾街道201号</view> | |
| 65 | + <view>案件类型:环境保护类</view> | |
| 66 | + </view> | |
| 67 | + <view class="time">2020/05/06</view> | |
| 68 | + </navigator> | |
| 69 | + </view> | |
| 70 | + <!-- 已执行 --> | |
| 71 | +</view> | ... | ... |
pages/work/work.wxss
0 → 100644
| 1 | +++ a/pages/work/work.wxss | |
| 1 | +/* pages/work/work.wxss */ | |
| 2 | +.tab{ | |
| 3 | + margin-bottom: 20rpx; | |
| 4 | + width: 100%; | |
| 5 | + background-color: #fff; | |
| 6 | + border-bottom: 1rpx solid #e8e8e8; | |
| 7 | +} | |
| 8 | + | |
| 9 | +.tab-item{ | |
| 10 | + display: inline-flex; | |
| 11 | + align-items: center; | |
| 12 | + flex-direction: column; | |
| 13 | + width: calc(100% / 3); | |
| 14 | + padding: 24rpx 0; | |
| 15 | +} | |
| 16 | + | |
| 17 | +.active{ | |
| 18 | + border-bottom: 5rpx solid #35dab5; | |
| 19 | +} | |
| 20 | + | |
| 21 | +.tabicon{ | |
| 22 | + margin-bottom: 20rpx; | |
| 23 | + width: 100rpx; | |
| 24 | + height: 100rpx; | |
| 25 | +} | |
| 26 | + | |
| 27 | +.case{ | |
| 28 | + margin: 24rpx; | |
| 29 | + padding: 24rpx; | |
| 30 | + background-color: #fff; | |
| 31 | + border-radius: 15rpx; | |
| 32 | + position: relative; | |
| 33 | +} | |
| 34 | + | |
| 35 | +.title{ | |
| 36 | + margin-bottom: 10rpx; | |
| 37 | + width: 85%; | |
| 38 | + line-height: 46rpx; | |
| 39 | + white-space: nowrap; | |
| 40 | + overflow: hidden; | |
| 41 | + text-overflow: ellipsis; | |
| 42 | +} | |
| 43 | + | |
| 44 | +.level{ | |
| 45 | + position: absolute; | |
| 46 | + top: 24rpx; | |
| 47 | + right: 24rpx; | |
| 48 | + display: flex; | |
| 49 | + padding: 0 18rpx; | |
| 50 | + color: #fff; | |
| 51 | + font-size: 26rpx; | |
| 52 | + line-height: 46rpx; | |
| 53 | + align-content: center; | |
| 54 | + border-radius: 25rpx; | |
| 55 | +} | |
| 56 | + | |
| 57 | +.danger{ | |
| 58 | + background-color: #f56c6c; | |
| 59 | +} | |
| 60 | + | |
| 61 | +.warning{ | |
| 62 | + background-color: #f0ad4e; | |
| 63 | +} | |
| 64 | + | |
| 65 | +.subinfo{ | |
| 66 | + width: 75%; | |
| 67 | +} | |
| 68 | + | |
| 69 | +.subinfo view{ | |
| 70 | + margin-top: 10rpx; | |
| 71 | + color: #9498a4; | |
| 72 | + font-size: 30rpx; | |
| 73 | + white-space: nowrap; | |
| 74 | + overflow: hidden; | |
| 75 | + text-overflow: ellipsis | |
| 76 | +} | |
| 77 | + | |
| 78 | +.time{ | |
| 79 | + width: 25%; | |
| 80 | + color: #b4b4b4; | |
| 81 | + font-size: 26rpx; | |
| 82 | + text-align: right; | |
| 83 | + position: absolute; | |
| 84 | + right: 24rpx; | |
| 85 | + bottom: 24rpx; | |
| 86 | +} | |
| 0 | 87 | \ No newline at end of file | ... | ... |
project.config.json
0 → 100644
| 1 | +++ a/project.config.json | |
| 1 | +{ | |
| 2 | + "description": "项目配置文件", | |
| 3 | + "packOptions": { | |
| 4 | + "ignore": [] | |
| 5 | + }, | |
| 6 | + "setting": { | |
| 7 | + "urlCheck": true, | |
| 8 | + "es6": true, | |
| 9 | + "postcss": true, | |
| 10 | + "preloadBackgroundData": false, | |
| 11 | + "minified": true, | |
| 12 | + "newFeature": true, | |
| 13 | + "autoAudits": false, | |
| 14 | + "coverView": true, | |
| 15 | + "showShadowRootInWxmlPanel": true, | |
| 16 | + "scopeDataCheck": false | |
| 17 | + }, | |
| 18 | + "compileType": "miniprogram", | |
| 19 | + "libVersion": "2.11.0", | |
| 20 | + "appid": "wx66cca6da45618e42", | |
| 21 | + "projectname": "public_welfare", | |
| 22 | + "debugOptions": { | |
| 23 | + "hidedInDevtools": [] | |
| 24 | + }, | |
| 25 | + "isGameTourist": false, | |
| 26 | + "simulatorType": "wechat", | |
| 27 | + "simulatorPluginLibVersion": {}, | |
| 28 | + "condition": { | |
| 29 | + "search": { | |
| 30 | + "current": -1, | |
| 31 | + "list": [] | |
| 32 | + }, | |
| 33 | + "conversation": { | |
| 34 | + "current": -1, | |
| 35 | + "list": [] | |
| 36 | + }, | |
| 37 | + "game": { | |
| 38 | + "currentL": -1, | |
| 39 | + "list": [] | |
| 40 | + }, | |
| 41 | + "miniprogram": { | |
| 42 | + "current": -1, | |
| 43 | + "list": [] | |
| 44 | + } | |
| 45 | + } | |
| 46 | +} | |
| 0 | 47 | \ No newline at end of file | ... | ... |
sitemap.json
0 → 100644
utils/util.js
0 → 100644
| 1 | +++ a/utils/util.js | |
| 1 | +const formatTime = date => { | |
| 2 | + const year = date.getFullYear() | |
| 3 | + const month = date.getMonth() + 1 | |
| 4 | + const day = date.getDate() | |
| 5 | + const hour = date.getHours() | |
| 6 | + const minute = date.getMinutes() | |
| 7 | + const second = date.getSeconds() | |
| 8 | + | |
| 9 | + return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') | |
| 10 | +} | |
| 11 | + | |
| 12 | +const formatNumber = n => { | |
| 13 | + n = n.toString() | |
| 14 | + return n[1] ? n : '0' + n | |
| 15 | +} | |
| 16 | + | |
| 17 | +module.exports = { | |
| 18 | + formatTime: formatTime | |
| 19 | +} | ... | ... |