msg.js 552 B

1234567891011121314151617181920212223
  1. import Api from "../../model/api";
  2. import {formatTime} from "../../utils/utils";
  3. const app = getApp();
  4. app.Base({
  5. data: {},
  6. onLoad: function (options) {
  7. },
  8. async requestData() {
  9. const res = await Api.getMsgList({
  10. pageNum: this.pageNum,
  11. pageSize: this.pageSize
  12. });
  13. res.data.rows = res.data.rows.map(item => {
  14. return {
  15. content: item.sendContent || '',
  16. time: formatTime(item.createTime),
  17. }
  18. });
  19. return res;
  20. },
  21. });