liyubing

Merge remote-tracking branch 'origin/main'

... ... @@ -53,7 +53,7 @@ export struct Card5Component {
}
)
.aspectRatio(343 / 225)
if (this.titleShowPolicy === 1 || this.titleShowPolicy === null || this.titleShowPolicy === '') {
if (!!this.titleShowPolicy) {
Row()
.borderRadius(
{
... ...
... ... @@ -206,6 +206,7 @@ export struct PeopleShipHomeArticleListComponent {
}
for (const element of listData.list) {
let contentDTO = new ContentDTO()
console.info(TAG, 'element.appStyle'+`${element.appStyle}`)
contentDTO.appStyle = this.changeCommon(element.appStyle)
contentDTO.newsTitle = element.title;
contentDTO.newsSummary = element.description;
... ...
... ... @@ -158,6 +158,7 @@ export struct OperRowListView {
console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList))
// 评论需要数据
/* this.publishCommentModel.targetId = this.contentDetailData.newsId + ''
this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + ''
... ...
... ... @@ -172,6 +172,7 @@ export struct DetailPlayShortVideoPage {
this.queryNewsInfoOfUser()
this.contentTrackingDict()
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
}
contentTrackingDict() {
... ...
... ... @@ -45,7 +45,7 @@ export struct VideoChannelDetail {
@Prop @Watch('autoRefreshChange') autoRefresh: number = 0
@Consume barBackgroundColor: Color
private swiperController: SwiperController = new SwiperController()
@Provide showComment: boolean = false
@Consume showComment: boolean
@Provide windowWidth: number = AppStorage.get<number>('windowWidth') || 0
@Provide windowHeight: number = AppStorage.get<number>('windowHeight') || 0
@Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
... ...
@Entry
@Component
struct Index {
@State message: string = 'Hello World';
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
... ... @@ -24,6 +24,8 @@ struct ChangeBindPhonePage {
lastTime: number = 0
pageShowTime:number = 0;
pageHideTime:number = 0;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
... ... @@ -58,6 +60,7 @@ struct ChangeBindPhonePage {
build() {
Column(){
Column() {
Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
router.back()
... ... @@ -156,6 +159,10 @@ struct ChangeBindPhonePage {
.padding({ left: 25, right: 25 })
}.width('100%').height('100%').alignItems(HorizontalAlign.Start)
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
//发送验证码
... ...
... ... @@ -23,6 +23,8 @@ struct ForgetPasswordPage {
@State pageTitle:string = '找回密码';
@State isForgetPassword: number = 0 //是否是登录页忘记密码过来的,标题不一样
@State codeStateSuccess:boolean=false
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onCodeSend() {
if (this.isCodeSend) {
this.sendVerifyCode()
... ... @@ -43,6 +45,7 @@ struct ForgetPasswordPage {
build() {
Column(){
Column() {
Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
router.back()
... ... @@ -79,6 +82,11 @@ struct ForgetPasswordPage {
.height('100%')
.alignItems(HorizontalAlign.Start)
.backgroundColor(Color.White)
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
aboutToAppear() {
... ...
... ... @@ -27,6 +27,8 @@ const TAG = "LoginPage"
@Entry
@Component
struct LoginPage {
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State codeBtnState: boolean = false
@State timeCount: number = 60
phoneController: TextInputController = new TextInputController()
... ... @@ -104,6 +106,7 @@ struct LoginPage {
}
build() {
Column(){
Stack() {
RelativeContainer() {
... ... @@ -242,8 +245,12 @@ struct LoginPage {
.visibility(this.isProtocol ? Visibility.Visible : Visibility.None)
}.width('100%')
.height('100%')
.height("100%")
.backgroundColor(Color.White)
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
@Builder
... ...
... ... @@ -10,6 +10,8 @@ const TAG = 'LoginProtocolWebview';
@Entry
@Component
struct LoginProtocolWebview {
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
webUrl: string = ''
webviewController: webview.WebviewController = new webview.WebviewController()
userProtocol = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html"
... ... @@ -55,7 +57,7 @@ struct LoginProtocolWebview {
}
build() {
Column(){
Column() {
Row() {
Image($r("app.media.login_back_icon"))
... ... @@ -88,5 +90,9 @@ struct LoginProtocolWebview {
})
.padding({bottom:this.contentID === "2" ? "40lpx" : 0 })
}
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
}
\ No newline at end of file
... ...
... ... @@ -12,6 +12,8 @@ import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/I
@Entry
@Component
struct ModifyPasswordPage {
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
password_old: string = '';
password_new: string = '';
password_new_repeat: string = '';
... ... @@ -64,9 +66,13 @@ struct ModifyPasswordPage {
build() {
Column(){
Column(){
this.TitleBackComponent('')
this.ModifyPasswordLayout()
}
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
... ...
... ... @@ -2,7 +2,7 @@ import ArrayList from '@ohos.util.ArrayList';
import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/Index';
import router from '@ohos.router';
import { LoginViewModel } from './LoginViewModel';
import { CustomToast, DateTimeUtils, Logger, SPHelper, ToastUtils } from 'wdKit';
import { BreakpointSystem, CustomToast, DateTimeUtils, Logger, SPHelper, ToastUtils } from 'wdKit';
import {
SpConstants
} from '../../../../../../../commons/wdNetwork/oh_modules/wdConstant/src/main/ets/constants/SpConstants'
... ... @@ -74,6 +74,19 @@ export struct SettingPasswordPage {
pageHideResetTime:number = 0;
pageShowSetTime:number = 0;
pageHideSetTime:number = 0;
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
private breakpointSystem = new BreakpointSystem();
@State percent:number = 1
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
currentChanged(){
if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
this.percent = 0.7
}else {
this.percent = 1
}
}
onPageShow(): void {
if (this.pageType === 0){//重置密码
... ... @@ -83,6 +96,10 @@ export struct SettingPasswordPage {
}
}
calcHeight(value:number): number{
return value * this.percent
}
onPageHide(): void {
if (this.pageType === 0){
this.pageHideResetTime = DateTimeUtils.getTimeStamp()
... ... @@ -104,7 +121,13 @@ export struct SettingPasswordPage {
}
}
aboutToDisappear(): void {
this.breakpointSystem.unregister();
}
aboutToAppear() {
this.breakpointSystem.register();
this.currentChanged()
let params:SettingPasswordParams = router.getParams() as SettingPasswordParams;
this.pageId = parseInt(params.pageID);
this.getPageListData(this.pageId)
... ... @@ -147,10 +170,48 @@ export struct SettingPasswordPage {
}
build() {
Navigation() {
Column(){
Column(){
this.TitleBackComponent('')
this.settingList() //滑动区域
}.titleMode(NavigationTitleMode.Mini)
.title('')
}
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
@Builder TitleBackComponent(title:string){
RelativeContainer() {
Text(title)
.fontColor('#FF333333')
.fontSize(`${this.calcHeight(18)}`)
.textAlign(TextAlign.Center)
.height(`${this.calcHeight(44)}`)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
right: { anchor: "__container__", align: HorizontalAlign.End },
})
.id('titleContent')
Image($r("app.media.login_back_icon"))
.objectFit(ImageFit.Auto)
.height(`${this.calcHeight(24)}`)
.width(`${this.calcHeight(24)}`)
.margin({
left: `${this.calcHeight(16)}`, top: `${this.calcHeight(8)}`
})
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start },
})
.onClick(() => {
router.back()
})
.id('backImage')
}.height(`${this.calcHeight(44)}`)
}
// 页面布局
... ... @@ -176,7 +237,7 @@ export struct SettingPasswordPage {
})
}
}.width('100%')
.padding({ left:"31lpx",right:"31lpx",top:"131lpx" })
.padding({ left:`${this.calcHeight(31)}lpx`,right:`${this.calcHeight(31)}lpx`,top:`${this.calcHeight(131)}lpx` })
.height('100%')
}
... ... @@ -185,10 +246,10 @@ export struct SettingPasswordPage {
// 标题
@Builder getTitleCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
Column() {
Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(20).maxLines(1)
Text(item.compTitle).fontWeight(FontWeight.Bold).fontSize(`${this.calcHeight(20)}`).maxLines(1)
}
.width('100%')
.height('75lpx')
.height(`${this.calcHeight(75)}lpx`)
.alignItems(alignTitle)
}
... ... @@ -210,12 +271,12 @@ export struct SettingPasswordPage {
})
}
.alignItems(VerticalAlign.Center)
.height('80lpx')
.height(`${this.calcHeight(80)}lpx`)
.backgroundColor('#f5f5f5')
.borderRadius('4vp')
.borderRadius(`${this.calcHeight(4)}`)
}
.width('100%')
.height('110lpx')
.height(`${this.calcHeight(110)}lpx`)
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
}
... ... @@ -235,12 +296,12 @@ export struct SettingPasswordPage {
})
}
.alignItems(VerticalAlign.Center)
.height('80lpx')
.height(`${this.calcHeight(80)}lpx`)
.backgroundColor('#f5f5f5')
.borderRadius('4vp')
.borderRadius(`${this.calcHeight(4)}`)
}
.width('100%')
.height('110lpx')
.height(`${this.calcHeight(110)}lpx`)
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
}
... ... @@ -249,7 +310,7 @@ export struct SettingPasswordPage {
@Builder getCodeCell(item: AccoutPageDataModel) {
Row() {
Stack() {
Image($r('app.media.get_code_bg')).width('100%').borderRadius('4vp')
Image($r('app.media.get_code_bg')).width('100%').borderRadius(`${this.calcHeight(4)}`)
Row() {
TextInput({ placeholder: item.inputPlacholder })
.placeholderColor("#CCCCCC")
... ... @@ -264,10 +325,10 @@ export struct SettingPasswordPage {
.fontColor('#da3e22')
}
.width('100%')
}.height('80lpx')
}.height(`${this.calcHeight(80)}lpx`)
}
.width('100%')
.height('110lpx')
.height(`${this.calcHeight(110)}lpx`)
.backgroundColor(0xffffff0)
.alignItems(VerticalAlign.Center)
}
... ... @@ -275,7 +336,7 @@ export struct SettingPasswordPage {
// desc
@Builder getDescCell(item: AccoutPageDataModel, alignTitle: HorizontalAlign) {
Column() {
Text(item.compDesc).fontSize(12).maxLines(3).fontColor(0x999999).padding({top:'10lpx'})
Text(item.compDesc).fontSize(`${this.calcHeight(12)}`).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`})
.onClick(()=>{
if (item.compDesc == '忘记密码') {
this.showToastTip('密码不符合密码规范')
... ... @@ -283,7 +344,7 @@ export struct SettingPasswordPage {
})
}
.width('100%')
.height('85lpx')
.height(`${this.calcHeight(85)}lpx`)
.alignItems(alignTitle)
}
... ... @@ -293,29 +354,29 @@ export struct SettingPasswordPage {
Text(item.compButtonTitle)
.layoutWeight(1)
.fontColor("#FFFFFF")
.borderRadius(4)
.fontSize(18)
.borderRadius(`${this.calcHeight(4)}`)
.fontSize(`${this.calcHeight(18)}`)
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.margin({ top: 26 })
.height(44)
.margin({ top: `${this.calcHeight(26)}` })
.height(`${this.calcHeight(44)}`)
.backgroundColor("#ED2800")
.enabled(this.btnStatus ? true : false)
.opacity(this.btnStatus ? 1: 0.6)
.onClick(() => {
this.buttonClick()
})
}.padding({top:'25lpx'})
}.padding({top:`${this.calcHeight(25)}lpx`})
.width('100%')
}
// 标题
@Builder getLogoCell(item: AccoutPageDataModel) {
Column() {
Image(item.compLogo).height('150lpx').width('150lpx')
Image(item.compLogo).height(`${this.calcHeight(150)}lpx`).width(`${this.calcHeight(150)}lpx`)
}
.width('100%')
.height('200lpx')
.height(`${this.calcHeight(200)}lpx`)
}
/***************************** 事件处理 ******************************************/
... ...
... ... @@ -24,6 +24,8 @@ struct VerifyPhoneNumberPage {
isFirst:boolean=true//是否第一次获取验证码
pageShowTime:number = 0;
pageHideTime:number = 0;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onCodeSend() {
if (this.isCodeSend) {
... ... @@ -60,6 +62,7 @@ struct VerifyPhoneNumberPage {
build() {
Column(){
Column() {
Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
router.back()
... ... @@ -155,6 +158,9 @@ struct VerifyPhoneNumberPage {
}.padding({ left: 25, right: 25 }).width('100%')
}.width('100%').height('100%').alignItems(HorizontalAlign.Start)
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
//发送验证码
... ...
{
"src": [
"pages/Index",
"pages/login/LoginPage",
"pages/login/ForgetPasswordPage",
"pages/login/LoginProtocolWebview",
... ...
... ... @@ -32,6 +32,7 @@ export struct VideoChannelPage {
@State indicatorWidth: number = 0
// 传递给page的自动刷新通知
@State autoRefresh2Page: number = 0
@Provide showComment: boolean = false
aboutToAppear(): void {
this.setBarBackgroundColor()
console.log(TAG, 'aboutToAppear')
... ...