Showing
1 changed file
with
12 additions
and
2 deletions
| @@ -154,7 +154,12 @@ export struct FollowListDetailUI { | @@ -154,7 +154,12 @@ export struct FollowListDetailUI { | ||
| 154 | } else { | 154 | } else { |
| 155 | fansNumString = fansNum + "" | 155 | fansNumString = fansNum + "" |
| 156 | } | 156 | } |
| 157 | - this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl, value.attentionUserName, fansNumString, value.introduction, value.attentionCreatorId, "1", value.attentionUserId, value.attentionUserType, value.attentionUserId, value.mainControl, value.banControl, value.authIcon)) | 157 | + let introduction = value.introduction |
| 158 | + if(value.introduction.indexOf("\n") != -1){ | ||
| 159 | + let regex:RegExp = new RegExp('\n','g') | ||
| 160 | + introduction = value.introduction.replace(regex,'') | ||
| 161 | + } | ||
| 162 | + this.data.push(new FollowListDetailItem(value.attentionHeadPhotoUrl, value.attentionUserName, fansNumString, introduction, value.attentionCreatorId, "1", value.attentionUserId, value.attentionUserType, value.attentionUserId, value.mainControl, value.banControl, value.authIcon)) | ||
| 158 | }) | 163 | }) |
| 159 | this.data.notifyDataReload() | 164 | this.data.notifyDataReload() |
| 160 | this.count = this.data.totalCount() | 165 | this.count = this.data.totalCount() |
| @@ -272,7 +277,12 @@ export struct FollowListDetailUI { | @@ -272,7 +277,12 @@ export struct FollowListDetailUI { | ||
| 272 | }) | 277 | }) |
| 273 | 278 | ||
| 274 | result.forEach((item) => { | 279 | result.forEach((item) => { |
| 275 | - this.data.push(new FollowListDetailItem(item.headPhotoUrl, item.cnUserName, item.cnFansNum, item.introduction, item.creatorId, item.status, item.attentionUserId, item.cnUserType, item.cnUserId, item.mainControl, item.banControl, item.authIcon)) | 280 | + let introduction = item.introduction |
| 281 | + if(item.introduction.indexOf("\n") != -1){ | ||
| 282 | + let regex:RegExp = new RegExp('\n','g') | ||
| 283 | + introduction = item.introduction.replace(regex,'') | ||
| 284 | + } | ||
| 285 | + this.data.push(new FollowListDetailItem(item.headPhotoUrl, item.cnUserName, item.cnFansNum, introduction, item.creatorId, item.status, item.attentionUserId, item.cnUserType, item.cnUserId, item.mainControl, item.banControl, item.authIcon)) | ||
| 276 | }) | 286 | }) |
| 277 | 287 | ||
| 278 | this.data.notifyDataReload() | 288 | this.data.notifyDataReload() |
-
Please register or login to post a comment