douaojie

Merge remote-tracking branch 'origin/main'

... ... @@ -17,6 +17,11 @@ export enum EmitterEventId {
// 关注,取消关注
PEOPLE_SHIP_ATTENTION = 7,
// 我的关注 为null
MY_FOLLOW_EMPTY = 8,
// 登录成功
LOGIN_SUCCESS = 8,
// App回到前台
APP_ENTER_FOREGROUD = 100,
... ...
import { EmitterUtils, EmitterEventId, Logger } from 'wdKit/Index'
import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { FollowListItem } from '../../../viewmodel/FollowListItem'
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
... ... @@ -20,16 +21,26 @@ export struct FollowFirstTabsComponent{
})
if(this.controller != null && this.data.length>1 && this.changeIndex === 1){
//个人主页 跳转 关注页 tab 2
let intervalID = setInterval(() => {
this.currentIndex = this.changeIndex
this.controller.changeIndex(this.currentIndex)
clearInterval(intervalID);
}, 500);
this.jumpFollowNextPage()
}
}).catch((err:Error)=>{
console.log(TAG,JSON.stringify(err))
})
EmitterUtils.receiveEvent(EmitterEventId.MY_FOLLOW_EMPTY, (() => {
if(this.controller != null && this.data.length>1 ){
this.jumpFollowNextPage()
}
}))
}
jumpFollowNextPage(){
//个人主页 跳转 关注页 tab 2
let intervalID = setInterval(() => {
this.currentIndex = 1
this.controller.changeIndex(this.currentIndex)
clearInterval(intervalID);
}, 500);
}
@Builder TabBuilder(index: number, item: FollowListItem) {
... ...
import { LazyDataSource, SPHelper, UserDataLocal } from 'wdKit';
import { EmitterEventId, EmitterUtils, LazyDataSource, SPHelper, UserDataLocal } from 'wdKit';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import SearcherAboutDataModel from '../../../model/SearcherAboutDataModel';
import { CreatorDetailRequestItem } from '../../../viewmodel/CreatorDetailRequestItem';
... ... @@ -156,10 +156,12 @@ export struct FollowListDetailUI {
}
this.isLoading = false
this.isGetRequest = true
this.sendFollowMessage()
}).catch((err: Error) => {
console.log(TAG, "请求失败")
this.isGetRequest = true
this.isLoading = false
this.sendFollowMessage()
})
} else {
this.isLoading = false
... ... @@ -167,6 +169,12 @@ export struct FollowListDetailUI {
}
}
sendFollowMessage(){
if(this.count === 0){
EmitterUtils.sendEvent(EmitterEventId.MY_FOLLOW_EMPTY)
}
}
getNewPageData() {
//我的关注列表
if (this.creatorDirectoryId === -1) {
... ...
... ... @@ -284,6 +284,7 @@ export struct HomePageBottomComponent{
if (!this.data_comment || value.list.length == 0){
this.hasMore = false
this.isLoading = false
this.isGetRequest = true
}else{
this.getCommentListStatus(value)
}
... ...
... ... @@ -101,6 +101,7 @@ export struct OtherHomePageBottomCommentComponent {
if (!this.data_comment || value.list.length == 0) {
this.hasMore = false
this.isLoading = false
this.isGetRequest = true
} else {
this.getCommentListStatus(value)
}
... ...
... ... @@ -5,12 +5,14 @@ import { RefreshConstants } from '../../utils/RefreshConstants'
*/
@Component
export default struct NoMoreLayout {
build() {
Row() {
Column() {
Text($r('app.string.footer_text'))
.margin({ left: RefreshConstants.NoMoreLayoutConstant_NORMAL_PADDING })
.fontSize(RefreshConstants.NoMoreLayoutConstant_TITLE_FONT)
.textAlign(TextAlign.Center)
.margin({bottom:40})
}
.width(RefreshConstants.FULL_WIDTH)
.justifyContent(FlexAlign.Center)
... ...
import { Params } from 'wdBean';
import { AppUtils, StringUtils } from 'wdKit/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { CustomTitleUI } from '../reusable/CustomTitleUI';
import { EnvironmentCustomDialog } from './EnvironmentCustomDialog';
const TAG = 'AboutPageUI';
... ... @@ -23,11 +24,11 @@ export struct AboutPageUI {
})
build() {
Navigation() {
// Navigation() {
//滑动区域
this.aboutUi()
}.titleMode(NavigationTitleMode.Mini)
.title('关于')
// }.titleMode(NavigationTitleMode.Mini)
// .title('关于')
}
aboutToAppear() {
... ... @@ -42,6 +43,8 @@ export struct AboutPageUI {
@Builder
aboutUi() {
Column() {
CustomTitleUI({titleName:'关于'})
Image($r('app.media.setting_about_logo'))
.width('278lpx')
.height('154lpx')
... ...
... ... @@ -34,7 +34,7 @@ export class RefreshConstants {
/**
* The refresh and load height.
*/
static readonly CUSTOM_LAYOUT_HEIGHT: number = 90;
static readonly CUSTOM_LAYOUT_HEIGHT: number = 80;
/**
* Full the width.
*/
... ...
... ... @@ -58,10 +58,10 @@ export struct TabLiveComponent {
// 加载更多
ListItem() {
if (this.pageModel.hasMore) {
LoadMoreLayout({
refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage,
this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight)
})
// LoadMoreLayout({
// refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage,
// this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight)
// })
} else {
ListHasNoMoreDataUI()
}
... ... @@ -89,7 +89,7 @@ export struct TabLiveComponent {
if (data.barrageResponses && data.barrageResponses.length > 0) {
/**
* 在直播聊天添加一条新内容逻辑:
判断 oldNewsId:迁移id空 且 直播状态不是预约:"wait"
判断 oldNewsId:迁移id空 且 直播状态不是预约:"wait"
消息内容:
1.头像固定:APP默认头像
2.名称固定:人民日报主持人
... ... @@ -105,22 +105,17 @@ export struct TabLiveComponent {
if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId)
&& this.liveDetailsBean
&& this.liveDetailsBean.liveInfo.liveState != 'wait') {
let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean
liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction
liveRoomItemBeanTemp.senderUserName = '人民日报主持人'
liveRoomItemBeanTemp.pictureUrls = []
liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url)
liveRoomItemBeanTemp.dataType = 'ZH_TEXT_AND_IMAGE_MSG'
let temp = this.liveDetailsBean?.fullColumnImgUrls[0]
if (temp) {
liveRoomItemBeanTemp.pictureResolutions = []
liveRoomItemBeanTemp.pictureResolutions.push(`${temp.height}*${temp.weight}`)
}
this.liveList.push(liveRoomItemBeanTemp)
this.updateLiveListData()
}
}
} else {
this.pageModel.viewType = ViewType.EMPTY;
if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId)
&& this.liveDetailsBean
&& this.liveDetailsBean.liveInfo.liveState != 'wait') {
this.updateLiveListData()
} else {
this.pageModel.viewType = ViewType.EMPTY;
}
}
},
() => {
... ... @@ -128,6 +123,21 @@ export struct TabLiveComponent {
})
}
updateLiveListData() {
let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean
liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction
liveRoomItemBeanTemp.senderUserName = '人民日报主持人'
liveRoomItemBeanTemp.pictureUrls = []
liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url)
liveRoomItemBeanTemp.dataType = 'ZH_TEXT_AND_IMAGE_MSG'
let temp = this.liveDetailsBean?.fullColumnImgUrls[0]
if (temp) {
liveRoomItemBeanTemp.pictureResolutions = []
liveRoomItemBeanTemp.pictureResolutions.push(`${temp.height}*${temp.weight}`)
}
this.liveList.push(liveRoomItemBeanTemp)
}
aboutToDisappear(): void {
}
}
\ No newline at end of file
... ...
import { Logger } from 'wdKit/src/main/ets/utils/Logger'
import { LoginModel } from './LoginModel'
import { LoginBean } from './LoginBean'
import { SPHelper, StringUtils, UserDataLocal } from 'wdKit'
import { EmitterEventId, EmitterUtils, SPHelper, StringUtils, UserDataLocal } from 'wdKit'
import { CheckVerifyBean } from './CheckVerifyBean'
import cryptoFramework from '@ohos.security.cryptoFramework'
import buffer from '@ohos.buffer'
... ... @@ -55,6 +55,7 @@ export class LoginViewModel {
SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)
SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
success(data)
}).catch((error:string) => {
fail(error)
... ... @@ -82,6 +83,7 @@ export class LoginViewModel {
SPHelper.default.saveSync(SpConstants.USER_STATUS, data.status)
SPHelper.default.saveSync(SpConstants.USER_Type, data.userType)
SPHelper.default.saveSync(SpConstants.USER_NAME, data.userName)
EmitterUtils.sendEmptyEvent(EmitterEventId.LOGIN_SUCCESS)
success(data)
}).catch((value: string) => {
fail(value)
... ...