import Api from "../../model/api"; import {formatTime, getEventParam} from "../../utils/utils"; const app = getApp(); app.Base({ data: { }, onLoad(options){ this.noInit = true; console.log("数据",this.noInit) }, async bindLogin(e){ const isLogin = getEventParam(e,"isLogin") if (isLogin) { await this.resetData(this); } }, 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; }, });