|
@@ -4,7 +4,7 @@
|
|
|
<view class="row">
|
|
|
<view class="title">
|
|
|
<view>{{ $t('设备消息') }}</view>
|
|
|
- <view class="bage">{{ item.unread }}</view>
|
|
|
+ <view v-if="item.unread > 0" class="bage">{{ item.unread }}</view>
|
|
|
</view>
|
|
|
<view class="time">{{item.message_date}}</view>
|
|
|
</view>
|
|
@@ -17,7 +17,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="sys-msg-wrap base-wrap">
|
|
|
+ <view style="margin-top: 20rpx;" class="sys-msg-wrap base-wrap">
|
|
|
<view class="title">{{ $t('系统消息') }}</view>
|
|
|
<view class="msg-item" v-for="(item, index) in sysMsgList" :key="index">
|
|
|
<view class="msg">
|
|
@@ -34,6 +34,7 @@
|
|
|
<script>
|
|
|
const config = require('@/common/config.js');
|
|
|
const http = require('@/common/http.js');
|
|
|
+const request = require('@/common/request.js');
|
|
|
const common = require('@/common/common.js');
|
|
|
export default {
|
|
|
data() {
|
|
@@ -47,10 +48,12 @@ export default {
|
|
|
created() {
|
|
|
this.querySysMsgList()
|
|
|
this.queryDeviceMsg()
|
|
|
- // http.postApi(config.API_MESSAGE_DTL, { id: '7' }, res => {
|
|
|
- // })
|
|
|
+ this.readMessage()
|
|
|
},
|
|
|
methods: {
|
|
|
+ async readMessage(){
|
|
|
+ await request.postApi(config.API_MESSAGE_READ_MESSAGE,{msg_type:2,car_id:0})
|
|
|
+ },
|
|
|
toDeviceMsgPage(itemData) {
|
|
|
const { car_id } = itemData
|
|
|
uni.navigateTo({ url: `/pages/message/deviceInfo?car_id=${car_id}` })
|