Browse Source

消息页样式修改

jw-featrue-zhanlibiao
mk 2 years ago
parent
commit
4b273c7728
  1. 2
      app.js
  2. BIN
      images/house.png
  3. BIN
      images/resi.png
  4. BIN
      images/satisfaction.png
  5. 10
      pages/index/index.js
  6. 2
      pages/index/index.json
  7. 19
      pages/index/index.wxml
  8. 129
      pages/index/index.wxss
  9. 9
      project.private.config.json
  10. 5
      utils/config.js

2
app.js

@ -26,7 +26,7 @@ App({
userInfo: null,
selected:0,
deviceInfo: {
statusHeight: 20,
statusHeight: 19,
navigationHeight: 40
},
user:{},

BIN
images/house.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

BIN
images/resi.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

BIN
images/satisfaction.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

10
pages/index/index.js

@ -58,6 +58,13 @@ onScrollToLower(e){
}
if(!parm.type) delete parm.type
getIntelligentMessage(parm).then(res=>{
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),
@ -125,7 +132,8 @@ onScrollToLower(e){
handelClickClear(){
clearMessage().then(res=>{
this.setData({
tableData:[]
tableData:[],
pageNo:1
})
this.getIntelligentMessage()
}).catch(err=>{

2
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"

19
pages/index/index.wxml

@ -1,4 +1,4 @@
<view class="header">
<!-- <view class="header">
<image class="header-bg" src="../../images/message/header_bg.jpg" mode="widthFix" />
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
消息
@ -7,9 +7,11 @@
<view class="h2">消息展示平台</view>
<view class="tag"> <image src="../../images/tag.png" mode=""/> 快速查看</view>
</view>
</view>
</view> -->
<official-account></official-account>
<view class="select">
<view>
<view class="bgBule">
<picker mode="selector" range="{{selectList}}" value="{{selectValue}}" bindchange="handleChangeFilter" >
<view >{{selectValue == 1?'居民信息采集':selectValue == 2?'房屋信息采集':selectValue == 3?'社区满意度自查':'全部信息'}}</view>
</picker>
@ -19,13 +21,9 @@
<view class="content">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="card" wx:for="{{tableData}}" wx:key="index" >
<view class="title {{item.readFlag != '1'?'':'gray'}}" >{{item.content}}</view>
<view class="type">
<image src="../../images/resi.png" wx:if="{{item.msgType == 'resident_base_info'}}" mode=""/>
<image src="../../images/house.png" wx:if="{{item.msgType == 'community_house'}}" mode=""/>
<image src="../../images/satisfaction.png" wx:if="{{item.msgType == '2'}}" mode=""/>
<view class="{{item.msgType == 'resident_base_info'?'cyan cyanBg':item.msgType == 'community_house'?'yellow yellowBg':'blue blueBg'}}">{{item.msgType == 'resident_base_info'?'居民信息采集':item.msgType == 'community_house'?'房屋信息采集':'满意度测评'}} </view>
</view>
<view class="left">{{item.createdByName}}</view>
<view class="right">
<view class="top"><text class="title" >{{item.content}}</text> <text class="{{item.readFlag != '1'?'':'gray'}}" style="font-size: 26rpx;">{{item.readFlag != '1'?'未读':'已读'}}</text></view>
<view class="bottom">
<view class="flex_box">
<view wx:if="{{item.msgType == '2'}}">测评打分:</view><view class="{{item.msgType == '2'?'blue':''}}">{{item.deptName || '--'}}</view><view wx:if="{{item.msgType == '2'}}">分</view>
@ -33,6 +31,7 @@
<text>{{item.createdTime}}</text>
</view>
</view>
</view>
<load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}" ></load-more>
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data>
</scroll-view>

129
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;
}

9
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",

5
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() {

Loading…
Cancel
Save