|
|
@@ -30,9 +30,9 @@ |
|
|
|
<template v-else> |
|
|
|
{{ fomatDate(item.createTime) }} |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
{{item.title}} |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="item.readFlag==0"> |
|
|
|
<view class="notRead"></view> |
|
|
|
</template> |
|
|
@@ -175,16 +175,19 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
updateInit() { |
|
|
|
let obj = { |
|
|
|
messageType: this.list[this.current].id, |
|
|
|
id: uni.getStorageSync('weapp_session_userInfo_data').accountId, |
|
|
|
num: this.pageNum, |
|
|
|
size: this.pageSize |
|
|
|
} |
|
|
|
if (this.current == 0) { |
|
|
|
obj.projectId = uni.getStorageSync('buildingID').id |
|
|
|
} |
|
|
|
uni.request({ |
|
|
|
url: config.service.updateList, |
|
|
|
method: "GET", |
|
|
|
data: { |
|
|
|
messageType: this.list[this.current].id, |
|
|
|
projectId: uni.getStorageSync('buildingID').id, |
|
|
|
id: uni.getStorageSync('weapp_session_userInfo_data').accountId, |
|
|
|
num: this.pageNum, |
|
|
|
size: this.pageSize |
|
|
|
}, |
|
|
|
data: obj, |
|
|
|
header: { |
|
|
|
'content-type': 'application/json', |
|
|
|
'Access-Token': uni.getStorageSync('weapp_session_login_data').token |
|
|
@@ -194,7 +197,7 @@ |
|
|
|
if (this.pageNum != 1) { |
|
|
|
this.updateAnnList = [...this.updateAnnList, ...res.data.data.list.results]; |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
this.updateAnnList = res.data.data.list.results || [] |
|
|
|
} |
|
|
|
} |
|
|
@@ -245,7 +248,7 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
fomatDate(date) { |
|
|
|
if (!date) return '--' |
|
|
|
let arr = date.split(' ') |
|
|
@@ -253,7 +256,7 @@ |
|
|
|
let result = str.split('-') |
|
|
|
return `${result[1]}月${result[2]}日` |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 转换时间 |
|
|
|
getTimeLine(date, type = 1) { |
|
|
|
let resu = '--' |
|
|
@@ -263,10 +266,10 @@ |
|
|
|
let arr = date.split(' ') |
|
|
|
let str = arr[0] |
|
|
|
let result = str.split('-') |
|
|
|
|
|
|
|
|
|
|
|
let m = (time.getMonth() + 1) < 10 ? `0${time.getMonth() + 1}` : (time.getMonth() + 1) |
|
|
|
let d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate() |
|
|
|
|
|
|
|
|
|
|
|
if (type == 1) { |
|
|
|
resu = `${m}.${d}-${result[1]}.${result[2]}` |
|
|
|
} else { |
|
|
@@ -274,7 +277,7 @@ |
|
|
|
} |
|
|
|
return resu |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
change(index) { |
|
|
|
this.current = index; |
|
|
|
this.initPage() |
|
|
|