liyubing

Merge remote-tracking branch 'origin/main'

@@ -50,6 +50,7 @@ export struct HomePageBottomCommentComponent { @@ -50,6 +50,7 @@ export struct HomePageBottomCommentComponent {
50 CustomPullToRefresh({ 50 CustomPullToRefresh({
51 alldata:this.data_comment, 51 alldata:this.data_comment,
52 scroller:this.scroller, 52 scroller:this.scroller,
  53 + hasMore:this.hasMore,
53 customList:()=>{ 54 customList:()=>{
54 this.ListLayout() 55 this.ListLayout()
55 }, 56 },
@@ -184,7 +185,7 @@ export struct HomePageBottomCommentComponent { @@ -184,7 +185,7 @@ export struct HomePageBottomCommentComponent {
184 185
185 this.count = this.data_comment.totalCount() 186 this.count = this.data_comment.totalCount()
186 this.commentNum = value.totalCount 187 this.commentNum = value.totalCount
187 - if (this.data_comment.totalCount() < value.totalCount) { 188 + if (value.pageNum === 1) {
188 this.curPageNum++ 189 this.curPageNum++
189 } else { 190 } else {
190 this.hasMore = false 191 this.hasMore = false
@@ -217,7 +218,7 @@ export struct HomePageBottomCommentComponent { @@ -217,7 +218,7 @@ export struct HomePageBottomCommentComponent {
217 218
218 this.count = this.data_comment.totalCount() 219 this.count = this.data_comment.totalCount()
219 this.commentNum = value.totalCount 220 this.commentNum = value.totalCount
220 - if (this.data_comment.totalCount() < value.totalCount) { 221 + if (value.pageNum === 1) {
221 this.curPageNum++ 222 this.curPageNum++
222 } else { 223 } else {
223 this.hasMore = false 224 this.hasMore = false
@@ -50,6 +50,7 @@ export struct OtherHomePageBottomCommentComponent { @@ -50,6 +50,7 @@ export struct OtherHomePageBottomCommentComponent {
50 CustomPullToRefresh({ 50 CustomPullToRefresh({
51 alldata:this.data_comment, 51 alldata:this.data_comment,
52 scroller:this.scroller, 52 scroller:this.scroller,
  53 + hasMore:this.hasMore,
53 customList:()=>{ 54 customList:()=>{
54 this.ListLayout() 55 this.ListLayout()
55 }, 56 },
@@ -69,6 +70,7 @@ export struct OtherHomePageBottomCommentComponent { @@ -69,6 +70,7 @@ export struct OtherHomePageBottomCommentComponent {
69 this.isLoading = true 70 this.isLoading = true
70 //加载分页数据 71 //加载分页数据
71 this.getNewPageData() 72 this.getNewPageData()
  73 + if(resolve) resolve('刷新成功')
72 } 74 }
73 } 75 }
74 }) 76 })
@@ -108,6 +110,13 @@ export struct OtherHomePageBottomCommentComponent { @@ -108,6 +110,13 @@ export struct OtherHomePageBottomCommentComponent {
108 } 110 }
109 } 111 }
110 } 112 }
  113 + // .onReachEnd(()=>{
  114 + // if (!this.isLoading) {
  115 + // this.isLoading = true
  116 + // //加载分页数据
  117 + // this.getNewPageData()
  118 + // }
  119 + // })
111 .cachedCount(5) 120 .cachedCount(5)
112 .layoutWeight(1) 121 .layoutWeight(1)
113 .scrollBar(BarState.Off) 122 .scrollBar(BarState.Off)
@@ -185,7 +194,7 @@ export struct OtherHomePageBottomCommentComponent { @@ -185,7 +194,7 @@ export struct OtherHomePageBottomCommentComponent {
185 194
186 this.count = this.data_comment.totalCount() 195 this.count = this.data_comment.totalCount()
187 this.commentNum = value.totalCount 196 this.commentNum = value.totalCount
188 - if (this.data_comment.totalCount() < value.totalCount) { 197 + if (value.hasNext === 1) {
189 this.curPageNum++ 198 this.curPageNum++
190 } else { 199 } else {
191 this.hasMore = false 200 this.hasMore = false
@@ -214,7 +223,7 @@ export struct OtherHomePageBottomCommentComponent { @@ -214,7 +223,7 @@ export struct OtherHomePageBottomCommentComponent {
214 223
215 this.count = this.data_comment.totalCount() 224 this.count = this.data_comment.totalCount()
216 this.commentNum = value.totalCount 225 this.commentNum = value.totalCount
217 - if (this.data_comment.totalCount() < value.totalCount) { 226 + if (value.hasNext === 1) {
218 this.curPageNum++ 227 this.curPageNum++
219 } else { 228 } else {
220 this.hasMore = false 229 this.hasMore = false
1 @Component 1 @Component
2 export struct PermissionDesComponent { 2 export struct PermissionDesComponent {
3 @State translateY: number = 0 3 @State translateY: number = 0
  4 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
4 5
5 aboutToAppear(): void { 6 aboutToAppear(): void {
6 this.startDismiss() 7 this.startDismiss()
@@ -29,7 +30,7 @@ export struct PermissionDesComponent { @@ -29,7 +30,7 @@ export struct PermissionDesComponent {
29 // .height(60) 30 // .height(60)
30 .backgroundColor('#FFFFFF') 31 .backgroundColor('#FFFFFF')
31 .border({ radius: 5 }) 32 .border({ radius: 5 })
32 - .margin({ top: 12 }) 33 + .margin({ top: px2vp(this.topSafeHeight) })
33 .padding(12) 34 .padding(12)
34 .zIndex(20) 35 .zIndex(20)
35 } 36 }
@@ -115,7 +115,7 @@ struct LoginPage { @@ -115,7 +115,7 @@ struct LoginPage {
115 Image($r("app.media.login_logo")) 115 Image($r("app.media.login_logo"))
116 .width(120) 116 .width(120)
117 .height(66) 117 .height(66)
118 - .margin({ top: 78 }) 118 + .margin({ top: 78 + px2vp(this.topSafeHeight) })
119 .align(Alignment.Center) 119 .align(Alignment.Center)
120 120
121 LoginInputComponent({ 121 LoginInputComponent({
@@ -225,7 +225,7 @@ struct LoginPage { @@ -225,7 +225,7 @@ struct LoginPage {
225 Image($r('app.media.login_closed')) 225 Image($r('app.media.login_closed'))
226 .width(24) 226 .width(24)
227 .height(24) 227 .height(24)
228 - .margin({ top: 10, right: 15 }) 228 + .margin({ top:px2vp(this.topSafeHeight), right: 15 })
229 .alignRules({ 229 .alignRules({
230 top: { anchor: "__container__", align: VerticalAlign.Top }, 230 top: { anchor: "__container__", align: VerticalAlign.Top },
231 right: { anchor: "__container__", align: HorizontalAlign.End } 231 right: { anchor: "__container__", align: HorizontalAlign.End }
@@ -249,7 +249,7 @@ struct LoginPage { @@ -249,7 +249,7 @@ struct LoginPage {
249 .backgroundColor(Color.White) 249 .backgroundColor(Color.White)
250 }.width("100%") 250 }.width("100%")
251 .height("100%") 251 .height("100%")
252 - .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) 252 + // .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
253 253
254 } 254 }
255 255