|
@@ -0,0 +1,61 @@
|
|
|
+const _Http = getApp().globalData.http;
|
|
|
+Component({
|
|
|
+ properties: {
|
|
|
+
|
|
|
+ },
|
|
|
+ options: {
|
|
|
+ addGlobalClass: true
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ height: 0,
|
|
|
+ list: [],
|
|
|
+ content: {
|
|
|
+ nocache: true,
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ pageTotal: 1,
|
|
|
+ type: "应用",
|
|
|
+ where: {}
|
|
|
+ },
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.getlist(true)
|
|
|
+ },
|
|
|
+ getlist(init = false) {
|
|
|
+ if (init.detail != undefined) init = init.detail;
|
|
|
+ if (init) this.setData({
|
|
|
+ ['content.pageNumber']: 1
|
|
|
+ })
|
|
|
+ if (this.data.content.pageNumber > this.data.content.pageTotal) return;
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "system.message.Message",
|
|
|
+ "method": "queryMessage",
|
|
|
+ content: this.data.content
|
|
|
+ }).then(res => {
|
|
|
+ this.selectComponent("#ListBox").setHeight("#tabs", this);
|
|
|
+ this.selectComponent('#ListBox').RefreshToComplete();
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ total: res.total,
|
|
|
+ list: (res.pageNumber == 1) ? res.data : this.data.list.concat(res.data),
|
|
|
+ ['content.pageNumber']: res.pageNumber + 1,
|
|
|
+ ['content.pageTotal']: res.pageTotal
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ toDetails(e) {
|
|
|
+ const {
|
|
|
+ item
|
|
|
+ } = e.currentTarget.dataset;
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/index/message/detail?id=' + item.messageid,
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ }
|
|
|
+})
|