| | |
| | | onLoad() { |
| | | help.setPageNavBar("消息记录"); |
| | | $this = this; |
| | | this.requestUserMsgList(1, true); |
| | | this.requestUserMsgList(1, true); |
| | | }, |
| | | onPullDownRefresh() { |
| | | console.log('onPullDownRefresh', new Date()); |
| | |
| | | convertToRichText(list, callback) { |
| | | for (var i = 0; i < list.length; i++) { |
| | | for (var j = 0; j < list[i].contentList.length; j++) { |
| | | help.loadRichTextNode(list[i].contentList[j].content.replace('#theme',getApp().themeColor), function (res) { |
| | | help.loadRichTextNode(list[i].contentList[j].content.replace('#theme', getApp().themeColor), function (res) { |
| | | list[i].contentList[j].content = res; |
| | | if (i == list.length - 1 && j == list[i].contentList.length-1) { |
| | | if (i == list.length - 1 && j == list[i].contentList.length - 1) { |
| | | callback(list); |
| | | } |
| | | }); |
| | |
| | | console.log(res) |
| | | if (res.code == 0) { |
| | | var list = res.data.data; |
| | | console.log("数据:"+ list.length); |
| | | console.log("数据:" + list.length); |
| | | //数据预处理 |
| | | $this.convertToRichText(list, function (list) { |
| | | console.log("富文本转换完成") |
| | |
| | | console.log('scrollMytrip执行异常:', e); |
| | | } |
| | | }, |
| | | //内容点击 |
| | | onContentClick(event) { |
| | | const content = help.getEventParam(event, 'item'); |
| | | if (content.jump) { |
| | | help.jump(content.jump); |
| | | } |
| | | |
| | | }, |
| | | }); |
| | | |