Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
xugenyuan
2024-09-13 17:26:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c61e1ae99d3c97166150e0559cafe7c68a58bda7
c61e1ae9
1 parent
1fa9cb11
ref |> 文章详情页增加日志
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
4 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/H5NewsWebPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextWebComponent.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
c61e1ae
...
...
@@ -96,12 +96,12 @@ export struct WdWebLocalComponent {
url = url.replace("%(?![0-9a-fA-F]{2})", "%25")
.replace("\\+", "%2B");
url = decodeURIComponent(url)
Logger.debug(TAG, 'Web onLoadIntercept url: ' + url);
if (url.startsWith(BridgeUtil.YY_RETURN_DATA)) {
this.webviewControl.handlerReturnData(url)
return true
}
if (url.startsWith(BridgeUtil.YY_OVERRIDE_SCHEMA)) {
Logger.debug(TAG, 'flushMessageQueue:'+url);
// this.webviewControl.flushMessageQueue()
this.webviewControl.receiveDataFromH5(url)
return true
...
...
sight_harmony/features/wdComponent/src/main/ets/components/H5NewsWebPageComponent.ets
View file @
c61e1ae
...
...
@@ -199,6 +199,9 @@ export struct H5NewsWebPageComponent {
// 已登录->查询用户对作品点赞、收藏状态
private async getInteractDataStatus() {
if (!HttpUtils.isLogin()) {
return
}
try {
const params: batchLikeAndCollectParams = {
contentList: [
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
c61e1ae
...
...
@@ -40,7 +40,7 @@ import { LottieView } from '../components/lottie/LottieView';
const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm';
const TAG: string = 'ImageAndText
Page
Component'
const TAG: string = 'ImageAndText
Web
Component'
/**
* 图文详情页
* */
...
...
@@ -410,6 +410,9 @@ export struct ImageAndTextPageComponent {
// 已登录->查询用户对作品点赞、收藏状态
private async getInteractDataStatus() {
if (!HttpUtils.isLogin()) {
return
}
try {
const params: batchLikeAndCollectParams = {
contentList: [
...
...
@@ -512,6 +515,7 @@ export struct ImageAndTextPageComponent {
}
aboutToAppear() {
Logger.debug(TAG, '文章详情页 aboutToAppear,开始请求接口数据');
this.getDetail()
this.screenHeight = DisplayUtils.getDeviceHeight()
this.initAnimationConfig();
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextWebComponent.ets
View file @
c61e1ae
...
...
@@ -24,6 +24,7 @@ export struct ImageAndTextWebComponent {
private webPrepared = false;
private dataPrepared = false;
async onDetailDataUpdated() {
Logger.debug(TAG, '详情内容已获取接口数据');
if (this.action) {
let contentId: string = ''
let contentType: string = ''
...
...
@@ -92,6 +93,10 @@ export struct ImageAndTextWebComponent {
}
aboutToAppear(): void {
Logger.debug(TAG, 'H5模板加载控件 aboutToAppear');
}
build() {
Column() {
WdWebLocalComponent({
...
...
@@ -115,15 +120,16 @@ export struct ImageAndTextWebComponent {
}
private onWebPrepared() {
Logger.debug(TAG, 'H5模板已加载,prepared');
this.webPrepared = true
this.trySendData2H5()
}
private sendContentData2H5(h5ReceiveAppData: H5ReceiveDetailBean) {
let jsonString = JSON.stringify(h5ReceiveAppData);
Logger.debug(
'ImageAndTextWebComponent', '
jsCall_receiveAppData',jsonString);
Logger.debug(
TAG, '传递html数据至H5
jsCall_receiveAppData',jsonString);
this.webviewControl.callHandle(NativeCallH5Type.jsCall_receiveAppData, jsonString, (data: string) => {
Logger.debug(
'ImageAndTextWebComponent'
, "from js data = " + data);
Logger.debug(
TAG
, "from js data = " + data);
})
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment