|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
// pages/user/subpage/system/system.js
|
|
|
|
|
import {http} from '../../../../utils/util'
|
|
|
|
|
import {
|
|
|
|
|
http
|
|
|
|
|
} from '../../../../utils/util'
|
|
|
|
|
Page({
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -18,7 +20,6 @@ Page({
|
|
|
|
|
wx.setNavigationBarTitle({
|
|
|
|
|
title: '系统消息',
|
|
|
|
|
})
|
|
|
|
|
this.getdata()
|
|
|
|
|
},
|
|
|
|
|
getdata() {
|
|
|
|
|
http("/userMessage/list", "post", {
|
|
|
|
@ -27,7 +28,7 @@ Page({
|
|
|
|
|
}).then(res => {
|
|
|
|
|
let array = res.data.records
|
|
|
|
|
for (let index = 0; index < array.length; index++) {
|
|
|
|
|
array[index].createDate = array[index].createDate.replace('T',' ')
|
|
|
|
|
array[index].createDate = array[index].createDate.replace('T', ' ')
|
|
|
|
|
}
|
|
|
|
|
this.setData({
|
|
|
|
|
list: res.data.records,
|
|
|
|
@ -35,9 +36,13 @@ Page({
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
to (e) {
|
|
|
|
|
wx.navigateTo({
|
|
|
|
|
url: '/' + e.currentTarget.dataset.url,
|
|
|
|
|
to(e) {
|
|
|
|
|
http("/userMessage/read", "post", {
|
|
|
|
|
id: e.currentTarget.dataset.id
|
|
|
|
|
}).then(res => {
|
|
|
|
|
wx.navigateTo({
|
|
|
|
|
url: '/' + e.currentTarget.dataset.url,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
@ -51,7 +56,12 @@ Page({
|
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
|
*/
|
|
|
|
|
onShow() {
|
|
|
|
|
|
|
|
|
|
this.setData({
|
|
|
|
|
list: [],
|
|
|
|
|
page: 1,
|
|
|
|
|
max: 0
|
|
|
|
|
})
|
|
|
|
|
this.getdata()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|