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
zhangbo1_wd
2024-04-12 12:30:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ee322fdafbbfb70c7f1cfcd7082f68ca1c7e8903
ee322fda
1 parent
1dab8208
修改编译错
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
4 deletions
sight_harmony/commons/wdJsBridge/src/main/ets/core/BridgeWebViewControl.ets
sight_harmony/commons/wdKit/src/main/ets/utils/NumberFormatterUtils.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/H5CallNativeType.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebComponent.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/commons/wdJsBridge/src/main/ets/core/BridgeWebViewControl.ets
View file @
ee322fd
...
...
@@ -5,7 +5,9 @@ import { BridgeUtil } from '../utils/BridgeUtil';
import { Message } from '../bean/Message';
import { CallBackMessage } from '../bean/CallBackMessage';
import { StringUtils } from '../utils/StringUtils';
import { hilog } from '@kit.PerformanceAnalysisKit';
import hilog from '@ohos.hilog';
// import { hilog } from '@kit.PerformanceAnalysisKit';
const TAG = 'BridgeWebViewControl';
...
...
sight_harmony/commons/wdKit/src/main/ets/utils/NumberFormatterUtils.ets
View file @
ee322fd
...
...
@@ -8,7 +8,7 @@ export class NumberFormatterUtils {
*/
static formatNumberWithWan(inputNumber: number | String): string {
const num = typeof inputNumber === 'number' ? inputNumber : Number(inputNumber);
if (isNaN(num) || num < 10000) {
if (
Number.
isNaN(num) || num < 10000) {
return num.toString();
} else {
const wanUnit = num / 10000;
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/H5CallNativeType.ets
View file @
ee322fd
...
...
@@ -10,7 +10,7 @@ export class H5CallNativeType {
static jsCall_callAppService = 'jsCall_callAppService'
// TODO 业务自行新增类型、自行在JsBridgeBiz#performJSCallNative里添加接收分支处理。
static {
static
init()
{
H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_currentPageOperate)
H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_getAppPublicInfo)
H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_getArticleDetailBussinessData)
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebComponent.ets
View file @
ee322fd
...
...
@@ -89,7 +89,7 @@ export struct WdWebComponent {
// },500)
// })
// this.onPageBegin(event?.url)
this.webviewControl?.setCustomUserAgent('Mozilla/5.0 (Linux; Android 12; HarmonyOS; OXF-AN00; HMSCore 6.13.0.302) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.88 HuaweiBrowser/14.0.6.300 Mobile Safari/537.36')
//
this.webviewControl?.setCustomUserAgent('Mozilla/5.0 (Linux; Android 12; HarmonyOS; OXF-AN00; HMSCore 6.13.0.302) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.88 HuaweiBrowser/14.0.6.300 Mobile Safari/537.36')
})
.onLoadIntercept((event) => {
let url: string = event.data.getRequestUrl().toString()
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
ee322fd
...
...
@@ -75,6 +75,8 @@ export struct WdWebLocalComponent {
}
private registerHandlers(): void {
// TODO 待优化
H5CallNativeType.init();
// 注册h5调用js相关
for (let i = 0; i < H5CallNativeType.JsCallTypeList.length; i++) {
let handleName = H5CallNativeType.JsCallTypeList[i];
...
...
Please
register
or
login
to post a comment