diff --git a/app.json b/app.json index 8df9b7f..7890cc7 100644 --- a/app.json +++ b/app.json @@ -4,7 +4,8 @@ "pages/caseCheck/caseCheck", "pages/caseReport/caseReport", "pages/caseDetail/caseDetail", - "pages/process/process" + "pages/process/process", + "pages/waitCheck/waitCheck" ], "window":{ "backgroundTextStyle":"light", @@ -18,5 +19,31 @@ "scope.userLocation": { "desc": "你的位置信息将用于小程序位置接口的效果展示" } + }, + "tabBar": { + "color": "#000", + "borderStyle": "black", + "selectedColor": "#fff", + "backgroundColor": "#1089f2", + "list": [ + { + "pagePath": "pages/caseReport/caseReport", + "iconPath": "images/report.png", + "text": "案件上报", + "selectedIconPath": "images/report-on.png" + }, + { + "pagePath": "pages/index/index", + "iconPath": "images/history.png", + "text": "上报历史", + "selectedIconPath": "images/history-on.png" + }, + { + "pagePath": "pages/waitCheck/waitCheck", + "iconPath": "images/check.png", + "text": "待检查", + "selectedIconPath": "images/check-on.png" + } + ] } } diff --git a/images/check-on.png b/images/check-on.png new file mode 100644 index 0000000..1b27daf Binary files /dev/null and b/images/check-on.png differ diff --git a/images/check.png b/images/check.png new file mode 100644 index 0000000..261902a Binary files /dev/null and b/images/check.png differ diff --git a/images/history-on.png b/images/history-on.png new file mode 100644 index 0000000..f0116f3 Binary files /dev/null and b/images/history-on.png differ diff --git a/images/history.png b/images/history.png new file mode 100644 index 0000000..1955fc2 Binary files /dev/null and b/images/history.png differ diff --git a/images/report-on.png b/images/report-on.png new file mode 100644 index 0000000..6287d36 Binary files /dev/null and b/images/report-on.png differ diff --git a/images/report.png b/images/report.png new file mode 100644 index 0000000..3723069 Binary files /dev/null and b/images/report.png differ diff --git a/pages/index/index.js b/pages/index/index.js index 17ee5cf..9328f0e 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -89,64 +89,6 @@ Page({ } }, - // 前往上报 - goReport: function () { - wx.navigateTo({ - url: '../caseReport/caseReport', - }) - }, - // 切换 - changeTab: function (e) { - var cur = e.currentTarget.dataset.tab - if (this.data.tab != cur) { - this.setData({ - tab: cur, - [`page.page`]: 1 - }) - if (cur == '0') { - this.getList() - } else { - this.getCheckList() - } - } - }, - // 获取待检查列表 - getCheckList: function () { - var self = this - wx.showToast({ - title: '加载中', - icon: 'loading' - }) - app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/listpagereportcaseinspectofmine', [app.requestUrl]), self.data.page, { - headers: { - token: self.data.token - } - }, function (code, data) { - if(data.rows.length == 0) { - if (self.data.page.page == 1) { - self.setData({ - areaList: [] - }) - } else { - self.setData({ - [`page.page`] : self.data.page.page - 1 - }) - app.dialog.msg('暂无更多') - return false; - } - } - if (self.data.page.page == 1) { - self.setData({ - areaList: data.rows - }) - } else { - self.setData({ - areaList: self.data.areaList.concat(data.rows) - }) - } - wx.hideToast() - }); - }, /** * 生命周期函数--监听页面加载 */ diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 8f67b34..52a1738 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,7 +1,3 @@ - - 上报历史 - 待检查 - @@ -31,4 +27,4 @@ -案件上报 \ No newline at end of file + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss index c64ae99..9520546 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1,7 +1,7 @@ page{ background: #f2f1f6; } -.tab-box{ +/* .tab-box{ position: fixed; top: 0; left: 0; @@ -24,9 +24,9 @@ page{ font-size: 36rpx; color: #226cd9; border-bottom: 3px solid #226cd9; -} +} */ .list{ - margin-top: 100rpx; + /* margin-top: 100rpx; */ padding: 20rpx 20rpx 0; } .list-box{ diff --git a/pages/waitCheck/waitCheck.js b/pages/waitCheck/waitCheck.js new file mode 100644 index 0000000..c03bb6e --- /dev/null +++ b/pages/waitCheck/waitCheck.js @@ -0,0 +1,141 @@ +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + token: '', + areaList: [], + requestUrl: app.requestUrl, + page: { + page: 1, + rows: 20, + totalPage: 1 + }, + }, + // 查看详情 + goDetail: function (e) { + if (e.currentTarget.dataset.status == '4') { + wx.navigateTo({ + url: '../caseCheck/caseCheck?id=' + e.currentTarget.dataset.id, + }) + } else { + wx.navigateTo({ + url: '../caseDetail/caseDetail?id=' + e.currentTarget.dataset.id, + }) + } + + }, + // 获取待检查列表 + getCheckList: function () { + var self = this + wx.showToast({ + title: '加载中', + icon: 'loading' + }) + app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/listpagereportcaseinspectofmine', [app.requestUrl]), self.data.page, { + headers: { + token: self.data.token + } + }, function (code, data) { + if(data.rows.length == 0) { + if (self.data.page.page == 1) { + self.setData({ + areaList: [] + }) + } else { + self.setData({ + [`page.page`] : self.data.page.page - 1 + }) + app.dialog.msg('暂无更多') + return false; + } + } + if (self.data.page.page == 1) { + self.setData({ + areaList: data.rows + }) + } else { + self.setData({ + areaList: self.data.areaList.concat(data.rows) + }) + } + wx.hideToast() + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var self = this + wx.getStorage({ + key: 'token', + success: function (res) { + self.setData({ + token: res.data + }) + self.getCheckList() + } + }) + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + var self = this + this.setData({ + ['page.page']: 1 + }) + this.getCheckList() + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + var self = this + var pageNum = 'page.page' + self.setData({ + [pageNum]: self.data.page.page + 1 + }) + this.getCheckList() + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/waitCheck/waitCheck.json b/pages/waitCheck/waitCheck.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/waitCheck/waitCheck.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/waitCheck/waitCheck.wxml b/pages/waitCheck/waitCheck.wxml new file mode 100644 index 0000000..52a1738 --- /dev/null +++ b/pages/waitCheck/waitCheck.wxml @@ -0,0 +1,30 @@ + + + + + + + + + {{item.communityName}} + 待受理 + 待立案 + 待下派 + 待处理 + 待检查 + 待结案 + 已归档 + 案件异常 + + + {{item.caseContent}} + + + + + {{item.casePosition}} + + + + + \ No newline at end of file diff --git a/pages/waitCheck/waitCheck.wxss b/pages/waitCheck/waitCheck.wxss new file mode 100644 index 0000000..9520546 --- /dev/null +++ b/pages/waitCheck/waitCheck.wxss @@ -0,0 +1,110 @@ +page{ + background: #f2f1f6; +} +/* .tab-box{ + position: fixed; + top: 0; + left: 0; + right: 0; + height: 100rpx; + display: flex; + background: #fff; + overflow-x: auto; +} +.tab{ + display: flex; + flex: 1; + flex-shrink: 0; + justify-content: center; + align-items: center; + font-size: 30rpx; + box-sizing: border-box; +} +.tab.active{ + font-size: 36rpx; + color: #226cd9; + border-bottom: 3px solid #226cd9; +} */ +.list{ + /* margin-top: 100rpx; */ + padding: 20rpx 20rpx 0; +} +.list-box{ + padding: 20rpx; + background: #fff; + border-radius: 10rpx; + margin-bottom: 20rpx; + display: flex; + justify-content: space-between; +} +.avatar, .avatar image{ + width: 150rpx; + height: 150rpx; +} +.case{ + width: 500rpx; +} +.case-info{ + border-bottom: 1px dashed #EEE; +} +.case-title{ + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; +} +.title{ + font-size: 36rpx; + line-height: 60rpx; + display: inline-block; + max-width: 65%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.status{ + line-height: 60rpx; + display: inline-block; + padding: 0 30rpx; + background: #fff7ec; + color: #fdc36e; + border-radius: 30rpx; +} +.status.green{ + color: #2dfe2e; + background: rgba(45,254,46,0.1) +} +.status.red{ + color: red; + background: rgba(255,0,0,0.1) +} +.case-desc{ + font-size: 28rpx; + color: #888; + margin-bottom: 10rpx; + line-height: 60rpx; +} +.case-postion{ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 28rpx; + color: #108aff; + margin-top: 10rpx; +} +.case-postion image{ + width: 30rpx; + height: 28rpx; +} +.new-case{ + position: fixed; + bottom: 40rpx; + right: 40rpx; + width: 120rpx; + height: 120rpx; + background: #108aff; + color: #fff; + border-radius: 50%; + padding: 20rpx; + box-sizing: border-box; + text-align: center; +} \ No newline at end of file