张善主

Merge remote-tracking branch 'origin/main'

... ... @@ -12,4 +12,5 @@ export interface commentInfo {
relType: string;
newsType?: string,
objectType?: string,
userType?: number
}
\ No newline at end of file
... ...
... ... @@ -186,8 +186,11 @@ export struct ZhSingleRow06 {
this.loadImg
? item.operDataList[0]?.commentInfo?.userHeaderUrl
? item.operDataList[0].commentInfo.userHeaderUrl
: $r('app.media.icon_default_head_mater')
: commentViewModel.adjustUserType(item.operDataList[0].commentInfo?.userType)
? $r('app.media.WDAccountOwnerHedaerDefaultIcon')
: $r('app.media.WDAccountDefaultIcon')
: $r('app.media.icon_default_head_mater'))
.width(32)
.height(32)
.borderRadius(16)
... ...
... ... @@ -26,6 +26,7 @@ export default struct MinePageUserSimpleInfoUI {
}else{
this.headPhotoUrl = ""
this.levelHead = ""
this.userType = "1"
}
}
... ... @@ -33,12 +34,20 @@ export default struct MinePageUserSimpleInfoUI {
Row(){
//头像
Stack(){
Image(this.headPhotoUrl)
.alt(this.userType === '1'?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
if (this.headPhotoUrl.length > 0){
Image(this.headPhotoUrl)
.alt(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}else {
Image(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
if(StringUtils.isNotEmpty(this.levelHead)){
Image(this.levelHead)
... ...
import { Action, CompDTO, ContentDTO } from 'wdBean';
import { CommonConstants, ViewType } from 'wdConstant';
import PageViewModel from '../../viewmodel/PageViewModel';
import PageModel from '../../viewmodel/PageModel';
import { Action } from 'wdBean';
import router from '@ohos.router';
import { CardParser } from '../CardParser';
import { channelSkeleton } from '../skeleton/channelSkeleton';
import { ErrorComponent } from '../view/ErrorComponent';
import { EmptyComponent } from '../view/EmptyComponent';
import { listTouchEvent } from '../../utils/PullDownRefresh';
import PageAdModel from '../../viewmodel/PageAdvModel';
import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean';
import RefreshLayout from '../refresh/RefreshLayout';
import PageNoMoreLayout from './PageNoMoreLayout';
import { NoMoreBean } from './NoMoreBean';
import CommonPageTitle from './CommonPageTitle';
import TemplatePageComponent from './template/TemplatePageComponent';
import { TemplatePageConstant } from './template/TemplatePageConstant';
... ...
... ... @@ -38,10 +38,12 @@ export class TemplatePageHelp extends BasePageHelp {
this.treatDiffBusinessDataSource()
} else if (pageModel.compList.size() > 0) {
// 加载缓存数据了,不用无网络提示
this.closeAnimation(this.pageModel.resolve)
} else {
// 无网情况
this.pageModel.pageCompType = TemplatePageStateType.OTHER
this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork
// 无网情况
this.pageModel.pageCompType = TemplatePageStateType.OTHER
this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork
}
}
... ... @@ -293,6 +295,12 @@ export class TemplatePageHelp extends BasePageHelp {
}
}
private closeAnimation(resolve?: (value: string | PromiseLike<string>) => void) {
if (resolve) {
resolve('')
}
}
}
... ...
... ... @@ -44,16 +44,22 @@ export struct CustomPullToRefresh {
this.onRefresh(resolve)
}).then((text) => {
setTimeout(()=>{
// 延时500,展示第二段动画 TODO 是否去掉?
this.refreshState = 3
this.refreshDestroy()
setTimeout(() => {
// 延时500,展示第二段动画 TODO 是否去掉?
if(text){
this.refreshState = 3
setTimeout(() => {
success(text)
}, 500)
setTimeout(() => {
this.refreshState = 4
// 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时
}, 1200)
}else {
success(text)
}, 500)
setTimeout(() => {
this.refreshState = 4
// 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时
}, 1200)
}
},500)
})
});
... ...
... ... @@ -7,7 +7,7 @@
"main": "",
"version": "1.0.0",
"dependencies": {
"@ohos/lottie": "2.0.10",
"@ohos/lottie": "v2.0.11-rc.6",
"wdComponent": "file:../../features/wdComponent",
"wdConstant": "file:../../commons/wdConstant",
"wdKit": "file:../../commons/wdKit",
... ...