diff --git a/app.js b/app.js index 485f0f5..fb4fb95 100644 --- a/app.js +++ b/app.js @@ -26,7 +26,7 @@ App({ userInfo: null, selected:0, deviceInfo: { - statusHeight: 20, + statusHeight: 19, navigationHeight: 40 }, user:{}, diff --git a/images/house.png b/images/house.png deleted file mode 100644 index 3efaf53..0000000 Binary files a/images/house.png and /dev/null differ diff --git a/images/resi.png b/images/resi.png deleted file mode 100644 index d97ccce..0000000 Binary files a/images/resi.png and /dev/null differ diff --git a/images/satisfaction.png b/images/satisfaction.png deleted file mode 100644 index 986d407..0000000 Binary files a/images/satisfaction.png and /dev/null differ diff --git a/pages/index/index.js b/pages/index/index.js index c1e109e..3db7543 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -58,10 +58,17 @@ onScrollToLower(e){ } if(!parm.type) delete parm.type getIntelligentMessage(parm).then(res=>{ - this.setData({ + res.data.list = res.data.list.map(item => { + if (item.createdByName && item.createdByName.length === 3) { + item.createdByName = item.createdByName.slice(1); + } + return item; + }); + + 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, @@ -125,7 +132,8 @@ onScrollToLower(e){ handelClickClear(){ clearMessage().then(res=>{ this.setData({ - tableData:[] + tableData:[], + pageNo:1 }) this.getIntelligentMessage() }).catch(err=>{ diff --git a/pages/index/index.json b/pages/index/index.json index ae7b1fa..614568f 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -1,10 +1,10 @@ { - "navigationStyle": "custom", "usingComponents": { "load-more": "../../components/loadMore/loadMore", "no-data": "../../components/noData/nodata", "custom-tab-bar":"../../components/custom-tab-bar" }, + "navigationBarTitleText": "消息", "enablePullDownRefresh": true, "backgroundColor": "#f8f8f8", "backgroundTextStyle": "dark" diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 665af4f..8aa50d8 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,4 +1,4 @@ - + + + - + {{selectValue == 1?'居民信息采集':selectValue == 2?'房屋信息采集':selectValue == 3?'社区满意度自查':'全部信息'}} @@ -19,19 +21,16 @@ - {{item.content}} - - - - - {{item.msgType == 'resident_base_info'?'居民信息采集':item.msgType == 'community_house'?'房屋信息采集':'满意度测评'}} + {{item.createdByName}} + + {{item.content}} {{item.readFlag != '1'?'未读':'已读'}} + + + 测评打分:{{item.deptName || '--'}} + + {{item.createdTime}} + - - - 测评打分:{{item.deptName || '--'}} - - {{item.createdTime}} - diff --git a/pages/index/index.wxss b/pages/index/index.wxss index dd51f49..c9e506e 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -5,60 +5,7 @@ page { overflow: hidden; background-color: #f7f7f7; } -.header { - width: 100%; - height: 464rpx; - /* position: fixed; - top: 0; - left: 0; - z-index: 1000; */ -} -.header .header-bg { - width: 100%; - height: 444rpx; - position: absolute; - height: 100%; - z-index: -999; -} -.header .navigation { - width: 100%; - display: flex; - align-items: center; - justify-content: center; - color: #333333; - font-size: 32rpx; - position: relative; - z-index: 100; -} -.header .content{ - margin: 140rpx 0 0 69rpx; -} -.header .content .h2{ - font-size: 44rpx; - font-family: PingFang SC; - font-weight: 800; - color: #333333; - margin-bottom: 40rpx; -} -.header .content .tag{ - width: 170rpx; - height: 50rpx; - position: relative; - line-height: 48rpx; - font-size: 28rpx; - font-family: PingFang SC; - font-weight: 500; - color: #FFFFFF; - padding-left: 15rpx; -} -.header .content .tag image { - width: 170rpx; - height: 50rpx; - position: absolute; - top: 0; - left: 0; - z-index: -888; -} + .select{ width: 100%; height: 90rpx; @@ -95,22 +42,22 @@ page { .content{ width: 100%; padding:0 20rpx ; + margin-top: 20rpx; box-sizing: border-box; } .content .scroll { - height: calc(100vh - 670rpx); + height: calc(100vh - 120rpx); overflow-y: scroll; } .content .card{ width: 100%; background-color: #fff; display: flex; - height: 236rpx; - flex-direction: column; + height: 168rpx; border-radius: 20rpx; - padding: 0 30rpx; + padding: 34rpx 30rpx; box-sizing: border-box; - margin-top: 20rpx; + border-bottom: 1px solid #EAEAEA; overflow: hidden; } .blue{ @@ -134,47 +81,63 @@ page { .gray{ color: #999999 !important; } -.content .card .title{ - font-size: 32rpx; - height: 90rpx; - line-height: 90rpx; - border-bottom: 1px solid #EAEAEA; +.content .card .left{ + width: 100rpx; + height: 100rpx; + background: linear-gradient(0deg, #3E8DF8 0%, #68A8FD 100%); + border-radius: 20rpx; + color:#fff ; + font-size: 28rpx; font-family: PingFang SC; font-weight: 500; - color: #333333; - margin-bottom: 24rpx; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + text-align: center; + line-height: 100rpx; } - -.content .card .type { - width: fit-content; +.content .card .right{ + flex: 1; + overflow: hidden; display: flex; - font-size: 26rpx; - border-radius: 25rpx; - background-color: rgba(56,189,253,0.1); - padding: 8rpx 15rpx; + flex-direction: column; + justify-content: space-between; + overflow: hidden; + margin-left: 24rpx; } -.content .type image { - width: 30rpx; - height: 30rpx; +.content .card .right .top{ + display: flex; + align-items: center; + justify-content: space-between; } -.content .card .type text{ +.content .card .right .title{ + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + width: calc(100% - 80rpx); } -.content .card .bottom{ + + +.content .card .right .bottom{ display: flex; justify-content: space-between; align-items: center; font-size: 28rpx; font-family: PingFang SC; color: #999999; - margin-top: 27rpx; } -.content .card .bottom .flex_box{ +.content .card .right .bottom .flex_box{ display: flex; justify-content: left; +} +.bgBule{ + background-color: #dfebfb; + border: 1px solid #3A80E7; + border-radius: 32rpx; + padding:10rpx 20rpx; + box-sizing: border-box; +} +.bgBule image{ + margin-left: 50rpx !important; } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 49283cd..865cbda 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -3,11 +3,18 @@ "projectname": "epmet-work-minniprogram", "setting": { "compileHotReLoad": false, - "urlCheck": true + "urlCheck": false }, "condition": { "miniprogram": { "list": [ + { + "name": "", + "pathName": "pages/index/index", + "query": "", + "launchMode": "default", + "scene": 1011 + }, { "name": "查询结果", "pathName": "subpages/searchResult/pages/searchResult/searchResult", diff --git a/utils/config.js b/utils/config.js index f262e68..112bfab 100644 --- a/utils/config.js +++ b/utils/config.js @@ -6,9 +6,8 @@ module.exports = { }; function BASEURL() { - // return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 正式环境 - return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 - // return 'http://192.168.1.144/api/' //测试环境 + // return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 + return 'http://192.168.1.144/api/' //测试环境 } function WEBROOT() {