暂态事件处理
This commit is contained in:
19
common/api/message.js
Normal file
19
common/api/message.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import request from '../js/request';
|
||||
import config from '../js/config';
|
||||
|
||||
/**
|
||||
* 已读暂态
|
||||
* @returns {*}
|
||||
*/
|
||||
export function updateStatus(eventIds) {
|
||||
return request({
|
||||
url: 'cs-harmonic-boot/eventUser/updateStatus',
|
||||
method: 'post',
|
||||
header: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: {
|
||||
eventIds
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
timer:null,
|
||||
timer: null,
|
||||
callBack: null,
|
||||
firstCallBack: null,
|
||||
loadedCallback: null,
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
method: 'POST',
|
||||
}).then((res) => {
|
||||
console.warn(res)
|
||||
let resultData = res.data?.list || res.data?.records || []
|
||||
let resultData = res.data?.list || res.data?.records || res.data || []
|
||||
if (this.params.pageNum == 1) {
|
||||
this.data = resultData
|
||||
if (resultData.length == 0 || resultData == 0) {
|
||||
|
||||
@@ -267,6 +267,13 @@ const decodeToken = (token) => {
|
||||
return obj
|
||||
}
|
||||
|
||||
const getDictData = (key) => {
|
||||
let dictData = uni.getStorageSync(cacheKey.dictData)
|
||||
if (dictData) {
|
||||
return dictData.filter((item) => item.code === key)[0]?.children || []
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
validatePhoneNumber,
|
||||
toast,
|
||||
@@ -278,4 +285,5 @@ export default {
|
||||
prePage,
|
||||
loginSuccess,
|
||||
refreshPrePage,
|
||||
getDictData
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user