Showing
7 changed files
with
32 additions
and
17 deletions
| @@ -186,8 +186,11 @@ export struct ZhSingleRow06 { | @@ -186,8 +186,11 @@ export struct ZhSingleRow06 { | ||
| 186 | this.loadImg | 186 | this.loadImg |
| 187 | ? item.operDataList[0]?.commentInfo?.userHeaderUrl | 187 | ? item.operDataList[0]?.commentInfo?.userHeaderUrl |
| 188 | ? item.operDataList[0].commentInfo.userHeaderUrl | 188 | ? item.operDataList[0].commentInfo.userHeaderUrl |
| 189 | - : $r('app.media.icon_default_head_mater') | 189 | + : commentViewModel.adjustUserType(item.operDataList[0].commentInfo?.userType) |
| 190 | + ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') | ||
| 191 | + : $r('app.media.WDAccountDefaultIcon') | ||
| 190 | : $r('app.media.icon_default_head_mater')) | 192 | : $r('app.media.icon_default_head_mater')) |
| 193 | + | ||
| 191 | .width(32) | 194 | .width(32) |
| 192 | .height(32) | 195 | .height(32) |
| 193 | .borderRadius(16) | 196 | .borderRadius(16) |
| @@ -26,6 +26,7 @@ export default struct MinePageUserSimpleInfoUI { | @@ -26,6 +26,7 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 26 | }else{ | 26 | }else{ |
| 27 | this.headPhotoUrl = "" | 27 | this.headPhotoUrl = "" |
| 28 | this.levelHead = "" | 28 | this.levelHead = "" |
| 29 | + this.userType = "1" | ||
| 29 | } | 30 | } |
| 30 | } | 31 | } |
| 31 | 32 | ||
| @@ -33,12 +34,20 @@ export default struct MinePageUserSimpleInfoUI { | @@ -33,12 +34,20 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 33 | Row(){ | 34 | Row(){ |
| 34 | //头像 | 35 | //头像 |
| 35 | Stack(){ | 36 | Stack(){ |
| 37 | + if (this.headPhotoUrl.length > 0){ | ||
| 36 | Image(this.headPhotoUrl) | 38 | Image(this.headPhotoUrl) |
| 37 | - .alt(this.userType === '1'?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')) | 39 | + .alt(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')) |
| 38 | .width(`${this.calcHeight(100)}lpx`) | 40 | .width(`${this.calcHeight(100)}lpx`) |
| 39 | .height(`${this.calcHeight(100)}lpx`) | 41 | .height(`${this.calcHeight(100)}lpx`) |
| 40 | .objectFit(ImageFit.Cover) | 42 | .objectFit(ImageFit.Cover) |
| 41 | .borderRadius(50) | 43 | .borderRadius(50) |
| 44 | + }else { | ||
| 45 | + Image(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')) | ||
| 46 | + .width(`${this.calcHeight(100)}lpx`) | ||
| 47 | + .height(`${this.calcHeight(100)}lpx`) | ||
| 48 | + .objectFit(ImageFit.Cover) | ||
| 49 | + .borderRadius(50) | ||
| 50 | + } | ||
| 42 | 51 | ||
| 43 | if(StringUtils.isNotEmpty(this.levelHead)){ | 52 | if(StringUtils.isNotEmpty(this.levelHead)){ |
| 44 | Image(this.levelHead) | 53 | Image(this.levelHead) |
| 1 | -import { Action, CompDTO, ContentDTO } from 'wdBean'; | ||
| 2 | -import { CommonConstants, ViewType } from 'wdConstant'; | ||
| 3 | -import PageViewModel from '../../viewmodel/PageViewModel'; | ||
| 4 | -import PageModel from '../../viewmodel/PageModel'; | 1 | +import { Action } from 'wdBean'; |
| 5 | import router from '@ohos.router'; | 2 | import router from '@ohos.router'; |
| 6 | -import { CardParser } from '../CardParser'; | ||
| 7 | -import { channelSkeleton } from '../skeleton/channelSkeleton'; | ||
| 8 | -import { ErrorComponent } from '../view/ErrorComponent'; | ||
| 9 | -import { EmptyComponent } from '../view/EmptyComponent'; | ||
| 10 | -import { listTouchEvent } from '../../utils/PullDownRefresh'; | ||
| 11 | import PageAdModel from '../../viewmodel/PageAdvModel'; | 3 | import PageAdModel from '../../viewmodel/PageAdvModel'; |
| 12 | -import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean'; | ||
| 13 | -import RefreshLayout from '../refresh/RefreshLayout'; | ||
| 14 | -import PageNoMoreLayout from './PageNoMoreLayout'; | ||
| 15 | -import { NoMoreBean } from './NoMoreBean'; | ||
| 16 | import CommonPageTitle from './CommonPageTitle'; | 4 | import CommonPageTitle from './CommonPageTitle'; |
| 17 | import TemplatePageComponent from './template/TemplatePageComponent'; | 5 | import TemplatePageComponent from './template/TemplatePageComponent'; |
| 18 | import { TemplatePageConstant } from './template/TemplatePageConstant'; | 6 | import { TemplatePageConstant } from './template/TemplatePageConstant'; |
| @@ -38,10 +38,12 @@ export class TemplatePageHelp extends BasePageHelp { | @@ -38,10 +38,12 @@ export class TemplatePageHelp extends BasePageHelp { | ||
| 38 | this.treatDiffBusinessDataSource() | 38 | this.treatDiffBusinessDataSource() |
| 39 | } else if (pageModel.compList.size() > 0) { | 39 | } else if (pageModel.compList.size() > 0) { |
| 40 | // 加载缓存数据了,不用无网络提示 | 40 | // 加载缓存数据了,不用无网络提示 |
| 41 | + this.closeAnimation(this.pageModel.resolve) | ||
| 41 | } else { | 42 | } else { |
| 42 | // 无网情况 | 43 | // 无网情况 |
| 43 | this.pageModel.pageCompType = TemplatePageStateType.OTHER | 44 | this.pageModel.pageCompType = TemplatePageStateType.OTHER |
| 44 | this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork | 45 | this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork |
| 46 | + | ||
| 45 | } | 47 | } |
| 46 | } | 48 | } |
| 47 | 49 | ||
| @@ -293,6 +295,12 @@ export class TemplatePageHelp extends BasePageHelp { | @@ -293,6 +295,12 @@ export class TemplatePageHelp extends BasePageHelp { | ||
| 293 | } | 295 | } |
| 294 | 296 | ||
| 295 | } | 297 | } |
| 298 | + | ||
| 299 | + private closeAnimation(resolve?: (value: string | PromiseLike<string>) => void) { | ||
| 300 | + if (resolve) { | ||
| 301 | + resolve('') | ||
| 302 | + } | ||
| 303 | + } | ||
| 296 | } | 304 | } |
| 297 | 305 | ||
| 298 | 306 |
| @@ -44,9 +44,10 @@ export struct CustomPullToRefresh { | @@ -44,9 +44,10 @@ export struct CustomPullToRefresh { | ||
| 44 | this.onRefresh(resolve) | 44 | this.onRefresh(resolve) |
| 45 | }).then((text) => { | 45 | }).then((text) => { |
| 46 | setTimeout(()=>{ | 46 | setTimeout(()=>{ |
| 47 | + this.refreshDestroy() | ||
| 47 | // 延时500,展示第二段动画 TODO 是否去掉? | 48 | // 延时500,展示第二段动画 TODO 是否去掉? |
| 49 | + if(text){ | ||
| 48 | this.refreshState = 3 | 50 | this.refreshState = 3 |
| 49 | - this.refreshDestroy() | ||
| 50 | setTimeout(() => { | 51 | setTimeout(() => { |
| 51 | success(text) | 52 | success(text) |
| 52 | }, 500) | 53 | }, 500) |
| @@ -54,6 +55,11 @@ export struct CustomPullToRefresh { | @@ -54,6 +55,11 @@ export struct CustomPullToRefresh { | ||
| 54 | this.refreshState = 4 | 55 | this.refreshState = 4 |
| 55 | // 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时 | 56 | // 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时 |
| 56 | }, 1200) | 57 | }, 1200) |
| 58 | + }else { | ||
| 59 | + success(text) | ||
| 60 | + this.refreshState = 4 | ||
| 61 | + } | ||
| 62 | + | ||
| 57 | },500) | 63 | },500) |
| 58 | }) | 64 | }) |
| 59 | }); | 65 | }); |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | "main": "", | 7 | "main": "", |
| 8 | "version": "1.0.0", | 8 | "version": "1.0.0", |
| 9 | "dependencies": { | 9 | "dependencies": { |
| 10 | - "@ohos/lottie": "2.0.10", | 10 | + "@ohos/lottie": "v2.0.11-rc.6", |
| 11 | "wdComponent": "file:../../features/wdComponent", | 11 | "wdComponent": "file:../../features/wdComponent", |
| 12 | "wdConstant": "file:../../commons/wdConstant", | 12 | "wdConstant": "file:../../commons/wdConstant", |
| 13 | "wdKit": "file:../../commons/wdKit", | 13 | "wdKit": "file:../../commons/wdKit", |
-
Please register or login to post a comment