12345678910111213141516171819202122232425262728 |
- import httpRequestApi from '../../../utils/APIClient';
- import {
- formatDate
- } from '../../../utils/util';
- Page({
- data: {
- messageList: []
- },
- onLoad: function (options) {
- wx.setNavigationBarTitle({
- title: '消息列表'
- })
- httpRequestApi.getMessageList(1, 10).success((res) => {
- res.data.data.list.forEach( item => {
- item.gmtCreated = formatDate(item.gmtCreated,1)
- })
- this.setData({
- messageList: res.data.data.list
- })
- httpRequestApi.refreshMessageStatus().success((res)=>{
- console.log(res)
- })
- });
- },
- // onHide: function(){
-
- // }
- })
|