Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
6 changed files
with
53 additions
and
5 deletions
| @@ -46,6 +46,8 @@ export struct RmhTitle { | @@ -46,6 +46,8 @@ export struct RmhTitle { | ||
| 46 | .maxLines(1) | 46 | .maxLines(1) |
| 47 | .alignSelf(ItemAlign.Start) | 47 | .alignSelf(ItemAlign.Start) |
| 48 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 48 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 49 | + .textAlign(TextAlign.Start) | ||
| 50 | + .width('70%') | ||
| 49 | } | 51 | } |
| 50 | } | 52 | } |
| 51 | 53 |
| @@ -324,6 +324,27 @@ export struct HomePageBottomComponent{ | @@ -324,6 +324,27 @@ export struct HomePageBottomComponent{ | ||
| 324 | data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,commentContent,item.likeNum,0,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus,item.checkStatus,parentCommentContent,parentCommentUserName)) | 324 | data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,commentContent,item.likeNum,0,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus,item.checkStatus,parentCommentContent,parentCommentUserName)) |
| 325 | }) | 325 | }) |
| 326 | 326 | ||
| 327 | + if(status.commentIdList.length === 0){ | ||
| 328 | + data.forEach((item)=>{ | ||
| 329 | + let publishTime = DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime,DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) | ||
| 330 | + this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,publishTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus,item.checkStatus,item.parentCommentContent,item.parentCommentUserName)) | ||
| 331 | + }) | ||
| 332 | + | ||
| 333 | + this.data_comment.notifyDataReload() | ||
| 334 | + | ||
| 335 | + this.count = this.data_comment.totalCount() | ||
| 336 | + this.commentNum = value.totalCount | ||
| 337 | + if (this.data_comment.totalCount() < value.totalCount) { | ||
| 338 | + this.curPageNum++ | ||
| 339 | + }else { | ||
| 340 | + this.hasMore = false | ||
| 341 | + } | ||
| 342 | + | ||
| 343 | + this.isLoading = false | ||
| 344 | + this.isGetRequest = true | ||
| 345 | + return | ||
| 346 | + } | ||
| 347 | + | ||
| 327 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ | 348 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ |
| 328 | newValue.forEach((item)=>{ | 349 | newValue.forEach((item)=>{ |
| 329 | data.forEach((list)=>{ | 350 | data.forEach((list)=>{ |
| @@ -139,6 +139,27 @@ export struct OtherHomePageBottomCommentComponent { | @@ -139,6 +139,27 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 139 | data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, parentCommentUserName)) | 139 | data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, parentCommentUserName)) |
| 140 | }) | 140 | }) |
| 141 | 141 | ||
| 142 | + if(status.commentIdList.length === 0){ | ||
| 143 | + data.forEach((item) => { | ||
| 144 | + this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, item.parentCommentContent, item.parentCommentUserName)) | ||
| 145 | + }) | ||
| 146 | + | ||
| 147 | + this.data_comment.notifyDataReload() | ||
| 148 | + | ||
| 149 | + this.count = this.data_comment.totalCount() | ||
| 150 | + this.commentNum = value.totalCount | ||
| 151 | + if (this.data_comment.totalCount() < value.totalCount) { | ||
| 152 | + this.curPageNum++ | ||
| 153 | + } else { | ||
| 154 | + this.hasMore = false | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + this.isLoading = false | ||
| 158 | + this.isGetRequest = true | ||
| 159 | + return | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + | ||
| 142 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status, getContext(this)).then((newValue) => { | 163 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status, getContext(this)).then((newValue) => { |
| 143 | newValue.forEach((item) => { | 164 | newValue.forEach((item) => { |
| 144 | data.forEach((list) => { | 165 | data.forEach((list) => { |
| @@ -81,9 +81,9 @@ export struct AccountAndSecurityLayout { | @@ -81,9 +81,9 @@ export struct AccountAndSecurityLayout { | ||
| 81 | 81 | ||
| 82 | // 收到eventId为1的事件后执行该回调 | 82 | // 收到eventId为1的事件后执行该回调 |
| 83 | let callback = (eventData: emitter.EventData): void => { | 83 | let callback = (eventData: emitter.EventData): void => { |
| 84 | - promptAction.showToast({ | ||
| 85 | - message: JSON.stringify(eventData) | ||
| 86 | - }); | 84 | + // promptAction.showToast({ |
| 85 | + // message: JSON.stringify(eventData) | ||
| 86 | + // }); | ||
| 87 | if(eventData&&eventData.data){ | 87 | if(eventData&&eventData.data){ |
| 88 | this.listData[0].subTitle = eventData.data['content'] | 88 | this.listData[0].subTitle = eventData.data['content'] |
| 89 | } | 89 | } |
| @@ -184,6 +184,10 @@ struct ForgetPasswordPage { | @@ -184,6 +184,10 @@ struct ForgetPasswordPage { | ||
| 184 | this.loginViewModel.changeBindPhone(this.phoneContent,this.codeContent).then(()=>{ | 184 | this.loginViewModel.changeBindPhone(this.phoneContent,this.codeContent).then(()=>{ |
| 185 | ToastUtils.shortToast('绑定成功') | 185 | ToastUtils.shortToast('绑定成功') |
| 186 | this.querySecurity() | 186 | this.querySecurity() |
| 187 | + }).catch((message: string) => { | ||
| 188 | + if (message != '') { | ||
| 189 | + ToastUtils.shortToast(message) | ||
| 190 | + } | ||
| 187 | }) | 191 | }) |
| 188 | } | 192 | } |
| 189 | 193 |
| @@ -171,8 +171,8 @@ export class LoginViewModel { | @@ -171,8 +171,8 @@ export class LoginViewModel { | ||
| 171 | return new Promise<object>((success, fail) => { | 171 | return new Promise<object>((success, fail) => { |
| 172 | this.loginModel.changeBindPhone(phone, verificationCode).then((data: object) => { | 172 | this.loginModel.changeBindPhone(phone, verificationCode).then((data: object) => { |
| 173 | success(data) | 173 | success(data) |
| 174 | - }).catch(() => { | ||
| 175 | - fail() | 174 | + }).catch((message: string) => { |
| 175 | + fail(message) | ||
| 176 | }) | 176 | }) |
| 177 | }) | 177 | }) |
| 178 | } | 178 | } |
-
Please register or login to post a comment