diff --git a/app.json b/app.json index 2d545f8..fbd5b69 100644 --- a/app.json +++ b/app.json @@ -30,7 +30,15 @@ "pages": [ "pages/addResi/addResi" ] + }, + { + "root": "subpages/gatherInformation", + "name": "gatherInformation", + "pages": [ + "pages/gatherInformation/gatherInformation" + ] } + ], "window": { "backgroundTextStyle": "light", diff --git a/components/dist/calendar/index.wxml b/components/dist/calendar/index.wxml index b8c791b..b7ba60e 100644 --- a/components/dist/calendar/index.wxml +++ b/components/dist/calendar/index.wxml @@ -1,4 +1,4 @@ - + diff --git a/images/mine/avater.png b/images/mine/avater.png new file mode 100644 index 0000000..5cef557 Binary files /dev/null and b/images/mine/avater.png differ diff --git a/images/mine/cj.png b/images/mine/cj.png new file mode 100644 index 0000000..a8d6d41 Binary files /dev/null and b/images/mine/cj.png differ diff --git a/images/mine/gy.png b/images/mine/gy.png new file mode 100644 index 0000000..d56a26b Binary files /dev/null and b/images/mine/gy.png differ diff --git a/images/mine/hf.png b/images/mine/hf.png new file mode 100644 index 0000000..190a281 Binary files /dev/null and b/images/mine/hf.png differ diff --git a/images/mine/lz.png b/images/mine/lz.png new file mode 100644 index 0000000..0369c25 Binary files /dev/null and b/images/mine/lz.png differ diff --git a/images/mine/password.png b/images/mine/password.png new file mode 100644 index 0000000..2e432ac Binary files /dev/null and b/images/mine/password.png differ diff --git a/images/mine/wgz.png b/images/mine/wgz.png new file mode 100644 index 0000000..43416ff Binary files /dev/null and b/images/mine/wgz.png differ diff --git a/pages/index/index.js b/pages/index/index.js index 0d073ef..4e2872b 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -16,15 +16,15 @@ Page({ }, // 事件处理函数 - onLoad() { + onLoad: async function () { this.setData({ statusHeight: app.globalData.deviceInfo.statusHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight, share:app.globalData.share }) - this.getToken() - this.getIntelligentMessage() - this.getStaffbasicinfo() + await this.getToken() + await this.getIntelligentMessage() + await this.getStaffbasicinfo() }, onScrollToLower(e){ diff --git a/pages/mine/mine.js b/pages/mine/mine.js index c553b9a..d1b86f7 100644 --- a/pages/mine/mine.js +++ b/pages/mine/mine.js @@ -1,18 +1,29 @@ // pages/mine/mine.js +const app = getApp() + Page({ /** * 页面的初始数据 */ data: { - + statusHeight:'', + navigationHeight:'', + agencyName:'', + userName:'' }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { - + this.setData({ + statusHeight: app.globalData.deviceInfo.statusHeight, + navigationHeight: app.globalData.deviceInfo.navigationHeight, + share:app.globalData.share, + agencyName:app.globalData.user.agencyName, + userName:app.globalData.user.realName + }) }, /** @@ -26,7 +37,10 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { - + this.setData({ + agencyName:app.globalData.user.agencyName, + userName:app.globalData.user.realName + }) }, /** @@ -62,5 +76,10 @@ Page({ */ onShareAppMessage() { + }, + handelInformation(){ + wx.navigateTo({ + url: '/subpages/gatherInformation/pages/gatherInformation/gatherInformation', + }) } }) \ No newline at end of file diff --git a/pages/mine/mine.json b/pages/mine/mine.json index 9f5c5e2..7af8b0a 100644 --- a/pages/mine/mine.json +++ b/pages/mine/mine.json @@ -1,4 +1,4 @@ { "usingComponents": {}, - "navigationBarTitleText": "我的" + "navigationStyle": "custom" } \ No newline at end of file diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml index d236877..b5ff901 100644 --- a/pages/mine/mine.wxml +++ b/pages/mine/mine.wxml @@ -1,2 +1,48 @@ -pages/mine/mine.wxml + + + 我的 + + + + + {{userName}} {{agencyName}} + + 网格长 + 楼长 + + + + + + + + + + 我采集的信息 + + + + + + + 我的回访记录 + + + + + + + 修改密码 + + + + + + + 关于 + + + + + diff --git a/pages/mine/mine.wxss b/pages/mine/mine.wxss index 91eea05..9489e24 100644 --- a/pages/mine/mine.wxss +++ b/pages/mine/mine.wxss @@ -1 +1,117 @@ -/* pages/mine/mine.wxss */ \ No newline at end of file +/* pages/mine/mine.wxss */ +page{ + height: 100vh; + width: 100%; + background-color: #f7f7f7; + +} +.header { + width: 100%; + height: 470rpx; + /* position: fixed; + top: 0; + left: 0; + z-index: 1000; */ + background: linear-gradient(180deg, #7DB5FF 0%, #F7F7F7 100%); + overflow: hidden; +} +.header .navigation { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + color: #333333; + font-size: 32rpx; + position: relative; + z-index: 100; +} +.header .navigation image{ + width: 34rpx; + height: 34rpx; + margin-right: 17rpx; +} +.header .content{ + margin:80rpx 0 0; + height: 130rpx; + width: 100%; + padding: 0 30rpx; + box-sizing: border-box; + display: flex; + justify-content: space-around; +} +.header .content .left image{ + width: 120rpx; + height: 120rpx; + border-radius: 50%; +} +.header .content .right{ + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + padding-left: 30rpx; +} +.header .content .right .top b{ + font-size: 36rpx; + font-family: PingFang SC; + color: #000000; +} +.header .content .right .top text{ + margin-left: 19rpx; + padding-left: 19rpx; + height: 31rpx; + font-size: 30rpx; + border-left: 1rpx solid #333333 ; +} +.header .content .right .bto{ + display: flex; + margin-top: 20rpx; +} +.header .content .right .bto view{ + width: fit-content; + padding:7rpx 24rpx 7rpx 17rpx; + height: 46rpx; + display: flex; + align-items: center; + background: #FFFFFF; + border-radius: 46rpx; + font-size: 28rpx; + color: #999; + margin-right: 10rpx; +} +.header .content .right .bto image{ + width: 32rpx; + height: 32rpx; + margin-right: 10rpx; +} +.body{ + padding: 0 20rpx; + height: auto; + position: relative; + top: -100rpx; +} +.body .card { + background-color: #ffffff; + border-radius: 20rpx; + height: auto; +} +.body .card .item{ + height: 100rpx; + display: flex; + align-items: center; + padding: 0 30rpx; + box-sizing: border-box; +} +.body .card .item .left { + flex: 1; + display: flex; +} +.body .card .item .left image{ + width: 40rpx; + height: 40rpx; + margin-right: 22rpx; +} +.body .card .item .right image{ + width: 20rpx; + height: 20rpx; +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index e68b207..e51fbe9 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -56,6 +56,20 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "我的", + "pathName": "pages/mine/mine", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "采集信息", + "pathName": "subpages/gatherInformation/pages/gatherInformation/gatherInformation", + "query": "", + "launchMode": "default", + "scene": null } ] } diff --git a/subpages/addResi/pages/addResi/addResi.wxml b/subpages/addResi/pages/addResi/addResi.wxml index 997bdfc..6433812 100644 --- a/subpages/addResi/pages/addResi/addResi.wxml +++ b/subpages/addResi/pages/addResi/addResi.wxml @@ -115,12 +115,11 @@ 出生日期 - - - {{form.birthday?form.birthday:'请选择'}} - - - + + + {{form.birthday?form.birthday:'请选择'}} + + diff --git a/subpages/gatherInformation/pages/gatherInformation/gatherInformation.js b/subpages/gatherInformation/pages/gatherInformation/gatherInformation.js new file mode 100644 index 0000000..70e2711 --- /dev/null +++ b/subpages/gatherInformation/pages/gatherInformation/gatherInformation.js @@ -0,0 +1,181 @@ +// subpages/gatherInformation/pages/gatherInformation/gatherInformation.js +import { $wuxCalendar } from '../../../../components/dist/index' +import {getCollect} from '../../../../utils/api' +Page({ + + /** + * 页面的初始数据 + */ + data: { + selectList:[['全部信息','居民信息采集','房屋信息采集'],['','新增','修改','删除']], + selectValue:['全部信息',''], + pageSize:10, + pageNo:1, + tableData:[], + lowerThreshold:'10', + loadMoreVisible:false, + loadMoreType: "none", + nodata:false, + visible:false, + typeVal:'', + collectType:'', + form:{ + type: "", + collectType: "", + collectStartDate: "", + collectEndDate: "" + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.getCollect() + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + openCalendar2() { + $wuxCalendar().open({ + value: this.data.value2, + multiple: true, + onChange: (values, displayValues) => { + console.log('onChange', values, displayValues) + this.setData({ + 'form.collectStartDate': displayValues[0], + 'form.collectEndDate': displayValues[1], + }) + }, + }) + }, + getCollect(){ + this.setData({ + loadMoreVisible: true, + nodata: false, + loadMoreType: "more", + }) + const parm = { + type:this.data.form.type, + pageSize:this.data.pageSize, + pageNo:this.data.pageNo, + collectType:this.data.form.collectType, + collectStartDate:this.data.form.collectStartDate, + collectEndDate:this.data.form.collectEndDate + } + console.log(parm); + getCollect(parm).then(res=>{ + this.setData({ + loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none', + tableData: this.data.tableData.concat(res.data.list), + }) + if (this.data.tableData.length == 0) { + this.setData({ + loadMoreVisible: false, + nodata: true + }) + } + }).catch(err=>{ + console.log(err); + this.setData({ + loadMoreVisible: false, + nodata: true, + }) + }) + }, + onScrollToLower(e){ + if (this.data.loadMoreType === 'more') { + this.setData({ + loadMoreVisible: true, + }) + this.data.pageNo += 1 + this.getCollect() + } + }, + onValueChange(e){ + this.setData({ + typeVal: e.detail.selectedIndex[0] === 1 ? 'resi' : e.detail.selectedIndex[0] === 2 ? 'house' : '', + collectTypeVal: e.detail.selectedIndex[1] === 1 ? 'add' : e.detail.selectedIndex[1] === 2 ? 'edit' : e.detail.selectedIndex[1] === 3 ? 'del' : '', + }) + }, + onConfirm(e) { + this.setData({ + typeVal: e.detail.selectedIndex[0] === 1 ? 'resi' : e.detail.selectedIndex[0] === 2 ? 'house' : '', + collectTypeVal: e.detail.selectedIndex[1] === 1 ? 'add' : e.detail.selectedIndex[1] === 2 ? 'edit' : e.detail.selectedIndex[1] === 3 ? 'del' : '', + 'form.type': e.detail.selectedIndex[0] === 1 ? 'resi' : e.detail.selectedIndex[0] === 2 ? 'house' : '', + 'form.collectType':e.detail.selectedIndex[1] === 1 ? 'add' : e.detail.selectedIndex[1] === 2 ? 'edit' : e.detail.selectedIndex[1] === 3 ? 'del' : '', + visible:false, + selectValue:e.detail.selectedValue + }) + }, + handelShow(){ + this.setData({ + visible:true + }) + }, + handelHidden(){ + this.setData({ + visible:false + }) + }, + handleClickfilter(){ + this.setData({ + tableData:[], + pageNo:1 + }) + this.getCollect() + + }, + handelDel(){ + this.setData({ + 'form.collectStartDate':'', + 'form.collectEndDate':'' + }) + } +}) \ No newline at end of file diff --git a/subpages/gatherInformation/pages/gatherInformation/gatherInformation.json b/subpages/gatherInformation/pages/gatherInformation/gatherInformation.json new file mode 100644 index 0000000..c835fb7 --- /dev/null +++ b/subpages/gatherInformation/pages/gatherInformation/gatherInformation.json @@ -0,0 +1,9 @@ +{ + "usingComponents": { + "wux-calendar":"../../../../components/dist/calendar", + "load-more": "../../../../components/loadMore/loadMore", + "no-data": "../../../../components/noData/nodata", + "wux-picker":"../../../../components/dist/picker/index" + }, + "navigationBarTitleText": "我采集的信息" +} \ No newline at end of file diff --git a/subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml b/subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml new file mode 100644 index 0000000..9572d12 --- /dev/null +++ b/subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml @@ -0,0 +1,44 @@ + + + + {{typeVal =='resi'?'居民信息采集':typeVal=='house'?'房屋信息采集':'全部信息'}} , {{collectTypeVal =='add'?'新增':collectTypeVal =='edit'?'修改':collectTypeVal == 'del'?'删除':''}} + + + + + + {{form.collectStartDate}} {{form.collectEndDate}} + 请选择时间 + + + + + + 筛选 + + + + + + {{item.collectType == 'edit'?'修改':item.collectType == 'add'?'新增':'删除'}} {{item.houseName?item.houseName:'--'}} + {{item.orgName}} {{item.collectTime}} + + + + + + + + + + + \ No newline at end of file diff --git a/subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxss b/subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxss new file mode 100644 index 0000000..b63e58d --- /dev/null +++ b/subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxss @@ -0,0 +1,146 @@ +/* subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxss */ +page{ + height: 100vh; + overflow: hidden; + background-color:#f7f7f7 ; +} +.edit{ + background-color: #def7f6; + color:#04B8AD; +} +.add{ + background-color: #e6f0ff; + color: #4F94FF; +} +.del{ + color: #FF783C; + background-color: #ffece3; +} +.search{ + height: 90rpx; + width: 100%; + padding:0 22rpx; + box-sizing: border-box; + background-color: #fff; + display: flex; + align-items: center; + justify-content: space-between; +} +.search image{ + width: 16rpx; + height: 16rpx; +} +.search .filter{ + max-width: 300rpx; + height: 40rpx; + background: rgba(58,128,231,0.16); + border: 1px solid #3A80E7; + border-radius: 40rpx; + display: flex; + align-items: center; + color: #3A80E7 ; + justify-content: space-between; + padding: 13rpx 24rpx 13rpx 20rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.search .box { + flex: 1; + padding: 0 29rpx 0 15rpx; + overflow: hidden; +} +.search .box .date{ + height: 40rpx; + background: rgba(58,128,231,0.16); + border: 1px solid #3A80E7; + border-radius: 40rpx; + padding: 13rpx 24rpx 13rpx 20rpx; + display: flex; + justify-content: space-between; + align-items: center; + color: #3A80E7; +} +.search .box .date .text{ + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +/* */ +.search .btn { + width: 120rpx; + height: 66rpx; + line-height: 66rpx; + background: #3A80E7; + border-radius: 33rpx; + color: #fff; + text-align: center; +} +.body{ + padding: 20rpx; + box-sizing: border-box; + overflow: hidden; +} + +.body .scroll { + height: calc(100vh - 130rpx); + overflow-y: scroll; +} +.body .scroll .content{ + border-radius: 20rpx; + background-color: #fff; + height: auto; +} +.body .scroll .content .item{ + height: 150rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + padding: 30rpx; + border-bottom:1px solid #EAEAEA; +} +.body .scroll .content .item .top{ + display: flex; + align-items: center; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; +} +.body .scroll .content .item .top text{ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.body .scroll .content .item .top .tag{ + width: 80rpx; + height: 36rpx; + line-height: 36rpx; + border-radius: 18rpx; + font-size: 26rpx; + text-align: center; + margin-right: 20rpx; +} +.body .scroll .content .item .bto{ + display: flex; + justify-content: space-between; + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 500; + color: #999999; +} +.body .scroll .content .item .bto .address{ + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.body .scroll .content .item .bto .date{ + width: 265rpx; + height: 20rpx; + font-size: 26rpx; + font-family: PingFang SC; + font-weight: 500; + color: #C1C1C1; +} \ No newline at end of file diff --git a/subpages/gatherInformation/pages/images/del.png b/subpages/gatherInformation/pages/images/del.png new file mode 100644 index 0000000..bc50e58 Binary files /dev/null and b/subpages/gatherInformation/pages/images/del.png differ diff --git a/subpages/gatherInformation/pages/images/down.png b/subpages/gatherInformation/pages/images/down.png new file mode 100644 index 0000000..34d3e7a Binary files /dev/null and b/subpages/gatherInformation/pages/images/down.png differ diff --git a/utils/api.js b/utils/api.js index 4fe3089..828cb27 100644 --- a/utils/api.js +++ b/utils/api.js @@ -25,7 +25,8 @@ module.exports = { getHouseCoding, saveCommunityHouse, updateCommunityHouse, - getClearHouseDeatilById + getClearHouseDeatilById, + getCollect } // 消息列表 function getIntelligentMessage(param){ @@ -130,4 +131,7 @@ function getClearHouseDeatilById (id) { // 房屋编辑 function updateCommunityHouse (parm) { return fly.post(`actual/base/communityHouse/updateCommunityHouse`,parm) -} \ No newline at end of file +} +function getCollect (parm) { + return fly.post(`message/intelligentMessage/collect/page`,parm) +} diff --git a/utils/config.js b/utils/config.js index d3d7484..ba3fce9 100644 --- a/utils/config.js +++ b/utils/config.js @@ -7,16 +7,11 @@ module.exports = { function BASEURL() { // return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 正式环境 - // return 'http://10.10.10.66:9094/epdc-api/api/' // 王童本地环境地址 - // http://219.146.91.110:30801/api //线上测试 return 'http://192.168.1.144/api/' // 测试环境 } function WEBROOT() { - // return 'https://epdc-shibei.elinkservice.cn/epidemic/appraise.html#/cadre-list' // 街道干部评价h5地址 - // return 'http://lihenian.gitee.io/epidemic/appraise.html#/cadre-list' // 街道干部评价h5地址测试环境 - // https://lyljdgs.qingdaoshibei.cn/app/mobileapp/qlsb/index.aspx - return 'https://lyljdgs.qingdaoshibei.cn/app/mobileapp/qlsb/index.aspx'// 2020-05-20 + return 'https://lyljdgs.qingdaoshibei.cn/app/mobileapp/qlsb/index.aspx' } function getToken() {