wangliang_wd

feat:优化电子报展示,优化个人主页人民号滑动

@@ -146,6 +146,7 @@ export struct ENewspaperPageComponent { @@ -146,6 +146,7 @@ export struct ENewspaperPageComponent {
146 146
147 let ratio = this.ratio == '100%' ? 1 : 0.5 147 let ratio = this.ratio == '100%' ? 1 : 0.5
148 this.picWidth = this.picWidth * ratio 148 this.picWidth = this.picWidth * ratio
  149 + this.picHeight = (this.picWidth * 506)/355
149 // 默认日期 150 // 默认日期
150 const date = new Date() 151 const date = new Date()
151 const month = date.getMonth() + 1 152 const month = date.getMonth() + 1
1 -import { LazyDataSource, SPHelper, UserDataLocal } from 'wdKit'; 1 +import { DisplayUtils, LazyDataSource, SPHelper, UserDataLocal } from 'wdKit';
2 import { WDRouterPage, WDRouterRule } from 'wdRouter'; 2 import { WDRouterPage, WDRouterRule } from 'wdRouter';
3 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 3 import MinePageDatasModel from '../../../model/MinePageDatasModel';
4 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; 4 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
@@ -23,6 +23,8 @@ export struct HomePageBottomFollowComponent { @@ -23,6 +23,8 @@ export struct HomePageBottomFollowComponent {
23 @State count: number = 0; 23 @State count: number = 0;
24 preferences: dataPreferences.Preferences | null = null; 24 preferences: dataPreferences.Preferences | null = null;
25 @State isGetRequest: boolean = false 25 @State isGetRequest: boolean = false
  26 +
  27 + @State bottomCompH:number = 200
26 observer = (key: string) => { 28 observer = (key: string) => {
27 if (key == UserDataLocal.USER_FOLLOW_OPERATION) { 29 if (key == UserDataLocal.USER_FOLLOW_OPERATION) {
28 let value = SPHelper.default.getSync(UserDataLocal.USER_FOLLOW_OPERATION, "") as string 30 let value = SPHelper.default.getSync(UserDataLocal.USER_FOLLOW_OPERATION, "") as string
@@ -174,7 +176,8 @@ export struct HomePageBottomFollowComponent { @@ -174,7 +176,8 @@ export struct HomePageBottomFollowComponent {
174 //没有更多数据 显示提示 176 //没有更多数据 显示提示
175 if (!this.hasMore) { 177 if (!this.hasMore) {
176 ListItem() { 178 ListItem() {
177 - ListHasNoMoreDataUI() 179 + ///ToDo 数据过少时,达不到滑动条件 后续优化
  180 + ListHasNoMoreDataUI().height(this.bottomCompH > 150?this.bottomCompH:150)
178 } 181 }
179 } 182 }
180 } 183 }
@@ -230,6 +233,8 @@ export struct HomePageBottomFollowComponent { @@ -230,6 +233,8 @@ export struct HomePageBottomFollowComponent {
230 this.hasMore = false 233 this.hasMore = false
231 } 234 }
232 } 235 }
  236 + this.bottomCompH = DisplayUtils.getDeviceHeight() - this.data_follow.totalCount()*100
  237 + console.log(TAG, `${this.bottomCompH}`);
233 this.isLoading = false 238 this.isLoading = false
234 this.isGetRequest = true 239 this.isGetRequest = true
235 }).catch((err: Error) => { 240 }).catch((err: Error) => {