正在显示
58 个修改的文件
包含
699 行增加
和
343 行删除
不能预览此文件类型
.ohpmrc
0 → 100644
| 1 | +registry=https://ohpm.openharmony.cn/ohpm/,https://artifact.bytedance.com/repository/byted-ohpm/ |
不能预览此文件类型
| 1 | { | 1 | { |
| 2 | "apiType": "stageMode", | 2 | "apiType": "stageMode", |
| 3 | "buildOption": { | 3 | "buildOption": { |
| 4 | + "arkOptions": { | ||
| 5 | + // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ | ||
| 6 | + "runtimeOnly": { | ||
| 7 | + "packages": [ | ||
| 8 | + "@csj/adapter_ks", | ||
| 9 | + "ksadsdk", | ||
| 10 | + "@csj/adapter_gdt", | ||
| 11 | + "@gdt/gdt-union-sdk" | ||
| 12 | + ] | ||
| 13 | + } | ||
| 14 | + } | ||
| 4 | }, | 15 | }, |
| 5 | "buildOptionSet": [ | 16 | "buildOptionSet": [ |
| 6 | { | 17 | { |
entry/libs/GDTUnionSDK-default-release.har
0 → 100644
不能预览此文件类型
entry/libs/KSAdSDK.har
0 → 100644
不能预览此文件类型
entry/libs/openadsdk.har
0 → 100644
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
| @@ -201,8 +201,8 @@ export interface reportDetailData { | @@ -201,8 +201,8 @@ export interface reportDetailData { | ||
| 201 | maintenanceTime: string; | 201 | maintenanceTime: string; |
| 202 | technicalDirectorId?: string; | 202 | technicalDirectorId?: string; |
| 203 | technicalDirector?: null; | 203 | technicalDirector?: null; |
| 204 | - approvePersonId?: null; | ||
| 205 | - approvePerson?: null; | 204 | + approvePersonId?: number; |
| 205 | + approvePerson?: string; | ||
| 206 | allowPerson?: null; | 206 | allowPerson?: null; |
| 207 | state: string; | 207 | state: string; |
| 208 | reportType: string; | 208 | reportType: string; |
| @@ -370,7 +370,7 @@ export interface MalfunctionListTest { | @@ -370,7 +370,7 @@ export interface MalfunctionListTest { | ||
| 370 | 370 | ||
| 371 | export interface MalfunctionListRow { | 371 | export interface MalfunctionListRow { |
| 372 | malfunctionId?: number; | 372 | malfunctionId?: number; |
| 373 | - findTime?: null | string; | 373 | + findTime?: string; |
| 374 | findPeople?: null; | 374 | findPeople?: null; |
| 375 | malfunctionPart: string; | 375 | malfunctionPart: string; |
| 376 | malfunctionDes: string; | 376 | malfunctionDes: string; |
| @@ -383,8 +383,8 @@ export interface MalfunctionListRow { | @@ -383,8 +383,8 @@ export interface MalfunctionListRow { | ||
| 383 | malfunctionConfirm: string; | 383 | malfunctionConfirm: string; |
| 384 | reportId?: number; | 384 | reportId?: number; |
| 385 | version?: number; | 385 | version?: number; |
| 386 | - maintenanceComment?: null | string; | ||
| 387 | - applyCompanyComment?: null | string; | 386 | + maintenanceComment?: string; |
| 387 | + applyCompanyComment?: string; | ||
| 388 | remark: null | string; | 388 | remark: null | string; |
| 389 | companyName?: null | string; | 389 | companyName?: null | string; |
| 390 | applyCompanyName?: string; | 390 | applyCompanyName?: string; |
entry/src/main/ets/components/NavHeader.ets
0 → 100644
| 1 | +import { router } from '@kit.ArkUI' | ||
| 2 | +@Component | ||
| 3 | +export default struct NavHeader { | ||
| 4 | + @Prop title:string = '' | ||
| 5 | + build() { | ||
| 6 | + Row(){ | ||
| 7 | + Image($r('app.media.back_light')).width(20).margin({right: 10}) | ||
| 8 | + .onClick(() => { | ||
| 9 | + router.back() | ||
| 10 | + }) | ||
| 11 | + Text(this.title).fontSize(16).fontWeight(500) | ||
| 12 | + Text('').width(20) | ||
| 13 | + }.justifyContent(FlexAlign.SpaceBetween).width('100%').padding(10).backgroundColor('#fff') | ||
| 14 | + } | ||
| 15 | +} |
| @@ -14,8 +14,10 @@ export default struct CertificateDialog { | @@ -14,8 +14,10 @@ export default struct CertificateDialog { | ||
| 14 | Text('取消') | 14 | Text('取消') |
| 15 | .fontColor('#909090') | 15 | .fontColor('#909090') |
| 16 | .onClick(() => { | 16 | .onClick(() => { |
| 17 | + if(this.selectValue == ''){ | ||
| 17 | this.selectValue = this.certificateList[0] | 18 | this.selectValue = this.certificateList[0] |
| 18 | this.personCertificateInfo.certificateId = this.certificateData[0].certificateId | 19 | this.personCertificateInfo.certificateId = this.certificateData[0].certificateId |
| 20 | + } | ||
| 19 | this.controller.close() | 21 | this.controller.close() |
| 20 | }) | 22 | }) |
| 21 | Text('请选择证书类型') | 23 | Text('请选择证书类型') |
| @@ -79,7 +79,7 @@ export default struct ImportRecordsDialog{ | @@ -79,7 +79,7 @@ export default struct ImportRecordsDialog{ | ||
| 79 | .onClick(() => { | 79 | .onClick(() => { |
| 80 | AlertDialog.show({ | 80 | AlertDialog.show({ |
| 81 | title: '', | 81 | title: '', |
| 82 | - message: '删除后无法找回,确认删除全部故障处理记录并提交?', | 82 | + message: '导入手会替换掉原来填写的信息,是否导入?', |
| 83 | autoCancel: true, | 83 | autoCancel: true, |
| 84 | alignment: DialogAlignment.Center, | 84 | alignment: DialogAlignment.Center, |
| 85 | gridCount: 4, | 85 | gridCount: 4, |
| 1 | import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; | 1 | import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; |
| 2 | import { hilog } from '@kit.PerformanceAnalysisKit'; | 2 | import { hilog } from '@kit.PerformanceAnalysisKit'; |
| 3 | import { window } from '@kit.ArkUI'; | 3 | import { window } from '@kit.ArkUI'; |
| 4 | - | 4 | +import { DemoConstants } from './DemoConstants'; |
| 5 | export default class EntryAbility extends UIAbility { | 5 | export default class EntryAbility extends UIAbility { |
| 6 | onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { | 6 | onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { |
| 7 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); | 7 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); |
| @@ -11,10 +11,10 @@ export default class EntryAbility extends UIAbility { | @@ -11,10 +11,10 @@ export default class EntryAbility extends UIAbility { | ||
| 11 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); | 11 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | - onWindowStageCreate(windowStage: window.WindowStage): void { | 14 | + async onWindowStageCreate(windowStage: window.WindowStage) { |
| 15 | // Main window is created, set main page for this ability | 15 | // Main window is created, set main page for this ability |
| 16 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); | 16 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); |
| 17 | - | 17 | + // await showStartAd(windowStage, this.context) |
| 18 | windowStage.loadContent('pages/Login', (err) => { | 18 | windowStage.loadContent('pages/Login', (err) => { |
| 19 | if (err.code) { | 19 | if (err.code) { |
| 20 | hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); | 20 | hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); |
| @@ -22,6 +22,7 @@ export default class EntryAbility extends UIAbility { | @@ -22,6 +22,7 @@ export default class EntryAbility extends UIAbility { | ||
| 22 | } | 22 | } |
| 23 | hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); | 23 | hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); |
| 24 | }); | 24 | }); |
| 25 | + DemoConstants.windowStage = windowStage | ||
| 25 | } | 26 | } |
| 26 | 27 | ||
| 27 | onWindowStageDestroy(): void { | 28 | onWindowStageDestroy(): void { |
| @@ -39,3 +40,17 @@ export default class EntryAbility extends UIAbility { | @@ -39,3 +40,17 @@ export default class EntryAbility extends UIAbility { | ||
| 39 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); | 40 | hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); |
| 40 | } | 41 | } |
| 41 | } | 42 | } |
| 43 | + | ||
| 44 | +/** | ||
| 45 | + * 打开启动广告 | ||
| 46 | + * @param windowStage | ||
| 47 | + * @param ctx | ||
| 48 | + */ | ||
| 49 | +async function showStartAd(windowStage: window.WindowStage, ctx: Context) { | ||
| 50 | + // const adStore = new AdStore(ctx) | ||
| 51 | + // const ad = await getStartAd() // 获取广告数据 | ||
| 52 | + // await adStore.setStartAd(ad) // 写入首选项 | ||
| 53 | + const win = await windowStage.createSubWindow('startAd') // 创建子窗口 | ||
| 54 | + await win.showWindow() | ||
| 55 | + win.setUIContent('pages/StartAd') | ||
| 56 | +} |
| 1 | +import { AdSlot, CSJAdCreator } from '@csj/openadsdk/Index'; | ||
| 2 | +import { hilog } from '@kit.PerformanceAnalysisKit'; | ||
| 3 | + | ||
| 4 | +/** | ||
| 5 | + * Created by xgc on 2024/3/5 | ||
| 6 | + */ | ||
| 7 | +export class PrintBiddingTokenUtils { | ||
| 8 | + //qa要求打印biddingToken测试 | ||
| 9 | + static printBiddingToken(adSlot: AdSlot, adCreator: CSJAdCreator) { | ||
| 10 | + // let biddingToken = adCreator.getBiddingToken(adSlot, true, 7); | ||
| 11 | + // if (biddingToken) { | ||
| 12 | + // let first = biddingToken.substring(0, biddingToken.length / 2); | ||
| 13 | + // let second = biddingToken.substring(biddingToken.length / 2, biddingToken.length); | ||
| 14 | + // hilog.info(1, "biddingTokenQA1", first); | ||
| 15 | + // hilog.info(1, "biddingTokenQA2", second); | ||
| 16 | + // } else { | ||
| 17 | + // hilog.info(1, "biddingTokenQA3", "error"); | ||
| 18 | + // } | ||
| 19 | + } | ||
| 20 | +} |
| 1 | +import { AdSlot, AdSlotBuilder, AdSlotType, CSJAdSdk } from '@csj/openadsdk' | ||
| 2 | +import { List } from '@kit.ArkTS' | ||
| 3 | + | ||
| 4 | +/** | ||
| 5 | + * 聚合功能使用示例 | ||
| 6 | + * 如服务端激励验证处理逻辑示例、首次预缓存功能等 | ||
| 7 | + */ | ||
| 8 | +export class AdUtils { | ||
| 9 | + | ||
| 10 | + /** | ||
| 11 | + * 首次预缓存功能,使用注意 | ||
| 12 | + * 1、使用该接口时,创建AdSlot时codeId和adType是必传的,否则广告位无效。 | ||
| 13 | + * 2、该接口传入的AdSlot要与后续发起请求的AdSlot参数设置完全一致,否则会导致无法命中预缓存。 | ||
| 14 | + * 3、初始化后,开发者仅能调用一次该接口,多次调用不生效。 | ||
| 15 | + * 4、调用该接口的最早时机:SDK初始化完成后;该时机与开屏广告加载的时机非常近,因此不建议开屏广告用该接口提前加载。 | ||
| 16 | + */ | ||
| 17 | + preload() { | ||
| 18 | + // 第一步:准备需要预缓存的AdSlot list | ||
| 19 | + let adSlotList: List<AdSlot> = new List() | ||
| 20 | + let adSlot1 = new AdSlotBuilder() | ||
| 21 | + .setCodeId("102922441") // 预缓存必传! | ||
| 22 | + .setAdType(AdSlotType.TYPE_REWARD_VIDEO) // 预缓存必传! | ||
| 23 | + .build() | ||
| 24 | + | ||
| 25 | + let adSlot2 = new AdSlotBuilder() | ||
| 26 | + .setCodeId("103056846") | ||
| 27 | + .setAdType(AdSlotType.TYPE_REWARD_VIDEO) // 激励类型广告位 | ||
| 28 | + .setRewardName("金币") | ||
| 29 | + .setRewardAmount(1) | ||
| 30 | + .build() | ||
| 31 | + | ||
| 32 | + let adSlot3 = new AdSlotBuilder() | ||
| 33 | + .setCodeId("103086407") | ||
| 34 | + .setAdType(AdSlotType.TYPE_FULL_SCREEN_VIDEO) // 插屏类型广告位 | ||
| 35 | + .build() | ||
| 36 | + | ||
| 37 | + adSlotList.add(adSlot1) | ||
| 38 | + adSlotList.add(adSlot2) | ||
| 39 | + adSlotList.add(adSlot3) | ||
| 40 | + | ||
| 41 | + // 第二步:设置并行加载的数量和时间间隔 | ||
| 42 | + let parallelNum = 2 | ||
| 43 | + let requestIntervalS = 2 | ||
| 44 | + | ||
| 45 | + // 第三步:发起预请求 | ||
| 46 | + CSJAdSdk.getMediationManager().preload(adSlotList, parallelNum, requestIntervalS) | ||
| 47 | + } | ||
| 48 | +} |
| 1 | +import display from '@ohos.display' | ||
| 2 | + | ||
| 3 | +export class UIUtil { | ||
| 4 | + static getScreenWidthPx() { | ||
| 5 | + let screen = display.getDefaultDisplaySync() | ||
| 6 | + return screen.width | ||
| 7 | + } | ||
| 8 | + | ||
| 9 | + /** | ||
| 10 | + * 获得屏幕高度,包含了挖孔区域 | ||
| 11 | + * @returns | ||
| 12 | + */ | ||
| 13 | + static getScreenHeightPx() : number { | ||
| 14 | + let screen = display.getDefaultDisplaySync() | ||
| 15 | + return screen.height | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + static getScreenWidthVp(): number { | ||
| 19 | + return UIUtil.getScreenWidthPx() / UIUtil.getDensityPixels() | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + static getScreenHeightVp() : number { | ||
| 23 | + return UIUtil.getScreenHeightPx() / UIUtil.getDensityPixels() | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + static getScreenStatusBarHeightVp(): number { | ||
| 27 | + return 38.3 | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + static getDensityPixels() { | ||
| 31 | + let screen = display.getDefaultDisplaySync() | ||
| 32 | + return screen.densityPixels | ||
| 33 | + } | ||
| 34 | +} |
entry/src/main/ets/pages/AdMainPage.ets
0 → 100644
| 1 | +import { | ||
| 2 | + AdSlotBuilder, | ||
| 3 | + CSJAdCreator, | ||
| 4 | + CSJSplashAd, | ||
| 5 | + CSJAdSdk, | ||
| 6 | + CSJSplashAdInteractionListener, | ||
| 7 | + CSJSplashAdLoadListener, | ||
| 8 | + CSJSplashAdCloseType, | ||
| 9 | + CSJSplashAdLoadParam, | ||
| 10 | + MediationAdInfo | ||
| 11 | +} from '@csj/openadsdk' | ||
| 12 | +import { UIUtil } from '../mediation_adtype/tools/UIUtil' | ||
| 13 | +import { PrintBiddingTokenUtils } from '../mediation_adtype/test/PrintBiddintTokenUtils' | ||
| 14 | +import { window, promptAction, router } from '@kit.ArkUI' | ||
| 15 | +import { DemoConstants } from '../entryability/DemoConstants' | ||
| 16 | + | ||
| 17 | +import('./SplashAdShowPage') | ||
| 18 | + | ||
| 19 | +@Builder | ||
| 20 | +function bottomViewBuilder() { | ||
| 21 | + Text('Bottom View') | ||
| 22 | + .backgroundColor(Color.Yellow) | ||
| 23 | + .width(UIUtil.getScreenWidthVp()) | ||
| 24 | + .height(UIUtil.getScreenHeightVp() - adHeight) | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | + | ||
| 28 | +@Builder | ||
| 29 | +function closeBtnBuilder(closeBlock: () => void) { | ||
| 30 | + Text('close') | ||
| 31 | + .textAlign(TextAlign.Center) | ||
| 32 | + .backgroundColor(Color.Yellow) | ||
| 33 | + .width(60) | ||
| 34 | + .height(60) | ||
| 35 | + .borderRadius(30) | ||
| 36 | + .margin({ top: 50, right: 40 }) | ||
| 37 | + .onClick((event) => { | ||
| 38 | + closeBlock() | ||
| 39 | + }) | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +let globalBuilder: WrappedBuilder<[]> = wrapBuilder(bottomViewBuilder) | ||
| 43 | +let globalCloseBtnBuilder: WrappedBuilder<[closeBlock: () => void]> = wrapBuilder(closeBtnBuilder) | ||
| 44 | + | ||
| 45 | +let screenWidth: number = UIUtil.getScreenWidthVp() | ||
| 46 | +let screenHeight: number = UIUtil.getScreenHeightVp() | ||
| 47 | + | ||
| 48 | +let adWidth: number = Math.round(screenWidth) | ||
| 49 | +let adHeight: number = Math.round(screenHeight) | ||
| 50 | + | ||
| 51 | +@Entry | ||
| 52 | +@Component | ||
| 53 | +export struct SplashAdDemoPage { | ||
| 54 | + private mAdCreator: CSJAdCreator = CSJAdSdk.getAdCreator() | ||
| 55 | + private splashAd: CSJSplashAd | undefined | ||
| 56 | + context = getContext(this) | ||
| 57 | + @State adLoadSuccess: Boolean = false | ||
| 58 | + @State errorMsg: string | undefined = undefined; | ||
| 59 | + @State startLoad: boolean = false; | ||
| 60 | + private mLoadListener: CSJSplashAdLoadListener = { | ||
| 61 | + onAdLoaded: (splashAd: CSJSplashAd) => { | ||
| 62 | + console.log("开屏回调 - onAdLoaded") | ||
| 63 | + this.splashAd = splashAd; | ||
| 64 | + this.adLoadSuccess = true; | ||
| 65 | + this.startLoad = false; | ||
| 66 | + // 方式一:直接showSplashAd | ||
| 67 | + this.splashAd.setInteractionListener(this.mSplashAdInteractionListener) | ||
| 68 | + if (adHeight < screenHeight) { | ||
| 69 | + this.splashAd?.showSplashAd(DemoConstants.windowStage, globalBuilder, | ||
| 70 | + this.useCustomCloseBtn ? globalCloseBtnBuilder : undefined) | ||
| 71 | + } else { | ||
| 72 | + this.splashAd?.showSplashAd(DemoConstants.windowStage, undefined, | ||
| 73 | + this.useCustomCloseBtn ? globalCloseBtnBuilder : undefined) | ||
| 74 | + } | ||
| 75 | + }, | ||
| 76 | + | ||
| 77 | + onError: (code: number, message: string) => { | ||
| 78 | + this.errorMsg = "onError code: " + code + "message: " + message; | ||
| 79 | + console.log(`开屏回调 - onError code: ${code} message: ${message}`) | ||
| 80 | + }, | ||
| 81 | + | ||
| 82 | + onRenderSuccess: (splashAd: CSJSplashAd) => { | ||
| 83 | + this.splashAd = splashAd; | ||
| 84 | + this.adLoadSuccess = true; | ||
| 85 | + this.startLoad = false; | ||
| 86 | + console.log("开屏回调 - onRenderSuccess") | ||
| 87 | + }, | ||
| 88 | + onRenderFail: (code: number, message: string) => { | ||
| 89 | + console.log("开屏回调 - onRenderFail") | ||
| 90 | + } | ||
| 91 | + } | ||
| 92 | + @State widthLabelText: string = "宽:" + adWidth | ||
| 93 | + @State heightLabelText: string = "高:" + adHeight | ||
| 94 | + private useCustomCloseBtn: boolean = false | ||
| 95 | + private loadTimeout: number = 3000 | ||
| 96 | + private mWindow: window.Window | undefined = undefined | ||
| 97 | + closeWin() { | ||
| 98 | + const win = window.findWindow('startAd') // 找到子窗口 | ||
| 99 | + win.destroyWindow() // 销毁窗口 | ||
| 100 | + } | ||
| 101 | + aboutToAppear(){ | ||
| 102 | + let adSlot = new AdSlotBuilder() | ||
| 103 | + .setCodeId("103398151") | ||
| 104 | + .setAcceptSize(adWidth, | ||
| 105 | + adHeight) | ||
| 106 | + .build() | ||
| 107 | + let param = new CSJSplashAdLoadParam(adSlot, this.mLoadListener, this.getUIContext(), this.loadTimeout) | ||
| 108 | + PrintBiddingTokenUtils.printBiddingToken(adSlot, this.mAdCreator); | ||
| 109 | + this.mAdCreator.loadSplashAd(param) | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + build() { | ||
| 113 | + Column() { | ||
| 114 | + Image($r('app.media.logo')).width(60).height(60) | ||
| 115 | + }.width('100%').height('100%').justifyContent(FlexAlign.Center) | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + // CSJSplashAdInteractionListener | ||
| 119 | + private mSplashAdInteractionListener: CSJSplashAdInteractionListener = { | ||
| 120 | + onDidShow: () => { | ||
| 121 | + console.log("开屏回调 - onDidShow") | ||
| 122 | + // 聚合show信息获取 | ||
| 123 | + let info = this.splashAd?.getMediaExtraInfo() | ||
| 124 | + if (info instanceof MediationAdInfo) { | ||
| 125 | + let showcpm = info.getShowEcpm() | ||
| 126 | + if (showcpm) { | ||
| 127 | + console.log("GMMediation_showcpm", "adnName:"+showcpm.getAdnName()) | ||
| 128 | + console.log("GMMediation_showcpm", "ritType:"+showcpm.getRitType()) | ||
| 129 | + console.log("GMMediation_showcpm", "adnRitId:"+showcpm.getAdnRitId()) | ||
| 130 | + console.log("GMMediation_showcpm", "ecpm:"+showcpm.getEcpm()) | ||
| 131 | + } | ||
| 132 | + } | ||
| 133 | + }, | ||
| 134 | + | ||
| 135 | + onDidClose: (closeType: CSJSplashAdCloseType) => { | ||
| 136 | + this.splashAd = undefined | ||
| 137 | + // 方式二:需自行移除广告 | ||
| 138 | + this.mWindow?.destroyWindow() | ||
| 139 | + router.pushUrl({ url: "pages/Login"}) | ||
| 140 | + this.closeWin() | ||
| 141 | + }, | ||
| 142 | + | ||
| 143 | + onDidClick: () => { | ||
| 144 | + console.log("开屏回调 - onDidClick") | ||
| 145 | + router.pushUrl({ url: "pages/Login"}) | ||
| 146 | + }, | ||
| 147 | + | ||
| 148 | + onVideoDidPlayFinish: () => { | ||
| 149 | + console.log("开屏回调 - onVideoDidPlayFinish") | ||
| 150 | + }, | ||
| 151 | + | ||
| 152 | + onVideoDidPlayFail: () => { | ||
| 153 | + console.log("开屏回调 - onVideoDidPlayFail") | ||
| 154 | + } | ||
| 155 | + } | ||
| 156 | +} |
| @@ -11,6 +11,7 @@ import { | @@ -11,6 +11,7 @@ import { | ||
| 11 | projectType, | 11 | projectType, |
| 12 | RecordsList | 12 | RecordsList |
| 13 | } from '../api/recordsType' | 13 | } from '../api/recordsType' |
| 14 | +import NavHeader from '../components/NavHeader' | ||
| 14 | import { quarterType, quarterTest } from '../api/options/optionsType' | 15 | import { quarterType, quarterTest } from '../api/options/optionsType' |
| 15 | import { getMaintenanceType, getLatestProjectList, getEquipmentList, addRecords, getCompanyPersonList, getReportDetail, updateRecords, getRecordsList } from '../api/originalRecords' | 16 | import { getMaintenanceType, getLatestProjectList, getEquipmentList, addRecords, getCompanyPersonList, getReportDetail, updateRecords, getRecordsList } from '../api/originalRecords' |
| 16 | import { AxiosResponse } from '@ohos/axios' | 17 | import { AxiosResponse } from '@ohos/axios' |
| @@ -92,6 +93,7 @@ struct EditUser { | @@ -92,6 +93,7 @@ struct EditUser { | ||
| 92 | @State errorMsg: string = '' | 93 | @State errorMsg: string = '' |
| 93 | flag: boolean = true | 94 | flag: boolean = true |
| 94 | async aboutToAppear() { | 95 | async aboutToAppear() { |
| 96 | + // reportId等于undefined为编辑状态 | ||
| 95 | this.isEdit = reportId !== undefined | 97 | this.isEdit = reportId !== undefined |
| 96 | if(reportId){ | 98 | if(reportId){ |
| 97 | this.addForm.reportId = reportId | 99 | this.addForm.reportId = reportId |
| @@ -110,6 +112,7 @@ struct EditUser { | @@ -110,6 +112,7 @@ struct EditUser { | ||
| 110 | this.addForm.state = result.state | 112 | this.addForm.state = result.state |
| 111 | this.addForm.technicalDirectorId = result.technicalDirectorId | 113 | this.addForm.technicalDirectorId = result.technicalDirectorId |
| 112 | this.addForm.maintenancePeopleList = result.technicalDirectorId?.split(',') | 114 | this.addForm.maintenancePeopleList = result.technicalDirectorId?.split(',') |
| 115 | + this.addForm.approvePersonId = result.approvePersonId as number | ||
| 113 | this.addForm.projectList = result.projectList.map(item => { | 116 | this.addForm.projectList = result.projectList.map(item => { |
| 114 | return { projectId: item.projectId } as projectType | 117 | return { projectId: item.projectId } as projectType |
| 115 | }) | 118 | }) |
| @@ -144,6 +147,7 @@ struct EditUser { | @@ -144,6 +147,7 @@ struct EditUser { | ||
| 144 | 147 | ||
| 145 | build() { | 148 | build() { |
| 146 | Column(){ | 149 | Column(){ |
| 150 | + NavHeader({title: '添加原始记录'}) | ||
| 147 | Scroll(){ | 151 | Scroll(){ |
| 148 | Column(){ | 152 | Column(){ |
| 149 | Column(){ | 153 | Column(){ |
| @@ -217,9 +221,15 @@ struct EditUser { | @@ -217,9 +221,15 @@ struct EditUser { | ||
| 217 | Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) { | 221 | Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) { |
| 218 | ForEach(this.companyPersonList, (children: companyPersonRow) => { | 222 | ForEach(this.companyPersonList, (children: companyPersonRow) => { |
| 219 | Row() { | 223 | Row() { |
| 220 | - Radio({ value: children.personId.toString(), group: 'radioGroup', | 224 | + Radio({ value: children.personId.toString(), group: 'radioGroupPeople', |
| 221 | indicatorType:RadioIndicatorType.TICK, | 225 | indicatorType:RadioIndicatorType.TICK, |
| 222 | - }).height(14).width(14).checked(this.addForm.approvePersonId == children.personId) | 226 | + }).height(14).width(14).checked(this.addForm.approvePersonId === children.personId) |
| 227 | + .onChange((checked: boolean) => { | ||
| 228 | + if (checked) { | ||
| 229 | + this.addForm.approvePerson = children.personName | ||
| 230 | + this.addForm.approvePersonId = children.personId | ||
| 231 | + } | ||
| 232 | + }) | ||
| 223 | Text(children.personName).fontSize(14) | 233 | Text(children.personName).fontSize(14) |
| 224 | } | 234 | } |
| 225 | }) | 235 | }) |
| @@ -478,9 +488,20 @@ struct EditUser { | @@ -478,9 +488,20 @@ struct EditUser { | ||
| 478 | promptAction.showToast({ | 488 | promptAction.showToast({ |
| 479 | message: '添加成功' | 489 | message: '添加成功' |
| 480 | }) | 490 | }) |
| 491 | + router.back() | ||
| 481 | } | 492 | } |
| 482 | }) | 493 | }) |
| 483 | }.width('100%').height(40).backgroundColor('#fff').padding({left: 10, right: 10}) | 494 | }.width('100%').height(40).backgroundColor('#fff').padding({left: 10, right: 10}) |
| 484 | }.width('100%').height('100%').backgroundColor('#f2f3f7') | 495 | }.width('100%').height('100%').backgroundColor('#f2f3f7') |
| 485 | } | 496 | } |
| 497 | + | ||
| 498 | + pageTransition() { | ||
| 499 | + // 该页面进入动画时长为1000ms,尽量与另一页面的退出动画时长匹配 | ||
| 500 | + PageTransitionEnter({ duration: 500 }) | ||
| 501 | + .slide(SlideEffect.Left).opacity(0) | ||
| 502 | + // 该页面退出动画时长为1200ms,尽量与另一页面的进入动画时长匹配 | ||
| 503 | + PageTransitionExit({ duration: 500 }) | ||
| 504 | + .translate({ x: 150.0 }) | ||
| 505 | + .opacity(0) | ||
| 506 | + } | ||
| 486 | } | 507 | } |
| @@ -3,7 +3,7 @@ import { promptAction } from '@kit.ArkUI'; | @@ -3,7 +3,7 @@ import { promptAction } from '@kit.ArkUI'; | ||
| 3 | import { AxiosResponse } from '@ohos/axios' | 3 | import { AxiosResponse } from '@ohos/axios' |
| 4 | import { headerTest, headerRow, companyData } from '../api/userType' | 4 | import { headerTest, headerRow, companyData } from '../api/userType' |
| 5 | import { getHeaderInfo, updateHeaderInfo, addHeaderInfo } from '../api/user' | 5 | import { getHeaderInfo, updateHeaderInfo, addHeaderInfo } from '../api/user' |
| 6 | - | 6 | +import NavHeader from '../components/NavHeader' |
| 7 | let companyId = preferencesUtil.get('XF_COMPANY_ID', 65) as number | 7 | let companyId = preferencesUtil.get('XF_COMPANY_ID', 65) as number |
| 8 | 8 | ||
| 9 | @Entry | 9 | @Entry |
| @@ -80,6 +80,7 @@ struct EditUser { | @@ -80,6 +80,7 @@ struct EditUser { | ||
| 80 | } | 80 | } |
| 81 | build() { | 81 | build() { |
| 82 | Column(){ | 82 | Column(){ |
| 83 | + NavHeader({title: '公司信息'}) | ||
| 83 | Column(){ | 84 | Column(){ |
| 84 | Column(){ | 85 | Column(){ |
| 85 | Row(){ | 86 | Row(){ |
| 1 | +import NavHeader from '../components/NavHeader' | ||
| 1 | @Entry | 2 | @Entry |
| 2 | @Component | 3 | @Component |
| 3 | struct CancellationAgreement { | 4 | struct CancellationAgreement { |
| 4 | build() { | 5 | build() { |
| 5 | Scroll(){ | 6 | Scroll(){ |
| 6 | Column({space: 10}){ | 7 | Column({space: 10}){ |
| 8 | + NavHeader({title: '注销协议'}) | ||
| 7 | Text('消防维保助手账号注销协议').textAlign(TextAlign.Center).width('100%') | 9 | Text('消防维保助手账号注销协议').textAlign(TextAlign.Center).width('100%') |
| 8 | Column({space: 10}){ | 10 | Column({space: 10}){ |
| 9 | Text('尊敬的用户,您好!在您正式开始下一步消防维保助手账号注销流程前,我们特意为您作出如下重要提示:注销消防维保助手账号是不可恢复的操作,注销消防维保助手账号后,您将无法找回您通过该账号添加或绑定的任何内容和信息,即使您选择相同的身份证号/统一社会信用代码再次注册账号并使 用消防维保助手产品及服务。').fontSize(12) | 11 | Text('尊敬的用户,您好!在您正式开始下一步消防维保助手账号注销流程前,我们特意为您作出如下重要提示:注销消防维保助手账号是不可恢复的操作,注销消防维保助手账号后,您将无法找回您通过该账号添加或绑定的任何内容和信息,即使您选择相同的身份证号/统一社会信用代码再次注册账号并使 用消防维保助手产品及服务。').fontSize(12) |
| @@ -8,7 +8,7 @@ import PhotoBrowser from '../dialog/PhotoBrowserDialog' | @@ -8,7 +8,7 @@ import PhotoBrowser from '../dialog/PhotoBrowserDialog' | ||
| 8 | import { uploadFile, uploadResult } from '../utils/uploadFile' | 8 | import { uploadFile, uploadResult } from '../utils/uploadFile' |
| 9 | import { request } from '@kit.BasicServicesKit' | 9 | import { request } from '@kit.BasicServicesKit' |
| 10 | import { promptAction } from '@kit.ArkUI'; | 10 | import { promptAction } from '@kit.ArkUI'; |
| 11 | - | 11 | +import NavHeader from '../components/NavHeader' |
| 12 | let personId = preferencesUtil.get('XF_PERSON_ID', 0) as number | 12 | let personId = preferencesUtil.get('XF_PERSON_ID', 0) as number |
| 13 | @Entry | 13 | @Entry |
| 14 | @Component | 14 | @Component |
| @@ -56,6 +56,7 @@ struct EditUser { | @@ -56,6 +56,7 @@ struct EditUser { | ||
| 56 | }) | 56 | }) |
| 57 | build() { | 57 | build() { |
| 58 | Column(){ | 58 | Column(){ |
| 59 | + NavHeader({ title: '证书信息'}) | ||
| 59 | Column(){ | 60 | Column(){ |
| 60 | Column(){ | 61 | Column(){ |
| 61 | Row(){ | 62 | Row(){ |
| @@ -13,6 +13,8 @@ import { getReportDetail, getMalfunctionList, deleteRecords, successReport, retu | @@ -13,6 +13,8 @@ import { getReportDetail, getMalfunctionList, deleteRecords, successReport, retu | ||
| 13 | import { reportDetailTest, reportDetailData, ProjectList, MalfunctionListTest, MalfunctionListRow, configTest } from '../api/recordsType' | 13 | import { reportDetailTest, reportDetailData, ProjectList, MalfunctionListTest, MalfunctionListRow, configTest } from '../api/recordsType' |
| 14 | import { pushOutsideWeb } from '../utils/pushOutsideWeb' | 14 | import { pushOutsideWeb } from '../utils/pushOutsideWeb' |
| 15 | import ThemeStaticTest from '../components/ThemeStaticText' | 15 | import ThemeStaticTest from '../components/ThemeStaticText' |
| 16 | +import NavHeader from '../components/NavHeader' | ||
| 17 | + | ||
| 16 | 18 | ||
| 17 | interface routerParams { | 19 | interface routerParams { |
| 18 | reportId: number | 20 | reportId: number |
| @@ -85,6 +87,8 @@ struct DetailRecords { | @@ -85,6 +87,8 @@ struct DetailRecords { | ||
| 85 | } | 87 | } |
| 86 | 88 | ||
| 87 | build() { | 89 | build() { |
| 90 | + Column(){ | ||
| 91 | + NavHeader({title: '维保记录详情'}) | ||
| 88 | Scroll(){ | 92 | Scroll(){ |
| 89 | Column({space: 10}){ | 93 | Column({space: 10}){ |
| 90 | // 概况 | 94 | // 概况 |
| @@ -147,6 +151,10 @@ struct DetailRecords { | @@ -147,6 +151,10 @@ struct DetailRecords { | ||
| 147 | Text(this.reportDetail?.maintenanceEndTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3}) | 151 | Text(this.reportDetail?.maintenanceEndTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3}) |
| 148 | }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%') | 152 | }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%') |
| 149 | Row(){ | 153 | Row(){ |
| 154 | + Text('项目负责人').fontSize(12).fontColor('#999') | ||
| 155 | + Text(this.reportDetail?.approvePerson || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3}) | ||
| 156 | + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%') | ||
| 157 | + Row(){ | ||
| 150 | Text('维保人员').fontSize(12).fontColor('#999') | 158 | Text('维保人员').fontSize(12).fontColor('#999') |
| 151 | Text(this.reportDetail?.maintenancePeople || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3}) | 159 | Text(this.reportDetail?.maintenancePeople || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3}) |
| 152 | }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%') | 160 | }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%') |
| @@ -486,6 +494,18 @@ struct DetailRecords { | @@ -486,6 +494,18 @@ struct DetailRecords { | ||
| 486 | }) | 494 | }) |
| 487 | }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%') | 495 | }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%') |
| 488 | }.width('100%') | 496 | }.width('100%') |
| 489 | - }.height('100%').backgroundColor('#f2f3f7').padding(10) | 497 | + }.backgroundColor('#f2f3f7').padding(10) |
| 498 | + }.height('100%').backgroundColor('#f2f3f7').padding( {bottom: 20}) | ||
| 499 | + } | ||
| 500 | + | ||
| 501 | + | ||
| 502 | + pageTransition() { | ||
| 503 | + // 该页面进入动画时长为1000ms,尽量与另一页面的退出动画时长匹配 | ||
| 504 | + PageTransitionEnter({ duration: 500 }) | ||
| 505 | + .slide(SlideEffect.Left).opacity(0) | ||
| 506 | + // 该页面退出动画时长为1200ms,尽量与另一页面的进入动画时长匹配 | ||
| 507 | + PageTransitionExit({ duration: 500 }) | ||
| 508 | + .translate({ x: 150.0 }) | ||
| 509 | + .opacity(0) | ||
| 490 | } | 510 | } |
| 491 | } | 511 | } |
| @@ -9,7 +9,7 @@ import { AxiosResponse } from '@ohos/axios' | @@ -9,7 +9,7 @@ import { AxiosResponse } from '@ohos/axios' | ||
| 9 | import PhotoBrowser from '../dialog/PhotoBrowserDialog' | 9 | import PhotoBrowser from '../dialog/PhotoBrowserDialog' |
| 10 | import { uploadFile, uploadResult } from '../utils/uploadFile' | 10 | import { uploadFile, uploadResult } from '../utils/uploadFile' |
| 11 | import { request } from '@kit.BasicServicesKit' | 11 | import { request } from '@kit.BasicServicesKit' |
| 12 | - | 12 | +import NavHeader from '../components/NavHeader' |
| 13 | @Entry | 13 | @Entry |
| 14 | @Component | 14 | @Component |
| 15 | struct EditUser { | 15 | struct EditUser { |
| @@ -43,6 +43,7 @@ struct EditUser { | @@ -43,6 +43,7 @@ struct EditUser { | ||
| 43 | 43 | ||
| 44 | build() { | 44 | build() { |
| 45 | Column(){ | 45 | Column(){ |
| 46 | + NavHeader({title: '修改企业信息'}) | ||
| 46 | Column(){ | 47 | Column(){ |
| 47 | Column(){ | 48 | Column(){ |
| 48 | Row(){ | 49 | Row(){ |
| @@ -9,6 +9,8 @@ import { AxiosResponse } from '@ohos/axios' | @@ -9,6 +9,8 @@ import { AxiosResponse } from '@ohos/axios' | ||
| 9 | import PhotoBrowser from '../dialog/PhotoBrowserDialog' | 9 | import PhotoBrowser from '../dialog/PhotoBrowserDialog' |
| 10 | import { uploadFile, uploadResult } from '../utils/uploadFile' | 10 | import { uploadFile, uploadResult } from '../utils/uploadFile' |
| 11 | import { request } from '@kit.BasicServicesKit' | 11 | import { request } from '@kit.BasicServicesKit' |
| 12 | +import NavHeader from '../components/NavHeader' | ||
| 13 | + | ||
| 12 | 14 | ||
| 13 | @Entry | 15 | @Entry |
| 14 | @Component | 16 | @Component |
| @@ -43,6 +45,7 @@ struct EditUser { | @@ -43,6 +45,7 @@ struct EditUser { | ||
| 43 | } | 45 | } |
| 44 | build() { | 46 | build() { |
| 45 | Column(){ | 47 | Column(){ |
| 48 | + NavHeader({title: '编辑个人信息'}) | ||
| 46 | Scroll(){ | 49 | Scroll(){ |
| 47 | Column(){ | 50 | Column(){ |
| 48 | Column(){ | 51 | Column(){ |
| @@ -4,6 +4,8 @@ import { MalfunctionListTest, MalfunctionListRow } from '../api/recordsType' | @@ -4,6 +4,8 @@ import { MalfunctionListTest, MalfunctionListRow } from '../api/recordsType' | ||
| 4 | import { AxiosResponse } from '@ohos/axios' | 4 | import { AxiosResponse } from '@ohos/axios' |
| 5 | import ThemeStaticTest from '../components/ThemeStaticText' | 5 | import ThemeStaticTest from '../components/ThemeStaticText' |
| 6 | import ImportRecordDialog from '../dialog/ImportRecordsDialog' | 6 | import ImportRecordDialog from '../dialog/ImportRecordsDialog' |
| 7 | +import NavHeader from '../components/NavHeader' | ||
| 8 | + | ||
| 7 | interface routerParams { | 9 | interface routerParams { |
| 8 | applyCompanyName: string | 10 | applyCompanyName: string |
| 9 | companyName: string | 11 | companyName: string |
| @@ -60,13 +62,14 @@ struct FailureMaintenance { | @@ -60,13 +62,14 @@ struct FailureMaintenance { | ||
| 60 | malfunctionPart: "", | 62 | malfunctionPart: "", |
| 61 | remark: '', | 63 | remark: '', |
| 62 | security: "", | 64 | security: "", |
| 65 | + malfunctionId: 0, | ||
| 63 | reportId: routerQuery.reportId | 66 | reportId: routerQuery.reportId |
| 64 | } | 67 | } |
| 65 | ] | 68 | ] |
| 66 | - | 69 | + @State malfunctionId: number = 0 |
| 67 | @State findTime: string | null |undefined = '' | 70 | @State findTime: string | null |undefined = '' |
| 68 | - @State maintenanceComment: string | null |undefined = '' | ||
| 69 | - @State applyCompanyComment: string | null |undefined = '' | 71 | + @State maintenanceComment: string = '' |
| 72 | + @State applyCompanyComment: string = '' | ||
| 70 | ImportController: CustomDialogController = new CustomDialogController({ | 73 | ImportController: CustomDialogController = new CustomDialogController({ |
| 71 | builder: ImportRecordDialog({ | 74 | builder: ImportRecordDialog({ |
| 72 | applyCompanyName: routerQuery.applyCompanyName, | 75 | applyCompanyName: routerQuery.applyCompanyName, |
| @@ -77,8 +80,8 @@ struct FailureMaintenance { | @@ -77,8 +80,8 @@ struct FailureMaintenance { | ||
| 77 | this.malfunctionList = malfunction.data.rows | 80 | this.malfunctionList = malfunction.data.rows |
| 78 | } | 81 | } |
| 79 | this.findTime = this.malfunctionList[0]?.findTime | 82 | this.findTime = this.malfunctionList[0]?.findTime |
| 80 | - this.maintenanceComment = this.malfunctionList[0]?.maintenanceComment | ||
| 81 | - this.applyCompanyComment = this.malfunctionList[0]?.applyCompanyComment | 83 | + this.maintenanceComment = this.malfunctionList[0]?.maintenanceComment as string |
| 84 | + this.applyCompanyComment = this.malfunctionList[0]?.applyCompanyComment as string | ||
| 82 | } | 85 | } |
| 83 | }), | 86 | }), |
| 84 | customStyle: true, | 87 | customStyle: true, |
| @@ -91,13 +94,15 @@ struct FailureMaintenance { | @@ -91,13 +94,15 @@ struct FailureMaintenance { | ||
| 91 | const malfunction: AxiosResponse<MalfunctionListTest> = await getMalfunctionList({ pageNum: 1, pageSize: 500, reportId: routerQuery?.reportId }) | 94 | const malfunction: AxiosResponse<MalfunctionListTest> = await getMalfunctionList({ pageNum: 1, pageSize: 500, reportId: routerQuery?.reportId }) |
| 92 | if(malfunction.data.rows.length !== 0) { | 95 | if(malfunction.data.rows.length !== 0) { |
| 93 | this.malfunctionList = malfunction.data.rows | 96 | this.malfunctionList = malfunction.data.rows |
| 97 | + console.log('故障列表' + JSON.stringify(this.malfunctionList)) | ||
| 94 | } | 98 | } |
| 95 | this.findTime = this.malfunctionList[0]?.findTime | 99 | this.findTime = this.malfunctionList[0]?.findTime |
| 96 | - this.maintenanceComment = this.malfunctionList[0]?.maintenanceComment | ||
| 97 | - this.applyCompanyComment = this.malfunctionList[0]?.applyCompanyComment | 100 | + this.maintenanceComment = this.malfunctionList[0]?.maintenanceComment as string |
| 101 | + this.applyCompanyComment = this.malfunctionList[0]?.applyCompanyComment as string | ||
| 98 | } | 102 | } |
| 99 | build() { | 103 | build() { |
| 100 | Column(){ | 104 | Column(){ |
| 105 | + NavHeader({title: '故障维修'}) | ||
| 101 | Column(){ | 106 | Column(){ |
| 102 | Column(){ | 107 | Column(){ |
| 103 | // 基本信息 | 108 | // 基本信息 |
| @@ -154,7 +159,8 @@ struct FailureMaintenance { | @@ -154,7 +159,8 @@ struct FailureMaintenance { | ||
| 154 | malfunctionConfirm: '', | 159 | malfunctionConfirm: '', |
| 155 | remark: '', | 160 | remark: '', |
| 156 | reportId: routerQuery.reportId, | 161 | reportId: routerQuery.reportId, |
| 157 | - security: '' | 162 | + security: '', |
| 163 | + malfunctionId: this.malfunctionId + 1 | ||
| 158 | } | 164 | } |
| 159 | this.malfunctionList.push(Malfunction) | 165 | this.malfunctionList.push(Malfunction) |
| 160 | promptAction.showToast({ | 166 | promptAction.showToast({ |
| @@ -168,7 +174,7 @@ struct FailureMaintenance { | @@ -168,7 +174,7 @@ struct FailureMaintenance { | ||
| 168 | promptAction.showToast({message: '至少保留一个'}) | 174 | promptAction.showToast({message: '至少保留一个'}) |
| 169 | } else { | 175 | } else { |
| 170 | this.malfunctionList = this.malfunctionList.filter((children: MalfunctionListRow) => children.malfunctionId !== item.malfunctionId ) | 176 | this.malfunctionList = this.malfunctionList.filter((children: MalfunctionListRow) => children.malfunctionId !== item.malfunctionId ) |
| 171 | - this.malfunctionList[0].findTime = this.findTime | 177 | + this.malfunctionList[0].findTime = this.findTime as string |
| 172 | this.malfunctionList[0].maintenanceComment = this.maintenanceComment | 178 | this.malfunctionList[0].maintenanceComment = this.maintenanceComment |
| 173 | this.malfunctionList[0].applyCompanyComment = this.applyCompanyComment | 179 | this.malfunctionList[0].applyCompanyComment = this.applyCompanyComment |
| 174 | } | 180 | } |
| @@ -30,7 +30,7 @@ struct Index { | @@ -30,7 +30,7 @@ struct Index { | ||
| 30 | async aboutToAppear() { | 30 | async aboutToAppear() { |
| 31 | const noticeRes: AxiosResponse<noticeDetailTest> = await getNoticeDetail(13) | 31 | const noticeRes: AxiosResponse<noticeDetailTest> = await getNoticeDetail(13) |
| 32 | this.noticeInfo = noticeRes.data.data | 32 | this.noticeInfo = noticeRes.data.data |
| 33 | - if (preferencesUtil.get('XF_TOKEN', '')) { | 33 | + if (this.noticeInfo.noticeContent !== '') { |
| 34 | this.dialogController.open() | 34 | this.dialogController.open() |
| 35 | } | 35 | } |
| 36 | } | 36 | } |
| @@ -4,8 +4,10 @@ import { login, getPersonInfo, getInfo, getCompanyInfo } from '../api/user' | @@ -4,8 +4,10 @@ import { login, getPersonInfo, getInfo, getCompanyInfo } from '../api/user' | ||
| 4 | import { router, promptAction } from '@kit.ArkUI' | 4 | import { router, promptAction } from '@kit.ArkUI' |
| 5 | import SelectRegDialog from '../dialog/SelectRegTypeDialog' | 5 | import SelectRegDialog from '../dialog/SelectRegTypeDialog' |
| 6 | import preferencesUtil from '../utils/preferences' | 6 | import preferencesUtil from '../utils/preferences' |
| 7 | + | ||
| 7 | let account: string = preferencesUtil.get('XF_ACCOUNT', '') as string || '' | 8 | let account: string = preferencesUtil.get('XF_ACCOUNT', '') as string || '' |
| 8 | let password: string = preferencesUtil.get('XF_PASSWORD', '') as string || '' | 9 | let password: string = preferencesUtil.get('XF_PASSWORD', '') as string || '' |
| 10 | + | ||
| 9 | @Entry | 11 | @Entry |
| 10 | @Component | 12 | @Component |
| 11 | struct Login { | 13 | struct Login { |
| @@ -17,7 +19,7 @@ struct Login { | @@ -17,7 +19,7 @@ struct Login { | ||
| 17 | @State agreeSelect: boolean = false | 19 | @State agreeSelect: boolean = false |
| 18 | // 记住密码 | 20 | // 记住密码 |
| 19 | @State rememberSelect: boolean = preferencesUtil.get('XF_REMEMBER', false) as boolean | 21 | @State rememberSelect: boolean = preferencesUtil.get('XF_REMEMBER', false) as boolean |
| 20 | - aboutToAppear(): void { | 22 | + async aboutToAppear() { |
| 21 | if(this.rememberSelect) { | 23 | if(this.rememberSelect) { |
| 22 | this.loginForm.username = account | 24 | this.loginForm.username = account |
| 23 | this.loginForm.password = password | 25 | this.loginForm.password = password |
| @@ -28,7 +30,7 @@ struct Login { | @@ -28,7 +30,7 @@ struct Login { | ||
| 28 | }) | 30 | }) |
| 29 | } | 31 | } |
| 30 | } | 32 | } |
| 31 | - | 33 | + // 选择注册方式弹窗 |
| 32 | selectRegController: CustomDialogController = new CustomDialogController({ | 34 | selectRegController: CustomDialogController = new CustomDialogController({ |
| 33 | builder: SelectRegDialog(), | 35 | builder: SelectRegDialog(), |
| 34 | alignment: DialogAlignment.Bottom | 36 | alignment: DialogAlignment.Bottom |
| @@ -39,7 +41,7 @@ struct Login { | @@ -39,7 +41,7 @@ struct Login { | ||
| 39 | Column({space: 20}){ | 41 | Column({space: 20}){ |
| 40 | Image($r('app.media.logo')).width(100).borderRadius(22) | 42 | Image($r('app.media.logo')).width(100).borderRadius(22) |
| 41 | Text('消防维保助手').fontSize(30).fontWeight(500).fontColor('#fff') | 43 | Text('消防维保助手').fontSize(30).fontWeight(500).fontColor('#fff') |
| 42 | - }.margin({top: 30, bottom: 50}) | 44 | + }.margin({top: 50, bottom: 50}) |
| 43 | 45 | ||
| 44 | Column(){ | 46 | Column(){ |
| 45 | Row(){ | 47 | Row(){ |
| @@ -99,6 +101,7 @@ struct Login { | @@ -99,6 +101,7 @@ struct Login { | ||
| 99 | .onChange((value: boolean) => { | 101 | .onChange((value: boolean) => { |
| 100 | this.rememberSelect = value | 102 | this.rememberSelect = value |
| 101 | preferencesUtil.set('XF_REMEMBER', value) | 103 | preferencesUtil.set('XF_REMEMBER', value) |
| 104 | + // 记住密码 | ||
| 102 | if(value) { | 105 | if(value) { |
| 103 | preferencesUtil.set('XF_ACCOUNT', this.loginForm.username) | 106 | preferencesUtil.set('XF_ACCOUNT', this.loginForm.username) |
| 104 | preferencesUtil.set('XF_PASSWORD', this.loginForm.password) | 107 | preferencesUtil.set('XF_PASSWORD', this.loginForm.password) |
| @@ -128,10 +131,11 @@ struct Login { | @@ -128,10 +131,11 @@ struct Login { | ||
| 128 | } | 131 | } |
| 129 | const res: AxiosResponse<loginType> = await login(this.loginForm) | 132 | const res: AxiosResponse<loginType> = await login(this.loginForm) |
| 130 | const token = res.data.token | 133 | const token = res.data.token |
| 131 | - await preferencesUtil.set('XF_TOKEN', token) | 134 | + preferencesUtil.set('XF_TOKEN', token) |
| 132 | const accountInfo: AxiosResponse<InfoTest> = await getInfo() | 135 | const accountInfo: AxiosResponse<InfoTest> = await getInfo() |
| 133 | let roleName: string = accountInfo.data.roles[0] || '' | 136 | let roleName: string = accountInfo.data.roles[0] || '' |
| 134 | - await preferencesUtil.set('XF_ROLE_NAME', roleName) | 137 | + preferencesUtil.set('XF_ROLE_NAME', roleName) |
| 138 | + // 根据角色存储不同的数据 | ||
| 135 | if(roleName == 'person'){ | 139 | if(roleName == 'person'){ |
| 136 | let personInfo: AxiosResponse<personTest> = await getPersonInfo() | 140 | let personInfo: AxiosResponse<personTest> = await getPersonInfo() |
| 137 | preferencesUtil.set('XF_PERSON_INFO', JSON.stringify(personInfo.data.data)) | 141 | preferencesUtil.set('XF_PERSON_INFO', JSON.stringify(personInfo.data.data)) |
| @@ -195,6 +199,6 @@ struct Login { | @@ -195,6 +199,6 @@ struct Login { | ||
| 195 | .textAlign(TextAlign.Center) | 199 | .textAlign(TextAlign.Center) |
| 196 | }.width('100%').height('100%').backgroundImage($r('app.media.login_back')) | 200 | }.width('100%').height('100%').backgroundImage($r('app.media.login_back')) |
| 197 | .backgroundImageSize({width: '100%'}) | 201 | .backgroundImageSize({width: '100%'}) |
| 198 | - .expandSafeArea([SafeAreaType.SYSTEM]) | 202 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) |
| 199 | } | 203 | } |
| 200 | } | 204 | } |
| @@ -150,7 +150,10 @@ struct MaintenanceRecords { | @@ -150,7 +150,10 @@ struct MaintenanceRecords { | ||
| 150 | Column(){ | 150 | Column(){ |
| 151 | // 顶部搜索 | 151 | // 顶部搜索 |
| 152 | Row(){ | 152 | Row(){ |
| 153 | - Search({ value: $$this.params.reportName, placeholder: '请输入【原始记录名称】' }) | 153 | + Image($r('app.media.back_light')).width(20).onClick(() => { |
| 154 | + router.back() | ||
| 155 | + }) | ||
| 156 | + Search({ value: $$this.params.reportName, placeholder: '请输入【项目名称】' }) | ||
| 154 | .searchButton('搜索', { | 157 | .searchButton('搜索', { |
| 155 | fontSize: 12 | 158 | fontSize: 12 |
| 156 | }) | 159 | }) |
| @@ -260,4 +263,12 @@ struct MaintenanceRecords { | @@ -260,4 +263,12 @@ struct MaintenanceRecords { | ||
| 260 | }) | 263 | }) |
| 261 | }.width('100%').height('100%') | 264 | }.width('100%').height('100%') |
| 262 | } | 265 | } |
| 266 | + | ||
| 267 | + | ||
| 268 | + pageTransition() { | ||
| 269 | + // 该页面退出动画时长为1200ms,尽量与另一页面的进入动画时长匹配 | ||
| 270 | + PageTransitionExit({ duration: 500 }) | ||
| 271 | + .translate({ x: 150.0 }) | ||
| 272 | + .opacity(0) | ||
| 273 | + } | ||
| 263 | } | 274 | } |
| @@ -11,7 +11,6 @@ import FilterOrderDialog from '../dialog/FilterOrderDialog' | @@ -11,7 +11,6 @@ import FilterOrderDialog from '../dialog/FilterOrderDialog' | ||
| 11 | import FilterRecordDialog from '../dialog/FilterRecordDialog' | 11 | import FilterRecordDialog from '../dialog/FilterRecordDialog' |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | - | ||
| 15 | let companyId = preferencesUtils.get('XF_COMPANY_ID', '') as number | 14 | let companyId = preferencesUtils.get('XF_COMPANY_ID', '') as number |
| 16 | @Entry | 15 | @Entry |
| 17 | @Component | 16 | @Component |
| @@ -144,6 +143,9 @@ struct MyWallet { | @@ -144,6 +143,9 @@ struct MyWallet { | ||
| 144 | Column(){ | 143 | Column(){ |
| 145 | // 顶部搜索 | 144 | // 顶部搜索 |
| 146 | Row(){ | 145 | Row(){ |
| 146 | + Image($r('app.media.back_light')).width(20).onClick(() => { | ||
| 147 | + router.back() | ||
| 148 | + }) | ||
| 147 | Search({ placeholder: this.searchTip, value: $$this.searchKey }) | 149 | Search({ placeholder: this.searchTip, value: $$this.searchKey }) |
| 148 | .searchButton('搜索', { | 150 | .searchButton('搜索', { |
| 149 | fontSize: 12 | 151 | fontSize: 12 |
| @@ -2,6 +2,7 @@ import { router } from '@kit.ArkUI' | @@ -2,6 +2,7 @@ import { router } from '@kit.ArkUI' | ||
| 2 | import { AxiosResponse } from '@ohos/axios' | 2 | import { AxiosResponse } from '@ohos/axios' |
| 3 | import { getNoticeDetail, noticeDetailTest, noticeRow } from '../api/notice' | 3 | import { getNoticeDetail, noticeDetailTest, noticeRow } from '../api/notice' |
| 4 | import {HmParseHTML} from "@wuyan/html_parse" | 4 | import {HmParseHTML} from "@wuyan/html_parse" |
| 5 | +import NavHeader from '../components/NavHeader' | ||
| 5 | interface routerParams { | 6 | interface routerParams { |
| 6 | id: number | 7 | id: number |
| 7 | } | 8 | } |
| @@ -20,6 +21,7 @@ struct NoticeDetail { | @@ -20,6 +21,7 @@ struct NoticeDetail { | ||
| 20 | build() { | 21 | build() { |
| 21 | Scroll(){ | 22 | Scroll(){ |
| 22 | Column({space: 10}){ | 23 | Column({space: 10}){ |
| 24 | + NavHeader({title: '公告详情'}) | ||
| 23 | Text(this.noticeDetail?.noticeTitle).fontSize(24).fontWeight(700) | 25 | Text(this.noticeDetail?.noticeTitle).fontSize(24).fontWeight(700) |
| 24 | Text(this.noticeDetail?.createTime).fontSize(12).fontColor('#999') | 26 | Text(this.noticeDetail?.createTime).fontSize(12).fontColor('#999') |
| 25 | HmParseHTML({ | 27 | HmParseHTML({ |
| @@ -83,6 +83,9 @@ struct NoticeList { | @@ -83,6 +83,9 @@ struct NoticeList { | ||
| 83 | // 顶部搜索 | 83 | // 顶部搜索 |
| 84 | // 顶部搜索 | 84 | // 顶部搜索 |
| 85 | Row(){ | 85 | Row(){ |
| 86 | + Image($r('app.media.back_light')).width(20).onClick(() => { | ||
| 87 | + router.back() | ||
| 88 | + }) | ||
| 86 | Search({ value: $$this.params.noticeTitle, placeholder: '请输入公告标题' }) | 89 | Search({ value: $$this.params.noticeTitle, placeholder: '请输入公告标题' }) |
| 87 | .searchButton('搜索', { | 90 | .searchButton('搜索', { |
| 88 | fontSize: 12 | 91 | fontSize: 12 |
| 1 | 1 | ||
| 2 | import { webview } from '@kit.ArkWeb'; | 2 | import { webview } from '@kit.ArkWeb'; |
| 3 | - | 3 | +import NavHeader from '../components/NavHeader' |
| 4 | @Entry | 4 | @Entry |
| 5 | @Component | 5 | @Component |
| 6 | struct WebComponent { | 6 | struct WebComponent { |
| 7 | controller: webview.WebviewController = new webview.WebviewController(); | 7 | controller: webview.WebviewController = new webview.WebviewController(); |
| 8 | build() { | 8 | build() { |
| 9 | Column() { | 9 | Column() { |
| 10 | + NavHeader({title: '操作手册'}) | ||
| 10 | Web({ src: 'https://doc.crgx.net/xf-app/function.html', controller: this.controller }) | 11 | Web({ src: 'https://doc.crgx.net/xf-app/function.html', controller: this.controller }) |
| 11 | - } | 12 | + }.width('100%') |
| 12 | } | 13 | } |
| 13 | } | 14 | } |
| @@ -3,7 +3,7 @@ import { personData, personTest } from '../api/userType' | @@ -3,7 +3,7 @@ import { personData, personTest } from '../api/userType' | ||
| 3 | import baseUrl from '../utils/baseUrl' | 3 | import baseUrl from '../utils/baseUrl' |
| 4 | import { router } from '@kit.ArkUI'; | 4 | import { router } from '@kit.ArkUI'; |
| 5 | import { AxiosResponse } from '@ohos/axios' | 5 | import { AxiosResponse } from '@ohos/axios' |
| 6 | - | 6 | +import NavHeader from '../components/NavHeader' |
| 7 | import { getPersonDetail } from '../api/user' | 7 | import { getPersonDetail } from '../api/user' |
| 8 | interface routerQuery { | 8 | interface routerQuery { |
| 9 | personId: number | 9 | personId: number |
| @@ -70,6 +70,7 @@ struct EditUser { | @@ -70,6 +70,7 @@ struct EditUser { | ||
| 70 | } | 70 | } |
| 71 | build() { | 71 | build() { |
| 72 | Column(){ | 72 | Column(){ |
| 73 | + NavHeader({title: '个人信息'}) | ||
| 73 | Column(){ | 74 | Column(){ |
| 74 | Column(){ | 75 | Column(){ |
| 75 | Row(){ | 76 | Row(){ |
| @@ -119,6 +119,9 @@ struct PersonList { | @@ -119,6 +119,9 @@ struct PersonList { | ||
| 119 | Column(){ | 119 | Column(){ |
| 120 | // 顶部搜索 | 120 | // 顶部搜索 |
| 121 | Row(){ | 121 | Row(){ |
| 122 | + Image($r('app.media.back_light')).width(20).onClick(() => { | ||
| 123 | + router.back() | ||
| 124 | + }) | ||
| 122 | Search({ value: $$this.params.personName, placeholder: '请输入人员姓名' }) | 125 | Search({ value: $$this.params.personName, placeholder: '请输入人员姓名' }) |
| 123 | .searchButton('搜索', { | 126 | .searchButton('搜索', { |
| 124 | fontSize: 12 | 127 | fontSize: 12 |
| @@ -3,7 +3,7 @@ import preferencesUtils from '../utils/preferences' | @@ -3,7 +3,7 @@ import preferencesUtils from '../utils/preferences' | ||
| 3 | import { getCompanyWallet, getBean , getComboList, beanType } from '../api/user' | 3 | import { getCompanyWallet, getBean , getComboList, beanType } from '../api/user' |
| 4 | import { promptAction } from '@kit.ArkUI'; | 4 | import { promptAction } from '@kit.ArkUI'; |
| 5 | import { AxiosResponse } from '@ohos/axios' | 5 | import { AxiosResponse } from '@ohos/axios' |
| 6 | - | 6 | +import NavHeader from '../components/NavHeader' |
| 7 | let companyId = preferencesUtils.get('XF_COMPANY_ID', '') as number | 7 | let companyId = preferencesUtils.get('XF_COMPANY_ID', '') as number |
| 8 | 8 | ||
| 9 | @Entry | 9 | @Entry |
| @@ -39,6 +39,7 @@ struct EditUser { | @@ -39,6 +39,7 @@ struct EditUser { | ||
| 39 | } | 39 | } |
| 40 | build() { | 40 | build() { |
| 41 | Column(){ | 41 | Column(){ |
| 42 | + NavHeader({title: '充值'}) | ||
| 42 | Column(){ | 43 | Column(){ |
| 43 | Column(){ | 44 | Column(){ |
| 44 | Row(){ | 45 | Row(){ |
| @@ -9,6 +9,8 @@ import { AxiosResponse } from '@ohos/axios' | @@ -9,6 +9,8 @@ import { AxiosResponse } from '@ohos/axios' | ||
| 9 | import { uploadFile, uploadResult } from '../utils/uploadFile' | 9 | import { uploadFile, uploadResult } from '../utils/uploadFile' |
| 10 | import { uploadDocFile } from '../utils/uploadDocmentFile' | 10 | import { uploadDocFile } from '../utils/uploadDocmentFile' |
| 11 | import { request } from '@kit.BasicServicesKit' | 11 | import { request } from '@kit.BasicServicesKit' |
| 12 | +import NavHeader from '../components/NavHeader' | ||
| 13 | + | ||
| 12 | 14 | ||
| 13 | @Entry | 15 | @Entry |
| 14 | @Component | 16 | @Component |
| @@ -86,6 +88,7 @@ struct UserRegister { | @@ -86,6 +88,7 @@ struct UserRegister { | ||
| 86 | } | 88 | } |
| 87 | build() { | 89 | build() { |
| 88 | Column(){ | 90 | Column(){ |
| 91 | + NavHeader({title: '注册'}) | ||
| 89 | Scroll(){ | 92 | Scroll(){ |
| 90 | Column(){ | 93 | Column(){ |
| 91 | Column(){ | 94 | Column(){ |
| 1 | +import { CSJSplashAd } from '@csj/openadsdk'; | ||
| 2 | +import { NodeController, window } from '@kit.ArkUI'; | ||
| 3 | + | ||
| 4 | +@Entry({ | ||
| 5 | + routeName: "GMSplashAdShowPage", | ||
| 6 | + storage: LocalStorage.getShared() | ||
| 7 | +}) | ||
| 8 | +@Component | ||
| 9 | +export struct SplashAdShowPage { | ||
| 10 | + @LocalStorageLink('GMSplashAd') splashAd: CSJSplashAd | undefined = undefined | ||
| 11 | + @LocalStorageLink('GMSplashSubWindow') _window: window.Window | undefined = undefined | ||
| 12 | + @LocalStorageProp('GMSplashCustomCloseBtn') splashCustomCloseBtn: boolean = false | ||
| 13 | + @State splashAdComponent: NodeController | undefined = undefined | ||
| 14 | + | ||
| 15 | + aboutToAppear(): void { | ||
| 16 | + this.splashAdComponent = this.splashAd?.getAdComponent(this.splashCustomCloseBtn, this._window) | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + onPageShow(): void { | ||
| 20 | + this._window?.setWindowLayoutFullScreen(true) | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + onPageHide(): void { | ||
| 24 | + this._window?.setWindowLayoutFullScreen(false) | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + build() { | ||
| 28 | + Stack() { | ||
| 29 | + if (this.splashAdComponent) { | ||
| 30 | + NodeContainer(this.splashAdComponent) | ||
| 31 | + } | ||
| 32 | + if (this.splashCustomCloseBtn) { | ||
| 33 | + Text('close') | ||
| 34 | + .textAlign(TextAlign.Center) | ||
| 35 | + .backgroundColor(Color.Yellow) | ||
| 36 | + .width(60) | ||
| 37 | + .height(60) | ||
| 38 | + .borderRadius(30) | ||
| 39 | + .margin({ left: 50, top: 50 }) | ||
| 40 | + .onClick(() => { | ||
| 41 | + this.closeBtnClicked() | ||
| 42 | + }) | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + .alignContent(Alignment.TopStart) | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + closeBtnClicked() { | ||
| 49 | + this._window?.destroyWindow() | ||
| 50 | + } | ||
| 51 | +} |
| 1 | -@Entry | ||
| 2 | -@Component | ||
| 3 | -struct SplashFullScreenAdPage { | ||
| 4 | - @State message: string = 'Hello World'; | ||
| 5 | - | ||
| 6 | - build() { | ||
| 7 | - RelativeContainer() { | ||
| 8 | - Text(this.message) | ||
| 9 | - .id('SplashFullScreenAdPageHelloWorld') | ||
| 10 | - .fontSize(50) | ||
| 11 | - .fontWeight(FontWeight.Bold) | ||
| 12 | - .alignRules({ | ||
| 13 | - center: { anchor: '__container__', align: VerticalAlign.Center }, | ||
| 14 | - middle: { anchor: '__container__', align: HorizontalAlign.Center } | ||
| 15 | - }) | ||
| 16 | - } | ||
| 17 | - .height('100%') | ||
| 18 | - .width('100%') | ||
| 19 | - } | ||
| 20 | -} |
| 1 | -import { Prompt, router } from '@kit.ArkUI'; | ||
| 2 | -import { advertising, AdComponent } from '@kit.AdsKit'; | ||
| 3 | -import { hilog } from '@kit.PerformanceAnalysisKit'; | ||
| 4 | - | ||
| 5 | -@Entry | ||
| 6 | -@Component | ||
| 7 | -export struct SplashHalfScreenAdPage { | ||
| 8 | - private ads: Array<advertising.Advertisement> = []; | ||
| 9 | - private displayOptions?: advertising.AdDisplayOptions; | ||
| 10 | - | ||
| 11 | - aboutToAppear() { | ||
| 12 | - hilog.info(0x0000, 'testTag', '%{public}s', 'Start to splashHalfScreenAdPage aboutToAppear'); | ||
| 13 | - const params: Record<string, Object> = router.getParams() as Record<string, Object>; | ||
| 14 | - if (params && params.ads as Array<advertising.Advertisement> && | ||
| 15 | - params.displayOptions as advertising.AdDisplayOptions) { | ||
| 16 | - this.ads = params.ads as Array<advertising.Advertisement>; | ||
| 17 | - this.displayOptions = params.displayOptions as advertising.AdDisplayOptions; | ||
| 18 | - } else { | ||
| 19 | - hilog.info(0x0000, 'testTag', '%{public}s', 'Router params are empty'); | ||
| 20 | - } | ||
| 21 | - } | ||
| 22 | - | ||
| 23 | - build() { | ||
| 24 | - Column() { | ||
| 25 | - // 运行在提供方进程里 | ||
| 26 | - AdComponent({ | ||
| 27 | - ads: this.ads, displayOptions: this.displayOptions, | ||
| 28 | - interactionListener: { | ||
| 29 | - onStatusChanged: (status: string, ad: advertising.Advertisement, data: string) => { | ||
| 30 | - switch (status) { | ||
| 31 | - case AdStatus.AD_OPEN: | ||
| 32 | - hilog.info(0x0000, 'testTag', '%{public}s', 'Status is onAdOpen'); | ||
| 33 | - Prompt.showToast({ | ||
| 34 | - message: 'splash ad open', | ||
| 35 | - duration: 1000 | ||
| 36 | - }); | ||
| 37 | - break; | ||
| 38 | - case AdStatus.AD_CLICKED: | ||
| 39 | - hilog.info(0x0000, 'testTag', '%{public}s', 'Status is onAdClick'); | ||
| 40 | - Prompt.showToast({ | ||
| 41 | - message: 'splash ad click', | ||
| 42 | - duration: 1000 | ||
| 43 | - }); | ||
| 44 | - break; | ||
| 45 | - case AdStatus.AD_CLOSED: | ||
| 46 | - hilog.info(0x0000, 'testTag', '%{public}s', 'Status is onAdClose'); | ||
| 47 | - Prompt.showToast({ | ||
| 48 | - message: 'splash ad close', | ||
| 49 | - duration: 1000 | ||
| 50 | - }); | ||
| 51 | - router.replaceUrl({ | ||
| 52 | - url: 'pages/Index', | ||
| 53 | - }) | ||
| 54 | - break; | ||
| 55 | - } | ||
| 56 | - } | ||
| 57 | - } | ||
| 58 | - }) | ||
| 59 | - .width('100%') | ||
| 60 | - .height('87%') | ||
| 61 | - | ||
| 62 | - // 展示媒体自定义icon、应用名称、版权信息 | ||
| 63 | - Column({}) { | ||
| 64 | - Row() { | ||
| 65 | - Image($r('app.media.logo')).width(24).height(24).margin({ right: 8 }) | ||
| 66 | - Text($r('app.string.video')).fontColor('#1A1A1A').fontSize(16).width(32).height(21) | ||
| 67 | - }.margin({ bottom: 8 }) | ||
| 68 | - | ||
| 69 | - Column() { | ||
| 70 | - Text('123').fontColor('#1A1A1A').fontSize(9).height(15) | ||
| 71 | - } | ||
| 72 | - }.width('100%').height('100%') | ||
| 73 | - } | ||
| 74 | - } | ||
| 75 | -} | ||
| 76 | - | ||
| 77 | -export enum AdStatus { | ||
| 78 | - AD_OPEN = 'onAdOpen', | ||
| 79 | - AD_CLICKED = 'onAdClick', | ||
| 80 | - AD_CLOSED = 'onAdClose' | ||
| 81 | -} |
entry/src/main/ets/pages/StartAd.ets
0 → 100644
| 1 | +import { window, promptAction, router } from '@kit.ArkUI'; | ||
| 2 | +import { | ||
| 3 | + CSJAdSdk, | ||
| 4 | + SDKConfigBuilder, | ||
| 5 | + SDKConfig, | ||
| 6 | + MediationConfigBuilder | ||
| 7 | +} from '@csj/openadsdk'; | ||
| 8 | +// 创建SDKConfig对象 | ||
| 9 | +let adConfigBuilder = new SDKConfigBuilder() | ||
| 10 | +let config: SDKConfig = adConfigBuilder | ||
| 11 | + .appId("5669833") | ||
| 12 | + .appName("消防维保助手") | ||
| 13 | + .allowShowNotify(true) | ||
| 14 | + .debug(true) | ||
| 15 | + .setMediationConfig(new MediationConfigBuilder().useMediation(true).build()) | ||
| 16 | + .setThemeStatus(0) | ||
| 17 | + .build() | ||
| 18 | + | ||
| 19 | +@Entry | ||
| 20 | +@Component | ||
| 21 | +struct StartAd { | ||
| 22 | + async aboutToAppear() { | ||
| 23 | + // 初始化SDK | ||
| 24 | + CSJAdSdk.init(getContext(this), config) //context类型必须为UIAbility,否则可能存在展示异常场景 | ||
| 25 | + // 启动SDK | ||
| 26 | + const result = await CSJAdSdk.start() | ||
| 27 | + if (result) { | ||
| 28 | + if (result.code == 0 || result.code == 4200) { | ||
| 29 | + router.pushUrl({ url: 'pages/AdMainPage' }) | ||
| 30 | + // this.loadOpenAd() | ||
| 31 | + } else { | ||
| 32 | + promptAction.showToast({ message: result.msg }); | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + closeWin() { | ||
| 38 | + const win = window.findWindow('startAd') // 找到子窗口 | ||
| 39 | + win.destroyWindow() // 销毁窗口 | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + build() { | ||
| 43 | + Column() { | ||
| 44 | + Image($r('app.media.logo')).width(60).height(60) | ||
| 45 | + }.width('100%').height('100%').justifyContent(FlexAlign.Center) | ||
| 46 | + } | ||
| 47 | +} |
entry/src/main/ets/pages/StartPage.ets
已删除
100644 → 0
| 1 | -import { router, Prompt } from '@kit.ArkUI'; | ||
| 2 | -import { advertising, identifier } from '@kit.AdsKit'; | ||
| 3 | -import { common } from '@kit.AbilityKit'; | ||
| 4 | -import { hilog } from '@kit.PerformanceAnalysisKit'; | ||
| 5 | -import { BusinessError } from '@kit.BasicServicesKit'; | ||
| 6 | - | ||
| 7 | -@Entry | ||
| 8 | -@Component | ||
| 9 | -export struct Index { | ||
| 10 | - private context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext; | ||
| 11 | - private oaid: string = ''; | ||
| 12 | - private isTimeOut: boolean = false; | ||
| 13 | - // 超时时间(单位毫秒),开发者可根据实际情况修改 | ||
| 14 | - private timeOutDuration: number = 1 * 1000; | ||
| 15 | - // 超时index | ||
| 16 | - private timeOutIndex: number = -1; | ||
| 17 | - // 广告展示参数 | ||
| 18 | - private adDisplayOptions: advertising.AdDisplayOptions = { | ||
| 19 | - // 是否静音,默认不静音 | ||
| 20 | - mute: false | ||
| 21 | - } | ||
| 22 | - // 广告配置 | ||
| 23 | - private adOptions: advertising.AdOptions = { | ||
| 24 | - // 是否允许流量下载0:不允许,1:允许,不设置以广告主设置为准 | ||
| 25 | - allowMobileTraffic: 0, | ||
| 26 | - // 是否希望根据 COPPA 的规定将您的内容视为面向儿童的内容: -1默认值,不确定 0不希望 1希望 | ||
| 27 | - tagForChildProtection: -1, | ||
| 28 | - // 是否希望按适合未达到法定承诺年龄的欧洲经济区 (EEA) 用户的方式处理该广告请求: -1默认值,不确定 0不希望 1希望 | ||
| 29 | - tagForUnderAgeOfPromise: -1, | ||
| 30 | - // 设置广告内容分级上限: W: 3+,所有受众 PI: 7+,家长指导 J:12+,青少年 A: 16+/18+,成人受众 | ||
| 31 | - adContentClassification: 'A' | ||
| 32 | - } | ||
| 33 | - // 开屏视频广告请求参数 | ||
| 34 | - private splashVideoAdReqParams: advertising.AdRequestParams = { | ||
| 35 | - // 'testd7c5cewoj6'为测试专用的广告位ID,App正式发布时需要改为正式的广告位ID | ||
| 36 | - adId: 'testd7c5cewoj6', | ||
| 37 | - adType: AdType.SPLASH_AD, | ||
| 38 | - adCount: 1, | ||
| 39 | - oaid: this.oaid | ||
| 40 | - } | ||
| 41 | - // 开屏图片广告请求参数 | ||
| 42 | - private splashImageAdReqParams: advertising.AdRequestParams = { | ||
| 43 | - // 'testq6zq98hecj'为测试专用的广告位ID,App正式发布时需要改为正式的广告位ID | ||
| 44 | - adId: 'testq6zq98hecj', | ||
| 45 | - adType: AdType.SPLASH_AD, | ||
| 46 | - adCount: 1, | ||
| 47 | - oaid: this.oaid | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - aboutToAppear() { | ||
| 51 | - hilog.info(0x0000, 'testTag', '%{public}s', 'Start to aboutToAppear'); | ||
| 52 | - try { | ||
| 53 | - // 使用Promise回调方式获取OAID | ||
| 54 | - identifier.getOAID().then((data: string) => { | ||
| 55 | - this.oaid = data; | ||
| 56 | - hilog.info(0x0000, 'testTag', '%{public}s', 'Succeeded in getting adsIdentifierInfo by promise'); | ||
| 57 | - }).catch((error: BusinessError) => { | ||
| 58 | - hilog.error(0x0000, 'testTag', '%{public}s', | ||
| 59 | - `Failed to get adsIdentifierInfo, code: ${error.code}, message: ${error.message}`); | ||
| 60 | - }) | ||
| 61 | - } catch (error) { | ||
| 62 | - hilog.error(0x0000, 'testTag', '%{public}s', `Catch err, code: ${error.code}, message: ${error.message}`); | ||
| 63 | - } | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | - build() { | ||
| 67 | - Column() { | ||
| 68 | - Column() { | ||
| 69 | - // 跳转到开屏全屏视频广告展示页面 | ||
| 70 | - CustomButton({ | ||
| 71 | - mText: 'splash full screen request', mOnClick: () => { | ||
| 72 | - this.requestAd(this.splashVideoAdReqParams, this.adOptions); | ||
| 73 | - } | ||
| 74 | - }); | ||
| 75 | - | ||
| 76 | - // 跳转到开屏半屏图片广告展示页面 | ||
| 77 | - CustomButton({ | ||
| 78 | - mText: 'splash half screen request', mOnClick: () => { | ||
| 79 | - this.requestAd(this.splashImageAdReqParams, this.adOptions); | ||
| 80 | - } | ||
| 81 | - }); | ||
| 82 | - }.width('100%').height('80%').justifyContent(FlexAlign.Center) | ||
| 83 | - } | ||
| 84 | - .width('100%') | ||
| 85 | - .height('100%') | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - private requestAd(adReqParams: advertising.AdRequestParams, adOptions: advertising.AdOptions): void { | ||
| 89 | - // 广告请求回调监听 | ||
| 90 | - const adLoaderListener: advertising.AdLoadListener = { | ||
| 91 | - // 广告请求失败回调 | ||
| 92 | - onAdLoadFailure: (errorCode: number, errorMsg: string) => { | ||
| 93 | - clearTimeout(this.timeOutIndex); | ||
| 94 | - if (this.isTimeOut) { | ||
| 95 | - return; | ||
| 96 | - } | ||
| 97 | - hilog.error(0x0000, 'testTag', '%{public}s', | ||
| 98 | - `Failed to request ad. errorCode is: ${errorCode}, errorMsg is: ${errorMsg}`); | ||
| 99 | - Prompt.showToast({ | ||
| 100 | - message: `Failed to request ad, code is: ${errorCode} , errorMsg is: ${errorMsg}`, | ||
| 101 | - duration: 1000 | ||
| 102 | - }); | ||
| 103 | - }, | ||
| 104 | - // 广告请求成功回调 | ||
| 105 | - onAdLoadSuccess: (ads: Array<advertising.Advertisement>) => { | ||
| 106 | - clearTimeout(this.timeOutIndex); | ||
| 107 | - if (this.isTimeOut) { | ||
| 108 | - return; | ||
| 109 | - } | ||
| 110 | - hilog.info(0x0000, 'testTag', '%{public}s', 'Succeeded in requesting ad!'); | ||
| 111 | - // 保存请求到的广告内容用于展示 | ||
| 112 | - hilog.info(0x0000, 'testTag', '%{public}s', `ads[0].adType is : ${ads[0].adType}`); | ||
| 113 | - if (canIUse("SystemCapability.Advertising.Ads")) { | ||
| 114 | - if (ads[0].adType === AdType.SPLASH_AD) { | ||
| 115 | - // 调用开屏广告展示页面 | ||
| 116 | - if (ads[0]?.isFullScreen === true) { | ||
| 117 | - routePage('pages/SplashFullScreenAdPage', ads, this.adDisplayOptions); | ||
| 118 | - } else { | ||
| 119 | - routePage('pages/SplashHalfScreenAdPage', ads, this.adDisplayOptions); | ||
| 120 | - } | ||
| 121 | - } else { | ||
| 122 | - hilog.error(0x0000, 'testTag', '%{public}s', 'Error adType'); | ||
| 123 | - } | ||
| 124 | - } | ||
| 125 | - } | ||
| 126 | - }; | ||
| 127 | - // 创建AdLoader广告对象 | ||
| 128 | - const load: advertising.AdLoader = new advertising.AdLoader(this.context); | ||
| 129 | - // 调用广告请求接口 | ||
| 130 | - hilog.info(0x0000, 'testTag', '%{public}s', 'Request ad!'); | ||
| 131 | - adReqParams.oaid = this.oaid; | ||
| 132 | - this.timeOutHandler(); | ||
| 133 | - load.loadAd(adReqParams, adOptions, adLoaderListener); | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - private timeOutHandler(): void { | ||
| 137 | - this.isTimeOut = false; | ||
| 138 | - // 超时处理 | ||
| 139 | - this.timeOutIndex = setTimeout(() => { | ||
| 140 | - this.isTimeOut = true; | ||
| 141 | - const options: router.RouterOptions = { | ||
| 142 | - // 开发者可根据项目实际情况修改超时之后要跳转的目标页面 | ||
| 143 | - url: 'pages/AdsServicePage', | ||
| 144 | - }; | ||
| 145 | - router.pushUrl(options); | ||
| 146 | - hilog.error(0x0000, 'testTag', '%{public}s', 'load ad time out'); | ||
| 147 | - }, this.timeOutDuration); | ||
| 148 | - } | ||
| 149 | -} | ||
| 150 | - | ||
| 151 | -async function routePage(pageUri: string, ads: Array<advertising.Advertisement | null>, | ||
| 152 | - displayOptions: advertising.AdDisplayOptions) { | ||
| 153 | - let options: router.RouterOptions = { | ||
| 154 | - url: pageUri, | ||
| 155 | - params: { | ||
| 156 | - ads: ads, | ||
| 157 | - displayOptions: displayOptions | ||
| 158 | - } | ||
| 159 | - } | ||
| 160 | - try { | ||
| 161 | - hilog.info(0x0000, 'testTag', '%{public}s', `RoutePage: ${pageUri}`); | ||
| 162 | - router.pushUrl(options); | ||
| 163 | - } catch (error) { | ||
| 164 | - hilog.error(0x0000, 'testTag', '%{public}s', | ||
| 165 | - `Failed to routePage callback, code: ${error.code}, msg: ${error.message}`); | ||
| 166 | - } | ||
| 167 | -} | ||
| 168 | - | ||
| 169 | -export enum AdType { | ||
| 170 | - // 开屏广告的类型 | ||
| 171 | - SPLASH_AD = 1 | ||
| 172 | -} | ||
| 173 | - | ||
| 174 | -@Component | ||
| 175 | -export struct CustomButton { | ||
| 176 | - private mText: string | Resource = ''; | ||
| 177 | - private mHeight: number = 40; | ||
| 178 | - private mOnClick: (event?: ClickEvent) => void = (): void => { | ||
| 179 | - }; | ||
| 180 | - build() { | ||
| 181 | - Column() { | ||
| 182 | - Button(this.mText) | ||
| 183 | - .backgroundColor('#d3d4d6') | ||
| 184 | - .fontSize(20) | ||
| 185 | - .fontColor('#000') | ||
| 186 | - .fontWeight(FontWeight.Normal) | ||
| 187 | - .align(Alignment.Center) | ||
| 188 | - .type(ButtonType.Capsule) | ||
| 189 | - .width('90%') | ||
| 190 | - .height(this.mHeight) | ||
| 191 | - .margin({ top: 10, bottom: 5 }) | ||
| 192 | - .onClick(this.mOnClick); | ||
| 193 | - } | ||
| 194 | - } | ||
| 195 | -} |
| 1 | import { webview } from '@kit.ArkWeb' | 1 | import { webview } from '@kit.ArkWeb' |
| 2 | import { basePath } from '../utils/baseUrl' | 2 | import { basePath } from '../utils/baseUrl' |
| 3 | +import NavHeader from '../components/NavHeader' | ||
| 3 | @Entry | 4 | @Entry |
| 4 | @Component | 5 | @Component |
| 5 | struct FireProtectionDetail { | 6 | struct FireProtectionDetail { |
| 6 | webviewController: webview.WebviewController = new webview.WebviewController() | 7 | webviewController: webview.WebviewController = new webview.WebviewController() |
| 7 | build() { | 8 | build() { |
| 8 | Column(){ | 9 | Column(){ |
| 10 | + NavHeader({title: '工具箱'}) | ||
| 9 | Web({ | 11 | Web({ |
| 10 | src: `${basePath}/report/select`, | 12 | src: `${basePath}/report/select`, |
| 11 | controller: this.webviewController, | 13 | controller: this.webviewController, |
| @@ -4,6 +4,7 @@ import { promptAction, router } from '@kit.ArkUI' | @@ -4,6 +4,7 @@ import { promptAction, router } from '@kit.ArkUI' | ||
| 4 | import { AxiosResponse } from '@ohos/axios' | 4 | import { AxiosResponse } from '@ohos/axios' |
| 5 | import LoadingDialog from '../dialog/LoadingDialog' | 5 | import LoadingDialog from '../dialog/LoadingDialog' |
| 6 | import { ValidateInputHandle } from '../utils/validateInputHandle' | 6 | import { ValidateInputHandle } from '../utils/validateInputHandle' |
| 7 | +import NavHeader from '../components/NavHeader' | ||
| 7 | // xxx.ets | 8 | // xxx.ets |
| 8 | @Styles function itemStyle () { | 9 | @Styles function itemStyle () { |
| 9 | .width('90%') | 10 | .width('90%') |
| @@ -45,6 +46,8 @@ struct UpdatePassword { | @@ -45,6 +46,8 @@ struct UpdatePassword { | ||
| 45 | } | 46 | } |
| 46 | @State returnCode: string = '' | 47 | @State returnCode: string = '' |
| 47 | build() { | 48 | build() { |
| 49 | + Column(){ | ||
| 50 | + NavHeader({title: '重置密码'}) | ||
| 48 | Stepper({ | 51 | Stepper({ |
| 49 | index: this.currentIndex | 52 | index: this.currentIndex |
| 50 | }) { | 53 | }) { |
| @@ -124,7 +127,7 @@ struct UpdatePassword { | @@ -124,7 +127,7 @@ struct UpdatePassword { | ||
| 124 | .prevLabel('Previous') | 127 | .prevLabel('Previous') |
| 125 | .status(this.secondState) | 128 | .status(this.secondState) |
| 126 | } | 129 | } |
| 127 | - .backgroundColor('#F1F3F5') | 130 | + .layoutWeight(1) |
| 128 | .onFinish( async() => { | 131 | .onFinish( async() => { |
| 129 | if(this.updateForm.againPassword !== this.updateForm.password) { | 132 | if(this.updateForm.againPassword !== this.updateForm.password) { |
| 130 | return promptAction.showToast({message: '两次密码输入不一致'}) | 133 | return promptAction.showToast({message: '两次密码输入不一致'}) |
| @@ -136,5 +139,6 @@ struct UpdatePassword { | @@ -136,5 +139,6 @@ struct UpdatePassword { | ||
| 136 | url: 'pages/Login' | 139 | url: 'pages/Login' |
| 137 | }) | 140 | }) |
| 138 | }) | 141 | }) |
| 142 | + }.backgroundColor('#F1F3F5') | ||
| 139 | } | 143 | } |
| 140 | } | 144 | } |
| 1 | import { webview } from '@kit.ArkWeb' | 1 | import { webview } from '@kit.ArkWeb' |
| 2 | +import NavHeader from '../components/NavHeader' | ||
| 2 | @Entry | 3 | @Entry |
| 3 | @Component | 4 | @Component |
| 4 | struct FireProtectionDetail { | 5 | struct FireProtectionDetail { |
| 5 | webviewController: webview.WebviewController = new webview.WebviewController() | 6 | webviewController: webview.WebviewController = new webview.WebviewController() |
| 6 | build() { | 7 | build() { |
| 7 | Column(){ | 8 | Column(){ |
| 9 | + NavHeader({title: '用户协议'}) | ||
| 8 | Web({ | 10 | Web({ |
| 9 | src: `https://doc.crgx.net/agreement.html`, | 11 | src: `https://doc.crgx.net/agreement.html`, |
| 10 | controller: this.webviewController, | 12 | controller: this.webviewController, |
| @@ -8,7 +8,7 @@ import { promptAction, router } from '@kit.ArkUI'; | @@ -8,7 +8,7 @@ import { promptAction, router } from '@kit.ArkUI'; | ||
| 8 | import { AxiosResponse } from '@ohos/axios' | 8 | import { AxiosResponse } from '@ohos/axios' |
| 9 | import { uploadFile, uploadResult } from '../utils/uploadFile' | 9 | import { uploadFile, uploadResult } from '../utils/uploadFile' |
| 10 | import { request } from '@kit.BasicServicesKit' | 10 | import { request } from '@kit.BasicServicesKit' |
| 11 | - | 11 | +import NavHeader from '../components/NavHeader' |
| 12 | @Entry | 12 | @Entry |
| 13 | @Component | 13 | @Component |
| 14 | struct UserRegister { | 14 | struct UserRegister { |
| @@ -74,6 +74,7 @@ struct UserRegister { | @@ -74,6 +74,7 @@ struct UserRegister { | ||
| 74 | } | 74 | } |
| 75 | build() { | 75 | build() { |
| 76 | Column(){ | 76 | Column(){ |
| 77 | + NavHeader({title: '用户注册'}) | ||
| 77 | Scroll(){ | 78 | Scroll(){ |
| 78 | Column(){ | 79 | Column(){ |
| 79 | Column(){ | 80 | Column(){ |
| @@ -3,7 +3,7 @@ import { AxiosResponse } from '@ohos/axios' | @@ -3,7 +3,7 @@ import { AxiosResponse } from '@ohos/axios' | ||
| 3 | import { downFile } from '../utils/downFile' | 3 | import { downFile } from '../utils/downFile' |
| 4 | import { router } from '@kit.ArkUI' | 4 | import { router } from '@kit.ArkUI' |
| 5 | import PhotoBrowser from '../dialog/PhotoBrowserDialog' | 5 | import PhotoBrowser from '../dialog/PhotoBrowserDialog' |
| 6 | -import { uploadVideoOrImg } from '../api/cosKey' | 6 | +import NavHeader from '../components/NavHeader' |
| 7 | interface routerParams { | 7 | interface routerParams { |
| 8 | cosKey: string | 8 | cosKey: string |
| 9 | relateId: number | 9 | relateId: number |
| @@ -48,6 +48,8 @@ struct DownLoadImage { | @@ -48,6 +48,8 @@ struct DownLoadImage { | ||
| 48 | }) | 48 | }) |
| 49 | } | 49 | } |
| 50 | build() { | 50 | build() { |
| 51 | + Column(){ | ||
| 52 | + NavHeader({title: '下载图片'}) | ||
| 51 | List(){ | 53 | List(){ |
| 52 | ListItem(){ | 54 | ListItem(){ |
| 53 | Column({ space: 10 }) { | 55 | Column({ space: 10 }) { |
| @@ -122,4 +124,5 @@ struct DownLoadImage { | @@ -122,4 +124,5 @@ struct DownLoadImage { | ||
| 122 | }.visibility(this.viewVideo.length == 0 ? Visibility.None : Visibility.Visible) | 124 | }.visibility(this.viewVideo.length == 0 ? Visibility.None : Visibility.Visible) |
| 123 | }.padding(10) | 125 | }.padding(10) |
| 124 | } | 126 | } |
| 127 | + } | ||
| 125 | } | 128 | } |
不能预览此文件类型
不能预览此文件类型
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1742355559666" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2693" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256"><path d="M672 896c-8.533333 0-17.066667-2.133333-21.333333-8.533333l-362.666667-352c-6.4-6.4-10.666667-14.933333-10.666667-23.466667 0-8.533333 4.266667-17.066667 10.666667-23.466667L652.8 136.533333c12.8-12.8 32-12.8 44.8 0s12.8 32 0 44.8L356.266667 512l339.2 328.533333c12.8 12.8 12.8 32 0 44.8-6.4 8.533333-14.933333 10.666667-23.466667 10.666667z" fill="#666666" p-id="2694"></path></svg> |
319.8 KB
| @@ -29,8 +29,8 @@ | @@ -29,8 +29,8 @@ | ||
| 29 | "pages/ToolBox", | 29 | "pages/ToolBox", |
| 30 | "pages/LookRecordCompany", | 30 | "pages/LookRecordCompany", |
| 31 | "pages/ViewFile", | 31 | "pages/ViewFile", |
| 32 | - "pages/StartPage", | ||
| 33 | - "pages/SplashFullScreenAdPage", | ||
| 34 | - "pages/SplashHalfScreenAdPage" | 32 | + "pages/StartAd", |
| 33 | + "pages/AdMainPage", | ||
| 34 | + "pages/SplashAdShowPage" | ||
| 35 | ] | 35 | ] |
| 36 | } | 36 | } |
| @@ -5,13 +5,105 @@ | @@ -5,13 +5,105 @@ | ||
| 5 | "lockfileVersion": 3, | 5 | "lockfileVersion": 3, |
| 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |
| 7 | "specifiers": { | 7 | "specifiers": { |
| 8 | + "@bdms/bdmssdk_pgl@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/bdmssdk.har": "@bdms/bdmssdk_pgl@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/bdmssdk.har", | ||
| 9 | + "@csj/adapter_gdt@^1.0.0-2": "@csj/adapter_gdt@1.0.0-2", | ||
| 10 | + "@csj/adapter_ks@^2.0.3-beta-2": "@csj/adapter_ks@2.0.3-beta-2", | ||
| 11 | + "@csj/openadsdk@6.7.0": "@csj/openadsdk@6.7.0", | ||
| 12 | + "@csj/openadsdk@^6.7.0": "@csj/openadsdk@6.7.0", | ||
| 13 | + "@csj/panglearmor@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/panglearmor.har": "@csj/panglearmor@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/panglearmor.har", | ||
| 14 | + "@dp/applog@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/applog.har": "@dp/applog@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/applog.har", | ||
| 15 | + "@gdt/gdt-union-sdk@entry/libs/GDTUnionSDK-default-release.har": "@gdt/gdt-union-sdk@entry/libs/GDTUnionSDK-default-release.har", | ||
| 16 | + "@hpem/apmplus_crash_lite@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/apm.har": "@hpem/apmplus_crash_lite@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/apm.har", | ||
| 8 | "@ohasasugar/hp-richtext@^3.0.4": "@ohasasugar/hp-richtext@3.0.4", | 17 | "@ohasasugar/hp-richtext@^3.0.4": "@ohasasugar/hp-richtext@3.0.4", |
| 9 | "@ohos/axios@^2.2.4": "@ohos/axios@2.2.4", | 18 | "@ohos/axios@^2.2.4": "@ohos/axios@2.2.4", |
| 10 | "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", | 19 | "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", |
| 11 | "@ohos/hypium@1.0.19": "@ohos/hypium@1.0.19", | 20 | "@ohos/hypium@1.0.19": "@ohos/hypium@1.0.19", |
| 12 | - "@wuyan/html_parse@^1.0.7": "@wuyan/html_parse@1.0.7" | 21 | + "@ohos/lottie@^2.0.9": "@ohos/lottie@2.0.16", |
| 22 | + "@wuyan/html_parse@^1.0.7": "@wuyan/html_parse@1.0.7", | ||
| 23 | + "ksadsdk@entry/libs/KSAdSDK.har": "ksadsdk@entry/libs/KSAdSDK.har", | ||
| 24 | + "libapplogrs.so@oh_modules/.ohpm/@dp+applog@+e6gtiy4h3epopwj9muptqswanljuqcdrohmi055hmq=/oh_modules/@dp/applog/src/main/ets/types/libapplogrs": "libapplogrs.so@oh_modules/.ohpm/@dp+applog@+e6gtiy4h3epopwj9muptqswanljuqcdrohmi055hmq=/oh_modules/@dp/applog/src/main/ets/types/libapplogrs", | ||
| 25 | + "libbdmssdk.so@oh_modules/.ohpm/@bdms+bdmssdk_pgl@uj8yipotnt2kw6duljuflmytrqjyvr8n+3zwgb2vucm=/oh_modules/@bdms/bdmssdk_pgl/src/main/cpp/types/libbdmssdk": "libbdmssdk.so@oh_modules/.ohpm/@bdms+bdmssdk_pgl@uj8yipotnt2kw6duljuflmytrqjyvr8n+3zwgb2vucm=/oh_modules/@bdms/bdmssdk_pgl/src/main/cpp/types/libbdmssdk", | ||
| 26 | + "libgdtunionsdk.so@oh_modules/.ohpm/@gdt+gdt-union-sdk@b5jdbuym1iad3fajvkonrnxtqyf6hyyu738leyst8vi=/oh_modules/@gdt/gdt-union-sdk/src/main/cpp/types/libgdtunionsdk": "libgdtunionsdk.so@oh_modules/.ohpm/@gdt+gdt-union-sdk@b5jdbuym1iad3fajvkonrnxtqyf6hyyu738leyst8vi=/oh_modules/@gdt/gdt-union-sdk/src/main/cpp/types/libgdtunionsdk", | ||
| 27 | + "libksadsdk.so@oh_modules/.ohpm/ksadsdk@6melecmoydimfn9fu+zsmjlvqd2bit1oaxtxm8ycnsa=/oh_modules/ksadsdk/src/main/cpp/types/libksadsdk": "libksadsdk.so@oh_modules/.ohpm/ksadsdk@6melecmoydimfn9fu+zsmjlvqd2bit1oaxtxm8ycnsa=/oh_modules/ksadsdk/src/main/cpp/types/libksadsdk", | ||
| 28 | + "libpanglearmor.so@oh_modules/.ohpm/@csj+panglearmor@cksmdebfkaayuazinfq2bjsbl2liolozgz0idliqkoi=/oh_modules/@csj/panglearmor/src/main/cpp/types/libpanglearmor": "libpanglearmor.so@oh_modules/.ohpm/@csj+panglearmor@cksmdebfkaayuazinfq2bjsbl2liolozgz0idliqkoi=/oh_modules/@csj/panglearmor/src/main/cpp/types/libpanglearmor" | ||
| 13 | }, | 29 | }, |
| 14 | "packages": { | 30 | "packages": { |
| 31 | + "@bdms/bdmssdk_pgl@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/bdmssdk.har": { | ||
| 32 | + "name": "@bdms/bdmssdk_pgl", | ||
| 33 | + "version": "8.0.13", | ||
| 34 | + "resolved": "oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/bdmssdk.har", | ||
| 35 | + "registryType": "local", | ||
| 36 | + "dependencies": { | ||
| 37 | + "libbdmssdk.so": "file:./src/main/cpp/types/libbdmssdk" | ||
| 38 | + } | ||
| 39 | + }, | ||
| 40 | + "@csj/adapter_gdt@1.0.0-2": { | ||
| 41 | + "name": "@csj/adapter_gdt", | ||
| 42 | + "version": "1.0.0-2", | ||
| 43 | + "integrity": "sha512-44DHPdek83HX2OiSgsUaiMWoYxEcRxs-3E7PQtEx3z7h_fr1dzfIb5eV_cOkcLoqnOTm6ptv7M4z6nGFnDgZ3Q==", | ||
| 44 | + "resolved": "http://artifact.bytedance.com/repository/byted-ohpm/@csj/adapter_gdt/-/adapter_gdt-1.0.0-2.har", | ||
| 45 | + "registryType": "ohpm", | ||
| 46 | + "dependencies": { | ||
| 47 | + "@csj/openadsdk": "6.7.0" | ||
| 48 | + } | ||
| 49 | + }, | ||
| 50 | + "@csj/adapter_ks@2.0.3-beta-2": { | ||
| 51 | + "name": "@csj/adapter_ks", | ||
| 52 | + "version": "2.0.3-beta-2", | ||
| 53 | + "integrity": "sha512-T5IkTcfAKAfM1b8ZKah52ow1I6oqeUBTq_uobNEI4DxAaV57gsSIrekklvJvMvpRDM5TLpmOaY-YqK_C5SyQDQ==", | ||
| 54 | + "resolved": "http://artifact.bytedance.com/repository/byted-ohpm/@csj/adapter_ks/-/adapter_ks-2.0.3-beta-2.har", | ||
| 55 | + "registryType": "ohpm", | ||
| 56 | + "dependencies": { | ||
| 57 | + "@csj/openadsdk": "6.7.0" | ||
| 58 | + } | ||
| 59 | + }, | ||
| 60 | + "@csj/openadsdk@6.7.0": { | ||
| 61 | + "name": "@csj/openadsdk", | ||
| 62 | + "version": "6.7.0", | ||
| 63 | + "integrity": "sha512-KecBLYuy1wbEbpvMpjDGjwqf3ExtqQayo0iD6nxg3TZqAkVjY-YkFjRf0J3oS2EEJIGUBXTa4CiNaZKYfNmWxw==", | ||
| 64 | + "resolved": "http://artifact.bytedance.com/repository/byted-ohpm/@csj/openadsdk/-/openadsdk-6.7.0.har", | ||
| 65 | + "registryType": "ohpm", | ||
| 66 | + "dependencies": { | ||
| 67 | + "@csj/panglearmor": "file:harlib/panglearmor.har", | ||
| 68 | + "@bdms/bdmssdk_pgl": "file:harlib/bdmssdk.har", | ||
| 69 | + "@hpem/apmplus_crash_lite": "file:./harlib/apm.har", | ||
| 70 | + "@dp/applog": "file:./harlib/applog.har", | ||
| 71 | + "@ohos/lottie": "^2.0.9" | ||
| 72 | + } | ||
| 73 | + }, | ||
| 74 | + "@csj/panglearmor@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/panglearmor.har": { | ||
| 75 | + "name": "@csj/panglearmor", | ||
| 76 | + "version": "1.0.2", | ||
| 77 | + "resolved": "oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/panglearmor.har", | ||
| 78 | + "registryType": "local", | ||
| 79 | + "dependencies": { | ||
| 80 | + "libpanglearmor.so": "file:./src/main/cpp/types/libpanglearmor" | ||
| 81 | + } | ||
| 82 | + }, | ||
| 83 | + "@dp/applog@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/applog.har": { | ||
| 84 | + "name": "@dp/applog", | ||
| 85 | + "version": "1.1.0", | ||
| 86 | + "resolved": "oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/applog.har", | ||
| 87 | + "registryType": "local", | ||
| 88 | + "dependencies": { | ||
| 89 | + "libapplogrs.so": "file:./src/main/ets/types/libapplogrs" | ||
| 90 | + } | ||
| 91 | + }, | ||
| 92 | + "@gdt/gdt-union-sdk@entry/libs/GDTUnionSDK-default-release.har": { | ||
| 93 | + "name": "@gdt/gdt-union-sdk", | ||
| 94 | + "version": "1.0.0", | ||
| 95 | + "resolved": "entry/libs/GDTUnionSDK-default-release.har", | ||
| 96 | + "registryType": "local", | ||
| 97 | + "dependencies": { | ||
| 98 | + "libgdtunionsdk.so": "file:./src/main/cpp/types/libgdtunionsdk" | ||
| 99 | + } | ||
| 100 | + }, | ||
| 101 | + "@hpem/apmplus_crash_lite@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/apm.har": { | ||
| 102 | + "name": "@hpem/apmplus_crash_lite", | ||
| 103 | + "version": "2.0.7", | ||
| 104 | + "resolved": "oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/apm.har", | ||
| 105 | + "registryType": "local" | ||
| 106 | + }, | ||
| 15 | "@ohasasugar/hp-richtext@3.0.4": { | 107 | "@ohasasugar/hp-richtext@3.0.4": { |
| 16 | "name": "@ohasasugar/hp-richtext", | 108 | "name": "@ohasasugar/hp-richtext", |
| 17 | "version": "3.0.4", | 109 | "version": "3.0.4", |
| @@ -40,12 +132,58 @@ | @@ -40,12 +132,58 @@ | ||
| 40 | "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.19.har", | 132 | "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.19.har", |
| 41 | "registryType": "ohpm" | 133 | "registryType": "ohpm" |
| 42 | }, | 134 | }, |
| 135 | + "@ohos/lottie@2.0.16": { | ||
| 136 | + "name": "@ohos/lottie", | ||
| 137 | + "version": "2.0.16", | ||
| 138 | + "integrity": "sha512-1A7sbWSzbrrH1TV37J9AH6peNMNU5xylO3+TvXGveOy591KOE45WGhR2+SMQcEPSb+KVXAHtekoC9A4PS9pK1w==", | ||
| 139 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/lottie/-/lottie-2.0.16.har", | ||
| 140 | + "registryType": "ohpm" | ||
| 141 | + }, | ||
| 43 | "@wuyan/html_parse@1.0.7": { | 142 | "@wuyan/html_parse@1.0.7": { |
| 44 | "name": "@wuyan/html_parse", | 143 | "name": "@wuyan/html_parse", |
| 45 | "version": "1.0.7", | 144 | "version": "1.0.7", |
| 46 | "integrity": "sha512-HT1vqQh2LyIbFVOS914MpNTGSobHcBYbxvhgsBEU8PEV8UML5UwHnrBqYFhYlv62s8lgBV4B6ZEoFZXngdwMWQ==", | 145 | "integrity": "sha512-HT1vqQh2LyIbFVOS914MpNTGSobHcBYbxvhgsBEU8PEV8UML5UwHnrBqYFhYlv62s8lgBV4B6ZEoFZXngdwMWQ==", |
| 47 | "resolved": "https://ohpm.openharmony.cn/ohpm/@wuyan/html_parse/-/html_parse-1.0.7.har", | 146 | "resolved": "https://ohpm.openharmony.cn/ohpm/@wuyan/html_parse/-/html_parse-1.0.7.har", |
| 48 | "registryType": "ohpm" | 147 | "registryType": "ohpm" |
| 148 | + }, | ||
| 149 | + "ksadsdk@entry/libs/KSAdSDK.har": { | ||
| 150 | + "name": "ksadsdk", | ||
| 151 | + "version": "2.0.3-beta", | ||
| 152 | + "resolved": "entry/libs/KSAdSDK.har", | ||
| 153 | + "registryType": "local", | ||
| 154 | + "dependencies": { | ||
| 155 | + "libksadsdk.so": "file:./src/main/cpp/types/libksadsdk" | ||
| 156 | + } | ||
| 157 | + }, | ||
| 158 | + "libapplogrs.so@oh_modules/.ohpm/@dp+applog@+e6gtiy4h3epopwj9muptqswanljuqcdrohmi055hmq=/oh_modules/@dp/applog/src/main/ets/types/libapplogrs": { | ||
| 159 | + "name": "libapplogrs.so", | ||
| 160 | + "version": "0.0.0", | ||
| 161 | + "resolved": "oh_modules/.ohpm/@dp+applog@+e6gtiy4h3epopwj9muptqswanljuqcdrohmi055hmq=/oh_modules/@dp/applog/src/main/ets/types/libapplogrs", | ||
| 162 | + "registryType": "local" | ||
| 163 | + }, | ||
| 164 | + "libbdmssdk.so@oh_modules/.ohpm/@bdms+bdmssdk_pgl@uj8yipotnt2kw6duljuflmytrqjyvr8n+3zwgb2vucm=/oh_modules/@bdms/bdmssdk_pgl/src/main/cpp/types/libbdmssdk": { | ||
| 165 | + "name": "libbdmssdk.so", | ||
| 166 | + "version": "0.0.0", | ||
| 167 | + "resolved": "oh_modules/.ohpm/@bdms+bdmssdk_pgl@uj8yipotnt2kw6duljuflmytrqjyvr8n+3zwgb2vucm=/oh_modules/@bdms/bdmssdk_pgl/src/main/cpp/types/libbdmssdk", | ||
| 168 | + "registryType": "local" | ||
| 169 | + }, | ||
| 170 | + "libgdtunionsdk.so@oh_modules/.ohpm/@gdt+gdt-union-sdk@b5jdbuym1iad3fajvkonrnxtqyf6hyyu738leyst8vi=/oh_modules/@gdt/gdt-union-sdk/src/main/cpp/types/libgdtunionsdk": { | ||
| 171 | + "name": "libgdtunionsdk.so", | ||
| 172 | + "version": "1.0.0", | ||
| 173 | + "resolved": "oh_modules/.ohpm/@gdt+gdt-union-sdk@b5jdbuym1iad3fajvkonrnxtqyf6hyyu738leyst8vi=/oh_modules/@gdt/gdt-union-sdk/src/main/cpp/types/libgdtunionsdk", | ||
| 174 | + "registryType": "local" | ||
| 175 | + }, | ||
| 176 | + "libksadsdk.so@oh_modules/.ohpm/ksadsdk@6melecmoydimfn9fu+zsmjlvqd2bit1oaxtxm8ycnsa=/oh_modules/ksadsdk/src/main/cpp/types/libksadsdk": { | ||
| 177 | + "name": "libksadsdk.so", | ||
| 178 | + "version": "0.0.0", | ||
| 179 | + "resolved": "oh_modules/.ohpm/ksadsdk@6melecmoydimfn9fu+zsmjlvqd2bit1oaxtxm8ycnsa=/oh_modules/ksadsdk/src/main/cpp/types/libksadsdk", | ||
| 180 | + "registryType": "local" | ||
| 181 | + }, | ||
| 182 | + "libpanglearmor.so@oh_modules/.ohpm/@csj+panglearmor@cksmdebfkaayuazinfq2bjsbl2liolozgz0idliqkoi=/oh_modules/@csj/panglearmor/src/main/cpp/types/libpanglearmor": { | ||
| 183 | + "name": "libpanglearmor.so", | ||
| 184 | + "version": "0.0.0", | ||
| 185 | + "resolved": "oh_modules/.ohpm/@csj+panglearmor@cksmdebfkaayuazinfq2bjsbl2liolozgz0idliqkoi=/oh_modules/@csj/panglearmor/src/main/cpp/types/libpanglearmor", | ||
| 186 | + "registryType": "local" | ||
| 49 | } | 187 | } |
| 50 | } | 188 | } |
| 51 | } | 189 | } |
| @@ -4,7 +4,12 @@ | @@ -4,7 +4,12 @@ | ||
| 4 | "dependencies": { | 4 | "dependencies": { |
| 5 | "@ohos/axios": "^2.2.4", | 5 | "@ohos/axios": "^2.2.4", |
| 6 | "@ohasasugar/hp-richtext": "^3.0.4", | 6 | "@ohasasugar/hp-richtext": "^3.0.4", |
| 7 | - "@wuyan/html_parse": "^1.0.7" | 7 | + "@wuyan/html_parse": "^1.0.7", |
| 8 | + "@csj/openadsdk": "^6.7.0", | ||
| 9 | + "@csj/adapter_gdt": "^1.0.0-2", | ||
| 10 | + "@csj/adapter_ks": "^2.0.3-beta-2", | ||
| 11 | + "ksadsdk": "file:./entry/libs/KSAdSDK.har", | ||
| 12 | + "@gdt/gdt-union-sdk": "file:./entry/libs/GDTUnionSDK-default-release.har" | ||
| 8 | }, | 13 | }, |
| 9 | "devDependencies": { | 14 | "devDependencies": { |
| 10 | "@ohos/hypium": "1.0.19", | 15 | "@ohos/hypium": "1.0.19", |
-
请 注册 或 登录 后发表评论