wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  ref |> 修改华为账号一键登录为“华为账号快速登录”
  ref |> 临时回退华为账号一键登录
  fix(17649): 早晚报>专题类型稿件详情页_滚动预览不该展示滚动条
  fix(专题): 拼接修正
  fix(专题): 请求页面数据,增加参数
  fix(18943): 专题骨架图取错,不应展示稿件详情骨架图
@@ -29,6 +29,8 @@ export struct WdWebComponent { @@ -29,6 +29,8 @@ export struct WdWebComponent {
29 .mixedMode(MixedMode.All) 29 .mixedMode(MixedMode.All)
30 .onlineImageAccess(true) 30 .onlineImageAccess(true)
31 .enableNativeEmbedMode(true) 31 .enableNativeEmbedMode(true)
  32 + .horizontalScrollBarAccess(false)
  33 + .verticalScrollBarAccess(false)
32 .onPageBegin((event) => { 34 .onPageBegin((event) => {
33 this.onPageBegin(event?.url); 35 this.onPageBegin(event?.url);
34 }) 36 })
1 import { Action, H5ReceiveDetailBean, ContentDetailDTO, InteractDataDTO } from 'wdBean'; 1 import { Action, H5ReceiveDetailBean, ContentDetailDTO, InteractDataDTO } from 'wdBean';
2 import { WdWebComponent } from 'wdWebComponent'; 2 import { WdWebComponent } from 'wdWebComponent';
3 -import router from '@ohos.router';  
4 import { CommonConstants } from 'wdConstant' 3 import { CommonConstants } from 'wdConstant'
5 import { BridgeWebViewControl } from 'wdJsBridge/Index'; 4 import { BridgeWebViewControl } from 'wdJsBridge/Index';
6 -import { detailedSkeleton } from './skeleton/detailSkeleton'  
7 import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5Type'; 5 import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5Type';
8 import { OperRowListView } from './view/OperRowListView'; 6 import { OperRowListView } from './view/OperRowListView';
9 import DetailViewModel from '../viewmodel/DetailViewModel'; 7 import DetailViewModel from '../viewmodel/DetailViewModel';
@@ -15,6 +13,7 @@ import { common } from '@kit.AbilityKit'; @@ -15,6 +13,7 @@ import { common } from '@kit.AbilityKit';
15 import { PageRepository } from '../repository/PageRepository'; 13 import { PageRepository } from '../repository/PageRepository';
16 import { CommentDialogView } from './CommentDialogView'; 14 import { CommentDialogView } from './CommentDialogView';
17 import { faceDetector } from '@kit.CoreVisionKit'; 15 import { faceDetector } from '@kit.CoreVisionKit';
  16 +import { channelSkeleton } from './skeleton/channelSkeleton';
18 17
19 const TAG: string = 'SpacialTopicPageComponent' 18 const TAG: string = 'SpacialTopicPageComponent'
20 19
@@ -117,7 +116,7 @@ export struct SpacialTopicPageComponent { @@ -117,7 +116,7 @@ export struct SpacialTopicPageComponent {
117 let pageId = this.action.params.extra?.pageId 116 let pageId = this.action.params.extra?.pageId
118 console.log('pageIdpageId',pageId) 117 console.log('pageIdpageId',pageId)
119 if(pageId){ 118 if(pageId){
120 - let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId) 119 + let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId,contentId)
121 let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) 120 let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
122 if (detailBeans?.length > 0) { 121 if (detailBeans?.length > 0) {
123 this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0])); 122 this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0]));
@@ -192,7 +191,7 @@ export struct SpacialTopicPageComponent { @@ -192,7 +191,7 @@ export struct SpacialTopicPageComponent {
192 }).padding({ bottom: 200 }) 191 }).padding({ bottom: 200 })
193 } else { 192 } else {
194 if (!this.isPageEnd) { 193 if (!this.isPageEnd) {
195 - detailedSkeleton().padding({ top:`${this.topSafeHeight}px`,bottom: this.bottomSafeHeight }) 194 + channelSkeleton().padding({ top:`${this.topSafeHeight}px`,bottom: this.bottomSafeHeight })
196 } 195 }
197 } 196 }
198 //底部交互区 197 //底部交互区
@@ -192,9 +192,12 @@ export class PageRepository { @@ -192,9 +192,12 @@ export class PageRepository {
192 /** 192 /**
193 * 早晚报pageInfo请求 193 * 早晚报pageInfo请求
194 * */ 194 * */
195 - static getMorningEveningPageInfoUrl(pageId: string) { 195 + static getMorningEveningPageInfoUrl(pageId: string,topicId:string) {
196 let url = HttpUrlUtils.getHost() + HttpUrlUtils.PAGE_INFO_PATH; 196 let url = HttpUrlUtils.getHost() + HttpUrlUtils.PAGE_INFO_PATH;
197 url = url + "?pageId=" + pageId; 197 url = url + "?pageId=" + pageId;
  198 + if(!StringUtils.isEmpty(topicId)){
  199 + url = url+ "&topicId=" + topicId;
  200 + }
198 Logger.info(TAG, "getMorningEveningPageInfoUrl url = " + url) 201 Logger.info(TAG, "getMorningEveningPageInfoUrl url = " + url)
199 return url; 202 return url;
200 } 203 }
@@ -392,8 +395,8 @@ export class PageRepository { @@ -392,8 +395,8 @@ export class PageRepository {
392 /** 395 /**
393 * 获取早晚报pageInfo 396 * 获取早晚报pageInfo
394 * */ 397 * */
395 - static fetchMorningEveningPageInfo(pageId: string) {  
396 - let url = PageRepository.getMorningEveningPageInfoUrl(pageId) 398 + static fetchMorningEveningPageInfo(pageId: string,topicId:string) {
  399 + let url = PageRepository.getMorningEveningPageInfoUrl(pageId,topicId)
397 return WDHttp.get<ResponseDTO<PageInfoBean>>(url) 400 return WDHttp.get<ResponseDTO<PageInfoBean>>(url)
398 }; 401 };
399 402
@@ -418,7 +421,7 @@ export class PageRepository { @@ -418,7 +421,7 @@ export class PageRepository {
418 * 获取播报pageInfo 421 * 获取播报pageInfo
419 * */ 422 * */
420 static fetchBroadcastPageInfo(pageId: string) { 423 static fetchBroadcastPageInfo(pageId: string) {
421 - let url = PageRepository.getMorningEveningPageInfoUrl(pageId) 424 + let url = PageRepository.getMorningEveningPageInfoUrl(pageId,'')
422 return WDHttp.get<ResponseDTO<PageInfoBean>>(url) 425 return WDHttp.get<ResponseDTO<PageInfoBean>>(url)
423 }; 426 };
424 427
@@ -9,7 +9,7 @@ export class BroadcastViewModel { @@ -9,7 +9,7 @@ export class BroadcastViewModel {
9 static async getBroadcastViewPageInfo(pageId: string): Promise<PageInfoBean> { 9 static async getBroadcastViewPageInfo(pageId: string): Promise<PageInfoBean> {
10 return new Promise<PageInfoBean>((success, error) => { 10 return new Promise<PageInfoBean>((success, error) => {
11 Logger.info(TAG, `getBroadcastViewPageInfo pageInfo start`); 11 Logger.info(TAG, `getBroadcastViewPageInfo pageInfo start`);
12 - PageRepository.fetchMorningEveningPageInfo(pageId).then((resDTO: ResponseDTO<PageInfoBean>) => { 12 + PageRepository.fetchMorningEveningPageInfo(pageId,'').then((resDTO: ResponseDTO<PageInfoBean>) => {
13 if (!resDTO || !resDTO.data) { 13 if (!resDTO || !resDTO.data) {
14 Logger.error(TAG, 'getBroadcastViewPageInfo then navResDTO is empty'); 14 Logger.error(TAG, 'getBroadcastViewPageInfo then navResDTO is empty');
15 error('resDTO is empty'); 15 error('resDTO is empty');
@@ -36,7 +36,7 @@ export class MorningEveningViewModel { @@ -36,7 +36,7 @@ export class MorningEveningViewModel {
36 static async getMorningEveningPageInfo(pageId: string): Promise<PageInfoBean> { 36 static async getMorningEveningPageInfo(pageId: string): Promise<PageInfoBean> {
37 return new Promise<PageInfoBean>((success, error) => { 37 return new Promise<PageInfoBean>((success, error) => {
38 Logger.info(TAG, `getMorningEveningPageInfo pageInfo start`); 38 Logger.info(TAG, `getMorningEveningPageInfo pageInfo start`);
39 - PageRepository.fetchMorningEveningPageInfo(pageId).then((resDTO: ResponseDTO<PageInfoBean>) => { 39 + PageRepository.fetchMorningEveningPageInfo(pageId,'').then((resDTO: ResponseDTO<PageInfoBean>) => {
40 if (!resDTO || !resDTO.data) { 40 if (!resDTO || !resDTO.data) {
41 Logger.error(TAG, 'getMorningEveningPageInfo then navResDTO is empty'); 41 Logger.error(TAG, 'getMorningEveningPageInfo then navResDTO is empty');
42 error('resDTO is empty'); 42 error('resDTO is empty');
@@ -160,7 +160,7 @@ struct OneKeyLoginPage { @@ -160,7 +160,7 @@ struct OneKeyLoginPage {
160 Row() { 160 Row() {
161 Image($r("app.media.huawei_one_key_login_icon")) 161 Image($r("app.media.huawei_one_key_login_icon"))
162 .width(24).height(24) 162 .width(24).height(24)
163 - Text("华为账号一键登录") 163 + Text("华为账号快速登录")
164 .fontColor(Color.White) 164 .fontColor(Color.White)
165 .margin({left:5}) 165 .margin({left:5})
166 } 166 }
@@ -170,30 +170,34 @@ struct OneKeyLoginPage { @@ -170,30 +170,34 @@ struct OneKeyLoginPage {
170 .borderRadius(4) 170 .borderRadius(4)
171 .type(ButtonType.Normal) 171 .type(ButtonType.Normal)
172 .backgroundColor("#ED2800") 172 .backgroundColor("#ED2800")
  173 + .onClick(() => {
173 174
174 - Stack(){  
175 - //目前不支持文字和图标同时展示,后面优化  
176 - LoginWithHuaweiIDButton({  
177 - params: {  
178 - // LoginWithHuaweiIDButton支持的样式。  
179 - style: loginComponentManager.Style.BUTTON_CUSTOM,  
180 - // LoginWithHuaweiIDButton的边框圆角半径。  
181 - // borderRadius: 4,  
182 - // LoginWithHuaweiIDButton支持的登录类型。  
183 - loginType: loginComponentManager.LoginType.QUICK_LOGIN,  
184 - // LoginWithHuaweiIDButton支持按钮的样式跟随系统深浅色模式切换。  
185 - // supportDarkMode: true,  
186 - customButtonParams: {  
187 - fontColor: loginComponentManager.FontColor.WHITE,  
188 - // backgroundColor:!this.agreeProtocol ? "#60ED2800" : "#ED2800"  
189 - backgroundColor:"#ED2800"  
190 - }  
191 - },  
192 - controller: this.controller  
193 - }).opacity(0)  
194 - }  
195 - .width('100%')  
196 - .height('100%') 175 + this.requestLogin()
  176 + })
  177 +
  178 + // Stack(){
  179 + // //目前不支持文字和图标同时展示,后面优化
  180 + // LoginWithHuaweiIDButton({
  181 + // params: {
  182 + // // LoginWithHuaweiIDButton支持的样式。
  183 + // style: loginComponentManager.Style.BUTTON_CUSTOM,
  184 + // // LoginWithHuaweiIDButton的边框圆角半径。
  185 + // // borderRadius: 4,
  186 + // // LoginWithHuaweiIDButton支持的登录类型。
  187 + // loginType: loginComponentManager.LoginType.QUICK_LOGIN,
  188 + // // LoginWithHuaweiIDButton支持按钮的样式跟随系统深浅色模式切换。
  189 + // // supportDarkMode: true,
  190 + // customButtonParams: {
  191 + // fontColor: loginComponentManager.FontColor.WHITE,
  192 + // // backgroundColor:!this.agreeProtocol ? "#60ED2800" : "#ED2800"
  193 + // backgroundColor:"#ED2800"
  194 + // }
  195 + // },
  196 + // controller: this.controller
  197 + // }).opacity(0)
  198 + // }
  199 + // .width('100%')
  200 + // .height('100%')
197 } 201 }
198 } 202 }
199 .height(48) 203 .height(48)
@@ -94,7 +94,7 @@ export default class HuaweiAuth { @@ -94,7 +94,7 @@ export default class HuaweiAuth {
94 // 创建授权请求,并设置参数 94 // 创建授权请求,并设置参数
95 let loginRequest = new authentication.HuaweiIDProvider().createAuthorizationWithHuaweiIDRequest(); 95 let loginRequest = new authentication.HuaweiIDProvider().createAuthorizationWithHuaweiIDRequest();
96 // 获取头像昵称需要传如下scope 96 // 获取头像昵称需要传如下scope
97 - loginRequest.scopes = ['profile']; //, 'phone' 97 + loginRequest.scopes = ['profile', 'phone']; //, 'phone'
98 // 若开发者需要进行服务端开发,则需传如下permission获取authorizationCode 98 // 若开发者需要进行服务端开发,则需传如下permission获取authorizationCode
99 loginRequest.permissions = ['serviceauthcode']; 99 loginRequest.permissions = ['serviceauthcode'];
100 // 用户是否需要登录授权,该值为true且用户未登录或未授权时,会拉起用户登录或授权页面 100 // 用户是否需要登录授权,该值为true且用户未登录或未授权时,会拉起用户登录或授权页面