Showing
3 changed files
with
19 additions
and
19 deletions
| @@ -16,7 +16,7 @@ export struct MessageListUI { | @@ -16,7 +16,7 @@ export struct MessageListUI { | ||
| 16 | 16 | ||
| 17 | aboutToAppear() { | 17 | aboutToAppear() { |
| 18 | this.msgData = MinePageDatasModel.getMessageData() | 18 | this.msgData = MinePageDatasModel.getMessageData() |
| 19 | - this.getHistoryPush() | 19 | + // this.getHistoryPush() |
| 20 | this.getMessagePush() | 20 | this.getMessagePush() |
| 21 | } | 21 | } |
| 22 | 22 | ||
| @@ -58,19 +58,7 @@ export struct MessageListUI { | @@ -58,19 +58,7 @@ export struct MessageListUI { | ||
| 58 | if(value.subscribeCount > 0){ | 58 | if(value.subscribeCount > 0){ |
| 59 | item.unReadCount = value.subscribeCount | 59 | item.unReadCount = value.subscribeCount |
| 60 | } | 60 | } |
| 61 | - } else if (item.title == "系统消息") { | ||
| 62 | - if (value.systemInfo != null) { | ||
| 63 | - if (value.systemInfo.title) { | ||
| 64 | - item.desc = value.systemInfo.title | ||
| 65 | - } | ||
| 66 | - if (value.systemInfo.time) { | ||
| 67 | - item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.systemInfo.time) + "") | ||
| 68 | - } | ||
| 69 | - } | ||
| 70 | - if(value.systemCount > 0){ | ||
| 71 | - item.unReadCount = value.systemCount | ||
| 72 | - } | ||
| 73 | - }else if(item.title == "互动消息"){ | 61 | + } else if(item.title == "互动消息"){ |
| 74 | if(value.activeCount > 0){ | 62 | if(value.activeCount > 0){ |
| 75 | item.unReadCount = value.activeCount | 63 | item.unReadCount = value.activeCount |
| 76 | } | 64 | } |
| @@ -82,7 +70,19 @@ export struct MessageListUI { | @@ -82,7 +70,19 @@ export struct MessageListUI { | ||
| 82 | item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.activeInfo.time) + "") | 70 | item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.activeInfo.time) + "") |
| 83 | } | 71 | } |
| 84 | } | 72 | } |
| 85 | - } | 73 | + }/*else if (item.title == "系统消息") { |
| 74 | + if (value.systemInfo != null) { | ||
| 75 | + if (value.systemInfo.title) { | ||
| 76 | + item.desc = value.systemInfo.title | ||
| 77 | + } | ||
| 78 | + if (value.systemInfo.time) { | ||
| 79 | + item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.systemInfo.time) + "") | ||
| 80 | + } | ||
| 81 | + } | ||
| 82 | + if(value.systemCount > 0){ | ||
| 83 | + item.unReadCount = value.systemCount | ||
| 84 | + } | ||
| 85 | + }*/ | ||
| 86 | }) | 86 | }) |
| 87 | }).catch((err: Error) => { | 87 | }).catch((err: Error) => { |
| 88 | console.log(TAG, JSON.stringify(err)) | 88 | console.log(TAG, JSON.stringify(err)) |
| @@ -62,7 +62,7 @@ export struct MinePageComponent { | @@ -62,7 +62,7 @@ export struct MinePageComponent { | ||
| 62 | getMessageData(){ | 62 | getMessageData(){ |
| 63 | MinePageDatasModel.getMessageUnReadData().then((value) => { | 63 | MinePageDatasModel.getMessageUnReadData().then((value) => { |
| 64 | if(value !=null) { | 64 | if(value !=null) { |
| 65 | - if(value.activeCount >0 ||value.subscribeCount > 0 || value.systemCount > 0){ | 65 | + if(value.activeCount >0 ||value.subscribeCount > 0 /*|| value.systemCount > 0*/){ |
| 66 | this.personalData.forEach((value) => { | 66 | this.personalData.forEach((value) => { |
| 67 | if(value.msg == "消息") | 67 | if(value.msg == "消息") |
| 68 | value.isShowRedPoint = true | 68 | value.isShowRedPoint = true |
| @@ -112,13 +112,13 @@ class MinePageDatasModel{ | @@ -112,13 +112,13 @@ class MinePageDatasModel{ | ||
| 112 | * 包含名字和图标 | 112 | * 包含名字和图标 |
| 113 | */ | 113 | */ |
| 114 | getMessageData():MessageItem[]{ | 114 | getMessageData():MessageItem[]{ |
| 115 | - if(this.messageData.length === 4){ | 115 | + if(this.messageData.length === 2){ |
| 116 | return this.messageData | 116 | return this.messageData |
| 117 | } | 117 | } |
| 118 | this.messageData.push(new MessageItem($r('app.media.msg_interact'),"互动消息","","")) | 118 | this.messageData.push(new MessageItem($r('app.media.msg_interact'),"互动消息","","")) |
| 119 | this.messageData.push(new MessageItem($r('app.media.msg_reserve'),"预约消息","","")) | 119 | this.messageData.push(new MessageItem($r('app.media.msg_reserve'),"预约消息","","")) |
| 120 | - this.messageData.push(new MessageItem($r('app.media.msg_history'),"历史推送","","")) | ||
| 121 | - this.messageData.push(new MessageItem($r('app.media.msg_system'),"系统消息","","")) | 120 | + // this.messageData.push(new MessageItem($r('app.media.msg_history'),"历史推送","","")) |
| 121 | + // this.messageData.push(new MessageItem($r('app.media.msg_system'),"系统消息","","")) | ||
| 122 | return this.messageData | 122 | return this.messageData |
| 123 | } | 123 | } |
| 124 | 124 |
-
Please register or login to post a comment