import Api from "../../model/api"; import {formatTime} from "../../utils/utils"; const app = getApp(); app.Base({ data: {}, onLoad: function (options) { }, async requestData() { const res = await Api.getMsgList({ pageNum: this.pageNum, pageSize: this.pageSize }); res.data.rows = res.data.rows.map(item => { return { content: item.sendContent || '', time: formatTime(item.createTime), } }); return res; }, });