|
@ -2,31 +2,24 @@ |
|
|
.container{ |
|
|
.container{ |
|
|
height:100%; |
|
|
height:100%; |
|
|
background:#f6f6f6; |
|
|
background:#f6f6f6; |
|
|
&>.d-search{ |
|
|
|
|
|
.u-tabs{ |
|
|
&>.btns{ |
|
|
margin-top:-20rpx; |
|
|
flex-shrink: 0; |
|
|
} |
|
|
margin:30rpx; |
|
|
.tabs{ |
|
|
display:flex; |
|
|
display:flex; |
|
|
border-radius: 30rpx; |
|
|
flex-wrap: wrap; |
|
|
button{ |
|
|
margin:20rpx -20rpx -15rpx 0; |
|
|
width:50%; |
|
|
text{ |
|
|
color:#999; |
|
|
height:48rpx; |
|
|
&:first-child{ |
|
|
line-height: 48rpx; |
|
|
border-radius: 30rpx 0 0 30rpx; |
|
|
background:rgba(238, 238, 238, 0.4); |
|
|
} |
|
|
color:#999; |
|
|
&:nth-child(2){ |
|
|
font-size:24rpx; |
|
|
border-radius:0 30rpx 30rpx 0; |
|
|
border-radius: 48rpx; |
|
|
} |
|
|
min-width:110rpx; |
|
|
&.active{ |
|
|
padding:0 10rpx; |
|
|
background:#10C176; |
|
|
box-sizing: border-box; |
|
|
color:#fff; |
|
|
text-align: center; |
|
|
|
|
|
transition: all 0.3s; |
|
|
|
|
|
margin:0 20rpx 15rpx 0; |
|
|
|
|
|
&.active{ |
|
|
|
|
|
color:#fff; |
|
|
|
|
|
background:#10C176; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -36,154 +29,59 @@ |
|
|
height:1rpx; |
|
|
height:1rpx; |
|
|
.card{ |
|
|
.card{ |
|
|
margin-top:0; |
|
|
margin-top:0; |
|
|
&>.info{ |
|
|
&>view{ |
|
|
display:flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
&>.plant-xitongxiaoxi{ |
|
|
&+view{ |
|
|
|
|
|
border-top:2rpx solid rgba(216, 216, 216, 0.2); |
|
|
|
|
|
margin-top:20rpx; |
|
|
|
|
|
padding-top:20rpx; |
|
|
|
|
|
} |
|
|
|
|
|
.PA-news{ |
|
|
|
|
|
flex-shrink: 0; |
|
|
|
|
|
width:76rpx; |
|
|
|
|
|
height:76rpx; |
|
|
background:#10C176; |
|
|
background:#10C176; |
|
|
|
|
|
border-radius: 50%; |
|
|
color:#fff; |
|
|
color:#fff; |
|
|
width:90rpx; |
|
|
font-size:40rpx; |
|
|
height:90rpx; |
|
|
|
|
|
line-height: 90rpx; |
|
|
|
|
|
text-align: center; |
|
|
text-align: center; |
|
|
border-radius: 50%; |
|
|
line-height: 76rpx; |
|
|
|
|
|
box-shadow: 0 4rpx 6rpx rgba(0, 0, 0, 0.1); |
|
|
|
|
|
margin-right:20rpx; |
|
|
position:relative; |
|
|
position:relative; |
|
|
margin-right:16rpx; |
|
|
&.unread:after{ |
|
|
&.noRead{ |
|
|
content:""; |
|
|
&:after{ |
|
|
position:absolute; |
|
|
content:""; |
|
|
width:16rpx; |
|
|
position:absolute; |
|
|
height:16rpx; |
|
|
background:red; |
|
|
border-radius: 50%; |
|
|
width:12rpx; |
|
|
top:1rpx; |
|
|
height:12rpx; |
|
|
right:1rpx; |
|
|
border-radius: 50%; |
|
|
background:#EE4949; |
|
|
top:9rpx; |
|
|
|
|
|
right:9rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
&>view{ |
|
|
.content{ |
|
|
flex-grow: 1; |
|
|
flex-grow: 1; |
|
|
width:1rpx; |
|
|
width:1rpx; |
|
|
.title{ |
|
|
.head{ |
|
|
display:flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
text{ |
|
|
justify-content: space-between; |
|
|
&:first-child{ |
|
|
.name{ |
|
|
font-weight: bold; |
|
|
font-size:28rpx; |
|
|
} |
|
|
|
|
|
&:nth-child(2){ |
|
|
|
|
|
margin:0 20rpx 0 18rpx; |
|
|
|
|
|
color:#fff; |
|
|
|
|
|
background:#10C176; |
|
|
|
|
|
border-radius: 4rpx 40rpx 4rpx 40rpx; |
|
|
|
|
|
height:34rpx; |
|
|
|
|
|
line-height: 34rpx; |
|
|
|
|
|
padding:0 10rpx; |
|
|
|
|
|
min-width:80rpx; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
font-size:20rpx; |
|
|
|
|
|
} |
|
|
|
|
|
&:nth-child(3){ |
|
|
|
|
|
margin-left:auto; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
.date{ |
|
|
.tabs{ |
|
|
|
|
|
display:flex; |
|
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
margin:12rpx -18rpx -16rpx 0; |
|
|
|
|
|
text{ |
|
|
|
|
|
border-radius: 44rpx; |
|
|
|
|
|
margin:0 18rpx 16rpx 0; |
|
|
|
|
|
font-size:24rpx; |
|
|
font-size:24rpx; |
|
|
height:44rpx; |
|
|
color:#bbb; |
|
|
line-height: 44rpx; |
|
|
|
|
|
background-position: 20rpx 12rpx; |
|
|
|
|
|
background-repeat: no-repeat; |
|
|
|
|
|
color:rgba(var(--c),1); |
|
|
|
|
|
background-color:rgba(var(--c),0.1); |
|
|
|
|
|
padding-right:20rpx; |
|
|
|
|
|
&.read{ |
|
|
|
|
|
color:#999; |
|
|
|
|
|
font-size:24rpx; |
|
|
|
|
|
margin-left:auto; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.germinate{ |
|
|
|
|
|
--c:15, 194, 119; |
|
|
|
|
|
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAAAXNSR0IArs4c6QAAAYZJREFUKFOdkU1IVHEUxc957yE45YwKSRnUpp24dKELZ4YCMdFNJNWyRdDOr3lBkMzK0PmIEsFVqzDMlRsXBcObaBuCgRjMphREUOq9USqc9z/igGKKMHi3554f955D1DCXC8/aLNu8pNgFoonSqsA5v8m8YQ1+NBZTgcB6AN8oXRF5lYAjaakKuFQcbnfgDEHoAlkHaPlfxYz+vZ37AYGxz+4aoe8S7oIwMhxRuPe+fGdmhzEv9RTA9KEAYAPALwA3INh+ItOMD/ftaMvNOYvWIIC9CszAbjxbOLqcMc+doKV9iR0EegUJ4FcJpSAx9TDqua8rDiYdKa6K+VRO5rZPvv1fBg3eWL9Nzgq4BnEeMCuw2O53Zx6dl9XZENNpq74zuP6nJ78e+ei22nXmQTmRzdcOOLXZWEw9/h3PvL0wIOaNTfiJ7POaAZEvbqsT4okl3QMZGKlEoB+EF8K82936uYjBhfC4hVNkRgujL2jbfYBuEWyu6oIvahPkssL98SD5qnTkOwB+A5pVJ9wdJQAAAABJRU5ErkJggg==); |
|
|
|
|
|
background-size:30rpx 22rpx; |
|
|
|
|
|
padding-left:30rpx+25rpx; |
|
|
|
|
|
} |
|
|
|
|
|
.organ{ |
|
|
|
|
|
--c:248, 203, 54; |
|
|
|
|
|
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAANCAYAAACdKY9CAAAAAXNSR0IArs4c6QAAAQ9JREFUKFOlUrtKA1EQPedeHxERFAQRCYK9GCW7Ivb+hEUqsbONhZVFCm0kYCPoD9gFS4tgYeFVsLBLmyaNWO5qmCOYjYJuksJphnmcmTMPIpPkIXoGuda3f7QEoSVgbyoOd+wH0sfoCKL/DZA0A+IAQLMQhR0moVwHXPFv5cxjuJTTIYHpQhTWmYRYA5O/AjoDUAIw+w+A0AV0QcemmTZIVAFm8+V2sBOjzq2bpnJ+fowTVwTjHtWBlGQATgHcSjgmuTUCkD+6YDVPNWjOj8fhfviWhNZrp12aW1jadbK3yc2n6xEA1QW8kFoF3IqXauy9BJbzCAlqOOpG8hVAi864//0aw473EcrbEt8NqnwCf8mG+U/vRGMAAAAASUVORK5CYII=); |
|
|
|
|
|
background-size:26rpx 24rpx; |
|
|
|
|
|
padding-left:26rpx+25rpx; |
|
|
|
|
|
} |
|
|
} |
|
|
.type{ |
|
|
|
|
|
--c:235, 67, 118; |
|
|
|
|
|
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAASBJREFUKFN9kD0vQ2EYhq/7bUUklUhEYxAMNfsDJk0TGxN/wWJ0EpvExmjpajMYTAaDxSIWg1ERFh/toCGpr55bzkk1qmmf8cl9PR+XqvPRHfY+QRH9KvY2YkXVYmTgEFjCNIBmi8sghv7MSDNtwHapfv8+OlPZ/UhCV4W1wZHJoSpiuAV1AgltxxVJL0nA9ogUCj03YC8iPWBixDiQ/fdS10lz+ZOdsSRULUanwFxfIH0IPhMD2ANIj2rGURzClsT0r5hOS62Rtq8F5aZ9miHMWo4kXXZYSrW2AZ7q942p7MSrklYu5M8Qtz0B7POBz8zCV/Z7+Y3aXi6MHSHV+2xwjZhNiUnsG4I2kC5S4Lm4fqBYxwRWwekJ3aVEdtmi9AMqTJE6K1mcKgAAAABJRU5ErkJggg==); |
|
|
|
|
|
background-size:24rpx 22rpx; |
|
|
|
|
|
padding-left:24rpx+25rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
&>.content{ |
|
|
|
|
|
display:flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
margin-top:10rpx; |
|
|
|
|
|
.fruit,.food{ |
|
|
|
|
|
border-radius: 8rpx; |
|
|
|
|
|
flex-shrink: 0; |
|
|
|
|
|
height:44rpx; |
|
|
|
|
|
line-height: 44rpx; |
|
|
|
|
|
color:rgba(var(--c),1); |
|
|
|
|
|
background:rgba(var(--c),0.1); |
|
|
|
|
|
display:flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
padding:0 5rpx; |
|
|
|
|
|
&:before{ |
|
|
|
|
|
content:""; |
|
|
|
|
|
flex-shrink: 0; |
|
|
|
|
|
margin-right:4rpx; |
|
|
|
|
|
} |
|
|
|
|
|
&:after{ |
|
|
|
|
|
flex-shrink: 0; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
.dec{ |
|
|
.fruit{ |
|
|
font-size:24rpx; |
|
|
--c:248, 203, 54; |
|
|
color:#999; |
|
|
&:before{ |
|
|
margin-top:10rpx; |
|
|
width:29rpx; |
|
|
|
|
|
height:21rpx; |
|
|
|
|
|
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAALCAYAAACgR9dcAAAAAXNSR0IArs4c6QAAAitJREFUKFNVkV1Ik3EUxp//ecdm84ttMFHDGMYSbKaIbTPISTYzeJmDdiNUUhdZVHRRBEUXel1UBN6EF2LRRdEXIyiyG5sGGqkFUYph4i6knBs13Lv3/Z/YcsLOzTk8D7/DwzkCW6WqqtXutodGb40+Kmi5fjAUau/1Jf3js6WvUtoO98SzJy8KvsgN4fBRt6ZJf01D/Tm54bg2MjI0ntM7VLXt5OHkh/6uDXo7VyqjC/VxW+0P7+DpWDzn5+HW1tZql6tlyOl0RyrLa4zllY/Di4uxO2dPlKz2dSQtZhMjnSFMyAak06nUg5n3XU8vpabzcCAQMHn2hpbMZmtFWbnDvLAwuRmPf/r97t7a7u+zOu5SFezLVgQDNthShPJUevpXZu14HgZAp/oH32SySZ+mbaIzMGCdmbwiRnpfA/w/X1bfB8lN0AwdFos0Plds7C/A+Q2NjY325uaeaGXFTn9d7a7E1T1hW05nHUha6mSitIn0kqpMwmTr9B64ObUNHztz/vKh7iMDzCwAJiHIUISuFC7LTBJExBKSAf4yP5fdhtuDYSeb+YYQKGOIhACbpOSXRNTHzA8ZbIWAiyBaWPJ9kOIpiu1Tw9cJsELwOiTapNRuk2JRNWGMKUAdoDgUhoeZ/0iDxopgb09vUFHQzUATwN8YPAWQuvXTOcGoZgEHgPWp6PMLRXAkElFW/moXhUI+SKwKYXxlQd78O0BLzNIuWeiKMA3Hoo9//gNbO95NYH+HjwAAAABJRU5ErkJggg==); |
|
|
|
|
|
} |
|
|
|
|
|
&:after{ |
|
|
|
|
|
content:"水果"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.food{ |
|
|
|
|
|
--c:16, 193, 118; |
|
|
|
|
|
&:before{ |
|
|
|
|
|
width:24rpx; |
|
|
|
|
|
height:24rpx; |
|
|
|
|
|
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAkRJREFUKFM1kF9IU2EYxr/v/Nk52s7cGp45qSTMMbNAmDRFCwSXHOtiSQhGkWVddFEXYRde1FUQNaOrLhIMQS8kb3YROOjCZJFRRoWKiLV0Ttf+tu0c5znnO9+3OELP5fs8P3ifBwIAgL9faldaitf2mwsDwtfaqep1x8zi2/Bn0zshSRzTnYtiQbMxBX4b+np6anK3d34rbRmHGTBln3f/4qa9ravvZxWfz8dqEv9RPaq4IYEl6H3etpC7sHWG0mhClRmCq4wK4AgrTnsWLm97UR5pSlTY9SCXirFVr8Cml63fdHdZZBQLZ9gQYrIWHdWVuZM/GnITxS4vIgS/SMRnP2ysDhVFkYKnRs49Tt5ZHa1ZrMtiq0EohQZyR9r+cCy401slOqPFvzip618eTU1I5rvQL/UfKQTi41qD3FGhgQowUDuXmvaulzz1K0xMrxeL1HqWXYmsVd/8FAlvQpPyDQdu5friIeGnM39X67NpShnJ2i7laSxCwFYBou/DpQT3/Vlo5jwcvHf/qYW3dCqOQqOI7HS78ziLCEZbpU22qZ79PxxIZA24vI1eQenqjdeS1NutaxqgaRZACAEh+CBIUTSoVCoAYwQsHA/m5iLz0H/xUtfQlcF3G7EY73K5AMswwDCMA4BhGIAMA6RSKdDibVbHJycDZgdq+MHosiiKx3jOgmmaIaqqUSbA8xzB2KBUTafT6XR8IvTk9EHps8GBYG3t4THBKgg2wUYnU3/2zLvbVXeoJJewrMhyJpMfiYbfhP8BZDwCZS4yOV4AAAAASUVORK5CYII=); |
|
|
|
|
|
} |
|
|
|
|
|
&:after{ |
|
|
|
|
|
content:"蔬菜"; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.cause,.date{ |
|
|
|
|
|
color:#999; |
|
|
|
|
|
font-size:24rpx; |
|
|
|
|
|
margin-left:16rpx; |
|
|
|
|
|
} |
|
|
|
|
|
.cause{ |
|
|
|
|
|
flex-grow: 1; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -191,43 +89,26 @@ |
|
|
</style> |
|
|
</style> |
|
|
<template> |
|
|
<template> |
|
|
<view class="container flex"> |
|
|
<view class="container flex"> |
|
|
<d-search :btn="false" v-model="searchVal.search" popup ref="dSearch" @search="clean();"> |
|
|
|
|
|
<u-tabs :current="tabIndex" @change="tabIndex=$event.index" :list="[{name:'消息类型'},{name:'作物类型'}]" lineColor="#10C176" :activeStyle="{color:'#10C176'}" :inactiveStyle="{color:'#999'}" :itemStyle="{height:'60rpx'}" lineHeight="6rpx" lineWidth="96rpx"/> |
|
|
<view class="btns shadow bg-white"> |
|
|
<view class="tabs" v-if="tabIndex==0"> |
|
|
<button class="cu-btn bg-white" :class="{active:searchVal.msgType==0}" @click="searchVal.msgType=0">未读</button> |
|
|
<text :class="{active:searchVal.mesType=='病害'}" @click="clean({cropType:'',mesType:'病害'})">病害</text> |
|
|
<button class="cu-btn bg-white" :class="{active:searchVal.msgType==1}" @click="searchVal.msgType=1">已读</button> |
|
|
<text :class="{active:searchVal.mesType=='虫害'}" @click="clean({cropType:'',mesType:'虫害'})">虫害</text> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="tabs" v-else> |
|
|
|
|
|
<text :class="{active:searchVal.cropType=='1610539208847142914'}" @click="clean({cropType:'1610539208847142914',mesType:''});$refs.dSearch.show=false">水果</text> |
|
|
|
|
|
<text :class="{active:searchVal.cropType=='1610539232360411138'}" @click="clean({cropType:'1610539232360411138',mesType:''});$refs.dSearch.show=false">蔬菜</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</d-search> |
|
|
|
|
|
<scroll-view scroll-y @scrolltolower="search"> |
|
|
<scroll-view scroll-y @scrolltolower="search"> |
|
|
<view class="card" v-for="(v,k) in list" :key="k" @click="toDetail(k)"> |
|
|
<view class="card" v-if="list.length>0"> |
|
|
<view class="info"> |
|
|
<view v-for="(v,k) in list" :key="k" @click="toDetail(v)"> |
|
|
<text class="plant-xitongxiaoxi" :class="{noRead:v.readStatus=='2'}"/> |
|
|
<text class="PA-news" :class="{unread:searchVal.msgType==0}"/> |
|
|
<view> |
|
|
<view class="content"> |
|
|
<view class="title"> |
|
|
<view class="head"> |
|
|
<text class="over">{{v.cropName}}</text> |
|
|
<text class="name over">{{v.msgType}}</text> <text class="date">{{v.sendTime}}</text> |
|
|
<text>{{v.messageType}}</text> |
|
|
|
|
|
<text class="plant-youbian"/> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="tabs"> |
|
|
|
|
|
<text class="germinate">{{v.growthProcess_dictText}}</text> |
|
|
|
|
|
<text class="organ">{{v.pestSite_dictText}}</text> |
|
|
|
|
|
<text class="type">{{v.symptom_dictText}}</text> |
|
|
|
|
|
<text class="read">阅读:{{v.readNum}}</text> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="dec over">{{v.msgContent}}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="content"> |
|
|
|
|
|
<text v-if="v.cropType=='水果'" class="fruit"/> |
|
|
|
|
|
<text v-if="v.cropType=='蔬菜'" class="food"/> |
|
|
|
|
|
<text class="cause over">{{v.content}}</text> |
|
|
|
|
|
<text class="date">{{new Date(v.sendTime).format('yyyy/MM/dd')}}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<u-empty :show="list.length<=0" text="未查询到相关信息" width="50%" icon="/static/noData.png"/> |
|
|
<u-empty :show="list.length<=0" text="未查询到相关信息" width="50%" icon="/static/noData.png"/> |
|
|
|
|
|
<view style="border:0.5rpx solid transparent"/> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -238,70 +119,54 @@ export default { |
|
|
return{ |
|
|
return{ |
|
|
tabIndex:0, |
|
|
tabIndex:0, |
|
|
searchVal:{ |
|
|
searchVal:{ |
|
|
|
|
|
companyId:this.$store.getters.userInfo.companyId, |
|
|
|
|
|
msgType:0, |
|
|
pageNo:1, |
|
|
pageNo:1, |
|
|
pageSize:7, |
|
|
pageSize:5, |
|
|
search:"", |
|
|
|
|
|
cropType:"", |
|
|
|
|
|
mesType:"", |
|
|
|
|
|
}, |
|
|
}, |
|
|
list:[], |
|
|
list:[], |
|
|
total:0, |
|
|
total:0, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch:{ |
|
|
|
|
|
'searchVal.msgType'(n){ |
|
|
|
|
|
this.search('pageOne') |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onLoad(){ |
|
|
onLoad(){ |
|
|
this.search() |
|
|
this.search() |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods:{ |
|
|
clean(e){ |
|
|
async search(type){ |
|
|
this.total=0 |
|
|
if(type=='pageOne'){ |
|
|
this.list=[] |
|
|
this.searchVal.pageNo=1 |
|
|
this.searchVal.pageNo=1 |
|
|
this.list=[] |
|
|
if(e){ |
|
|
this.total=0 |
|
|
this.searchVal.cropType=this.searchVal.cropType==e.cropType?'':e.cropType |
|
|
|
|
|
this.searchVal.mesType=this.searchVal.mesType==e.mesType?'':e.mesType |
|
|
|
|
|
} |
|
|
} |
|
|
this.search() |
|
|
if(this.total==0 ||this.list.length<this.total){ |
|
|
}, |
|
|
var res=await request("/suyuan/messageApi/queryMessageList",{ |
|
|
async search(){ |
|
|
method:"post", |
|
|
if(this.total==0||this.list.length<this.total){ |
|
|
body: this.searchVal |
|
|
var res=await request('/api/message/list',{ |
|
|
|
|
|
params: this.searchVal |
|
|
|
|
|
}) |
|
|
}) |
|
|
if(res.statu){ |
|
|
if(res.statu){ |
|
|
this.list=this.list.concat(res.data.records) |
|
|
this.list=this.list.concat(res.data.list) |
|
|
this.total=res.data.total |
|
|
this.total=res.data.total |
|
|
this.searchVal.pageNo++ |
|
|
|
|
|
if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) |
|
|
if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) |
|
|
}else{ |
|
|
}else{ |
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title:"提示", |
|
|
title:"提示", |
|
|
content:res.msg||"获取信息失败!", |
|
|
content:res.msg||"获取消息失败!", |
|
|
showCancel:false, |
|
|
showCancel:false, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
async toDetail(index){ |
|
|
toDetail(e){ |
|
|
var res=await request("/api/message/getById",{params:{id:this.list[index].id}}) |
|
|
uni.navigateTo({ |
|
|
if(res.statu){ |
|
|
url:`/pages/home/newsDetail?type=${e.msgType}&msgType=${this.searchVal.msgType}`, |
|
|
if(this.list[index].readStatus=='2'){ |
|
|
events:{update:()=>this.search('pageOne')} |
|
|
this.list[index].readStatus='1' |
|
|
}) |
|
|
this.$store.state.sysMsgNum-=1 |
|
|
}, |
|
|
} |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url:`/pages/home/newsDetail?intoPage=news`, |
|
|
|
|
|
success(e){ |
|
|
|
|
|
e.eventChannel.emit("detail",res.data) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title:"提示", |
|
|
|
|
|
content:res.msg||"获取信息详情失败!", |
|
|
|
|
|
showCancel:false, |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|