作者 xiaoqiu

接入广告和增加了页面返回效果

正在显示 58 个修改的文件 包含 1205 行增加849 行删除
不能预览此文件类型
  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 {
不能预览此文件类型
不能预览此文件类型
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 "main": "", 5 "main": "",
6 "author": "", 6 "author": "",
7 "license": "", 7 "license": "",
8 - "dependencies": {} 8 + "dependencies": {
  9 + }
9 } 10 }
10 11
不能预览此文件类型
@@ -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;
  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 - this.selectValue = this.certificateList[0]  
18 - this.personCertificateInfo.certificateId = this.certificateData[0].certificateId 17 + if(this.selectValue == ''){
  18 + this.selectValue = this.certificateList[0]
  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 { window } from '@kit.ArkUI'
  2 +
  3 +export class DemoConstants {
  4 +
  5 + static windowStage: window.WindowStage
  6 +}
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 +}
  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,80 +87,295 @@ struct DetailRecords { @@ -85,80 +87,295 @@ struct DetailRecords {
85 } 87 }
86 88
87 build() { 89 build() {
88 - Scroll(){  
89 - Column({space: 10}){  
90 - // 概况  
91 - Column(){  
92 - Row(){ 90 + Column(){
  91 + NavHeader({title: '维保记录详情'})
  92 + Scroll(){
  93 + Column({space: 10}){
  94 + // 概况
  95 + Column(){
  96 + Row(){
  97 + Row(){
  98 + Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
  99 + Text('概况').fontSize(12).fontColor('#999')
  100 + }
  101 + Row(){
  102 + Image($r('app.media.edit_1')).width(12)
  103 + Text('修改概况').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
  104 + Image($r('app.media.right_arrow')).width(12)
  105 + }.onClick(() => {
  106 + router.pushUrl({
  107 + url: 'pages/AddRecords',
  108 + params: {
  109 + reportId: this.reportDetail?.reportId
  110 + }
  111 + })
  112 + })
  113 + .visibility(this.reportDetail?.state == '5' || this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)
  114 + }.border({width: {bottom: 1}, color: '#eee'}).justifyContent(FlexAlign.SpaceBetween).width('100%').padding(5)
  115 + Row(){
  116 + Text('消防设施使用单位').fontSize(12).fontColor('#999')
  117 + Text(this.reportDetail?.applyCompanyName || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  118 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  119 + Row(){
  120 + Text('项目名称').fontSize(12).fontColor('#999')
  121 + Text(this.reportDetail?.reportName || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  122 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  123 + Row(){
  124 + Text('项目编号').fontSize(12).fontColor('#999')
  125 + Text(this.reportDetail?.reportNo || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  126 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  127 + Row(){
  128 + Text('维保记录类型').fontSize(12).fontColor('#999')
  129 + ThemeStaticTest({
  130 + textValue: this.reportDetail?.reportType,
  131 + type: '0'
  132 + })
  133 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  134 + Row(){
  135 + Text('状态').fontSize(12).fontColor('#999')
  136 + ThemeStaticTest({
  137 + textValue: this.reportDetail?.state,
  138 + type: '1'
  139 + })
  140 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  141 + Row(){
  142 + Text('创建日期').fontSize(12).fontColor('#999')
  143 + Text(this.reportDetail?.reportTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  144 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
93 Row(){ 145 Row(){
94 - Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})  
95 - Text('概况').fontSize(12).fontColor('#999')  
96 - } 146 + Text('维保日期').fontSize(12).fontColor('#999')
  147 + Text(this.reportDetail?.maintenanceTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  148 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
97 Row(){ 149 Row(){
98 - Image($r('app.media.edit_1')).width(12)  
99 - Text('修改概况').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})  
100 - Image($r('app.media.right_arrow')).width(12)  
101 - }.onClick(() => {  
102 - router.pushUrl({  
103 - url: 'pages/AddRecords',  
104 - params: {  
105 - reportId: this.reportDetail?.reportId 150 + Text('完成日期').fontSize(12).fontColor('#999')
  151 + Text(this.reportDetail?.maintenanceEndTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  152 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  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(){
  158 + Text('维保人员').fontSize(12).fontColor('#999')
  159 + Text(this.reportDetail?.maintenancePeople || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  160 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  161 + Row(){
  162 + Text('甲方签字').fontSize(12).fontColor('#999')
  163 + Row({space: 5}){
  164 + Image($r('app.media.share')).width(14)
  165 + Text('分享签名').fontSize(12).fontColor('#1890ff')
  166 + }.onClick(() => {
  167 + AlertDialog.show({
  168 + title: '分享签名提示',
  169 + message: `出于对多个甲方见证人签名的考虑,在甲方签名完成后,仍是"待甲方签名"的状态,需【维保公司账号】前往【更多操作】-->【完成】`,
  170 + alignment: DialogAlignment.Center,
  171 + primaryButton: {
  172 + value: '取消',
  173 + action: () => {
  174 + console.info('Callback when the first button is clicked')
  175 + }
  176 + },
  177 + secondaryButton: {
  178 + enabled: true,
  179 + defaultFocus: true,
  180 + style: DialogButtonStyle.HIGHLIGHT,
  181 + value: '确认',
  182 + action: async () => {
  183 + console.log(`https://xfappht.crgx.net/report/record?id=${reportId}&token=${preferencesUtils.get('XF_TOKEN', '')}&time=${new Date().getTime()}&type=firstPartySign&username=${preferencesUtils.get('XF_USERNAME', '')}`)
  184 + this.copyText(`https://xfappht.crgx.net/report/record?id=${reportId}&token=${preferencesUtils.get('XF_TOKEN', '')}&time=${new Date().getTime()}&type=firstPartySign&username=${preferencesUtils.get('XF_USERNAME', '')}`)
  185 + }
  186 + }
  187 + })
  188 + })
  189 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  190 + .visibility(this.reportDetail?.state == '1' || this.reportDetail?.state == '5' ? Visibility.Visible : Visibility.None)
  191 + Column({space: 5}){
  192 + Text('仪器设备').fontSize(12).fontColor('#999')
  193 + Text(this.reportDetail?.equipment || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  194 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).alignItems(HorizontalAlign.Start).width('100%')
  195 + Row(){
  196 + Text('备注').fontSize(12).fontColor('#999').margin({right: 10})
  197 + HmParseHTML({
  198 + htmlStr: this.reportDetail?.result || '<p>无</p>',
  199 + baseFontSize: 12,
  200 + baseFontColor: '#999'
  201 + })
  202 + }.padding(10).justifyContent(FlexAlign.SpaceBetween)
  203 + }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
  204 + // 主要消防措施
  205 + Column({space: 10}){
  206 + Row(){
  207 + Row(){
  208 + Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
  209 + Text('主要消防措施').fontSize(12).fontColor('#999')
  210 + }
  211 + Row(){
  212 + Image($r('app.media.edit_1')).width(12)
  213 + Text('查看记录').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
  214 + Image($r('app.media.right_arrow')).width(12)
  215 + }.onClick(() => {
  216 + if(personId !== '') {
  217 + router.pushUrl({
  218 + url: 'pages/LookRecords',
  219 + params: {
  220 + reportId: this.reportDetail?.reportId,
  221 + pid: personId
  222 + }
  223 + })
  224 + } else {
  225 + router.pushUrl({
  226 + url: 'pages/LookRecordCompany',
  227 + params: {
  228 + reportId: this.reportDetail?.reportId
  229 + }
  230 + })
106 } 231 }
107 }) 232 })
  233 + }.justifyContent(FlexAlign.SpaceBetween).width('100%').margin({bottom: 10})
  234 + ForEach(this.projectList, (item: ProjectList, index) => {
  235 + Column({space: 5}){
  236 + Row(){
  237 + Row({space: 5}){
  238 + Text((index + 1).toString()).padding(10).borderRadius(5)
  239 + .backgroundColor(Color.Gray).fontSize('#666')
  240 + Text(item.projectName).fontSize(12).fontColor('#999')
  241 + }
  242 + Row(){
  243 + Text('查看视频/图片内容').fontSize(12).fontColor('#1890ff')
  244 + Image($r('app.media.right_arrow')).width(12)
  245 + }.visibility(this.isShowCloudDown && item.cosKey !== null ? Visibility.Visible : Visibility.None)
  246 + .onClick(() => {
  247 + router.pushUrl({
  248 + url: 'pages/VideoDetail',
  249 + params: {
  250 + cosKey: item.cosKey,
  251 + relateId: item.relateId
  252 + }
  253 + })
  254 + })
  255 + }.width('100%').justifyContent(FlexAlign.SpaceBetween)
  256 + Row(){
  257 + Text(item.updateTime).fontSize(12).fontColor('#999')
  258 + Text(item.state == '0' ? '未编辑' : '已编辑')
  259 + .padding({left: 6, right: 6})
  260 + .borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).fontColor(item.state == '0' ? '#ff4949' : '#13ce66')
  261 + .backgroundColor(item.state == '0' ? '#ffeded' : '#e7faf0').borderColor(item.state == '0' ? '#ffdbdb' : '#d0f5e0')
  262 + }.width('100%').justifyContent(FlexAlign.SpaceBetween)
  263 + Row(){
  264 + Row(){
  265 + Image($r('app.media.photo')).width(12).margin({right: 4})
  266 + Text('上传视频/图片').fontSize(12).fontColor('#1890ff')
  267 + }.layoutWeight(1).justifyContent(FlexAlign.Center)
  268 + .visibility(this.isShowCloudDown ? Visibility.Visible : Visibility.None)
  269 + .onClick(async () => {
  270 + // 上传文件到腾讯云存储
  271 + try {
  272 + let key: string = item.cosKey == null ? '' : item.cosKey
  273 + let systemPhotoImagePath: string = await selectImgOrVideo() // 选择文件
  274 + this.loadingController.open()
  275 + await uploadFileByTask(key, item.relateId, systemPhotoImagePath)
  276 + this.loadingController.close()
  277 + } catch (error) {
  278 + let err: BusinessError = error as BusinessError;
  279 + console.error(`Invoke uploadFile failed, code is ${err.code}, message is ${err.message}`);
  280 + }
  281 + })
  282 + Text().width(2).height(16).backgroundColor('#eee').visibility(this.isShowCloudDown ? Visibility.Visible : Visibility.None)
  283 + Row(){
  284 + Image($r('app.media.edit_1')).width(12).margin({right: 4})
  285 + Text('编辑详情').fontSize(12).fontColor('#1890ff').onClick(() => {
  286 + router.pushUrl({
  287 + url: 'pages/FireProtectionDetail',
  288 + params: item
  289 + })
  290 + })
  291 + }.layoutWeight(1).justifyContent(FlexAlign.Center)
  292 + }.width('100%').padding({top: 5}).border({width: {top: 1}, color: '#eee'})
  293 + .visibility(item.state == '0' ? Visibility.Visible : Visibility.None)
  294 + }.padding({top: 10, left: 10, right: 10, bottom: 10}).borderWidth(1).borderColor('#eee').shadow({ radius: 5, color: Color.Gray }).borderRadius(5)
108 }) 295 })
109 - .visibility(this.reportDetail?.state == '5' || this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)  
110 - }.border({width: {bottom: 1}, color: '#eee'}).justifyContent(FlexAlign.SpaceBetween).width('100%').padding(5)  
111 - Row(){  
112 - Text('消防设施使用单位').fontSize(12).fontColor('#999')  
113 - Text(this.reportDetail?.applyCompanyName || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})  
114 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
115 - Row(){  
116 - Text('项目名称').fontSize(12).fontColor('#999')  
117 - Text(this.reportDetail?.reportName || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})  
118 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
119 - Row(){  
120 - Text('项目编号').fontSize(12).fontColor('#999')  
121 - Text(this.reportDetail?.reportNo || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})  
122 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
123 - Row(){  
124 - Text('维保记录类型').fontSize(12).fontColor('#999')  
125 - ThemeStaticTest({  
126 - textValue: this.reportDetail?.reportType,  
127 - type: '0'  
128 - })  
129 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
130 - Row(){  
131 - Text('状态').fontSize(12).fontColor('#999')  
132 - ThemeStaticTest({  
133 - textValue: this.reportDetail?.state,  
134 - type: '1'  
135 - })  
136 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
137 - Row(){  
138 - Text('创建日期').fontSize(12).fontColor('#999')  
139 - Text(this.reportDetail?.reportTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})  
140 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
141 - Row(){  
142 - Text('维保日期').fontSize(12).fontColor('#999')  
143 - Text(this.reportDetail?.maintenanceTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})  
144 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
145 - Row(){  
146 - Text('完成日期').fontSize(12).fontColor('#999')  
147 - 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%')  
149 - Row(){  
150 - Text('维保人员').fontSize(12).fontColor('#999')  
151 - 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%')  
153 - Row(){  
154 - Text('甲方签字').fontSize(12).fontColor('#999')  
155 - Row({space: 5}){  
156 - Image($r('app.media.share')).width(14)  
157 - Text('分享签名').fontSize(12).fontColor('#1890ff')  
158 - }.onClick(() => { 296 + }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
  297 +
  298 + // 消防设施故障处理单
  299 + Column({space: 10}){
  300 + Row(){
  301 + Row(){
  302 + Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
  303 + Text('消防设施故障处理单').fontSize(12).fontColor('#999')
  304 + }
  305 + Row(){
  306 + Image($r('app.media.edit_1')).width(12)
  307 + Text('故障维修').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
  308 + Image($r('app.media.right_arrow')).width(12)
  309 + }.onClick(() => {
  310 + router.pushUrl({
  311 + url: 'pages/FailureMaintenance',
  312 + params: {
  313 + applyCompanyName: this.reportDetail?.applyCompanyName,
  314 + companyName: this.reportDetail?.companyName,
  315 + reportName: this.reportDetail?.reportName,
  316 + reportId: this.reportDetail?.reportId,
  317 + reportType: this.reportDetail?.reportType
  318 + }
  319 + })
  320 + })
  321 + .visibility(this.reportDetail?.state == '5' || this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)
  322 + }.justifyContent(FlexAlign.SpaceBetween).width('100%').margin({bottom: 10})
  323 + Column(){
  324 + Row(){
  325 + Text('发现时间:').fontSize(12).fontColor('#999')
  326 + Text(this.findTime).fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  327 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.Start).width('100%')
  328 + ForEach(this.malfunctionList, (malfunction: MalfunctionListRow, index: number) => {
  329 + Column({space: 4}){
  330 + Row({space: 10}){
  331 + Text((index + 1).toString()).width(30).height(30).backgroundColor(Color.Gray)
  332 + .borderWidth(1).borderColor('#eee').borderRadius(4).textAlign(TextAlign.Center)
  333 + Text(malfunction.malfunctionPart)
  334 + }.margin({bottom: 10})
  335 + Text(`故障情况及影响:${malfunction.malfunctionDes}`).fontSize(12).fontColor('#999')
  336 + Text(`采取的应急措施:${malfunction.security}`).fontSize(12).fontColor('#999')
  337 + Text(`更换设备及材料情况:${malfunction.maintenanceMethod}`).fontSize(12).fontColor('#999')
  338 + Text(`处理结果:${malfunction.malfunctionConfirm}`).fontSize(12).fontColor('#999')
  339 + Text(`备注:${malfunction.remark || '无'}`).fontSize(12).fontColor('#999')
  340 + }.border({width: {bottom: 1}, color: '#eee'}).width('100%')
  341 + .padding(10).alignItems(HorizontalAlign.Start)
  342 + })
  343 + Row(){
  344 + Text('维护保养单位意见:').fontSize(12).fontColor('#999')
  345 + Text(this.maintenanceComment).fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  346 + }.padding(10).justifyContent(FlexAlign.Start).width('100%')
  347 + Row(){
  348 + Text('委托单位意见:').fontSize(12).fontColor('#999')
  349 + Text(this.applyCompanyComment).fontColor('#999').fontSize(12).margin({left: 3, right: 3})
  350 + }.padding(10).justifyContent(FlexAlign.Start).width('100%')
  351 + }.width('100%').alignItems(HorizontalAlign.Start)
  352 + .visibility(this.malfunctionList.length > 0 ? Visibility.Visible : Visibility.None)
  353 + Column(){
  354 + Image($r('app.media.emptyData')).width(100)
  355 + Text('暂无维修数据').fontSize(12).fontColor('#999').textAlign(TextAlign.Center).margin({top: 5})
  356 + }.visibility(this.malfunctionList.length == 0 ? Visibility.Visible : Visibility.None)
  357 + }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
  358 +
  359 + // 更多操作
  360 + Column(){
  361 + Row(){
  362 + Row(){
  363 + Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
  364 + Text('操作').fontSize(12).fontColor('#999')
  365 + }
  366 + }.border({width: {bottom: 1}, color: '#eee'}).justifyContent(FlexAlign.Start).width('100%').padding(5)
  367 + Row(){
  368 + Row(){
  369 + Image($r('app.media.trash_can')).width(16)
  370 + Text('删除').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3}).fontWeight(500)
  371 + }
  372 + Image($r('app.media.right_arrow')).width(16)
  373 + }.padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%').border({width: {bottom: 1}, color: '#eee'})
  374 + .visibility(this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)
  375 + .onClick(() => {
159 AlertDialog.show({ 376 AlertDialog.show({
160 - title: '分享签名提示',  
161 - message: `出于对多个甲方见证人签名的考虑,在甲方签名完成后,仍是"待甲方签名"的状态,需【维保公司账号】前往【更多操作】-->【完成】`, 377 + title: '删除提示',
  378 + message: `维保原始记录一经删除,无法找回,确认删除${this.reportDetail?.reportName}(${this.reportDetail?.reportNo})的原始记录吗?`,
162 alignment: DialogAlignment.Center, 379 alignment: DialogAlignment.Center,
163 primaryButton: { 380 primaryButton: {
164 value: '取消', 381 value: '取消',
@@ -172,320 +389,123 @@ struct DetailRecords { @@ -172,320 +389,123 @@ struct DetailRecords {
172 style: DialogButtonStyle.HIGHLIGHT, 389 style: DialogButtonStyle.HIGHLIGHT,
173 value: '确认', 390 value: '确认',
174 action: async () => { 391 action: async () => {
175 - console.log(`https://xfappht.crgx.net/report/record?id=${reportId}&token=${preferencesUtils.get('XF_TOKEN', '')}&time=${new Date().getTime()}&type=firstPartySign&username=${preferencesUtils.get('XF_USERNAME', '')}`)  
176 - this.copyText(`https://xfappht.crgx.net/report/record?id=${reportId}&token=${preferencesUtils.get('XF_TOKEN', '')}&time=${new Date().getTime()}&type=firstPartySign&username=${preferencesUtils.get('XF_USERNAME', '')}`) 392 + await deleteRecords({reportId, state: '2'})
  393 + router.back()
177 } 394 }
178 } 395 }
179 }) 396 })
180 }) 397 })
181 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
182 - .visibility(this.reportDetail?.state == '1' || this.reportDetail?.state == '5' ? Visibility.Visible : Visibility.None)  
183 - Column({space: 5}){  
184 - Text('仪器设备').fontSize(12).fontColor('#999')  
185 - Text(this.reportDetail?.equipment || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})  
186 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).alignItems(HorizontalAlign.Start).width('100%')  
187 - Row(){  
188 - Text('备注').fontSize(12).fontColor('#999').margin({right: 10})  
189 - HmParseHTML({  
190 - htmlStr: this.reportDetail?.result || '<p>无</p>',  
191 - baseFontSize: 12,  
192 - baseFontColor: '#999'  
193 - })  
194 - }.padding(10).justifyContent(FlexAlign.SpaceBetween)  
195 - }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')  
196 - // 主要消防措施  
197 - Column({space: 10}){  
198 - Row(){  
199 - Row(){  
200 - Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})  
201 - Text('主要消防措施').fontSize(12).fontColor('#999')  
202 - }  
203 Row(){ 398 Row(){
204 - Image($r('app.media.edit_1')).width(12)  
205 - Text('查看记录').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})  
206 - Image($r('app.media.right_arrow')).width(12)  
207 - }.onClick(() => {  
208 - if(personId !== '') {  
209 - router.pushUrl({  
210 - url: 'pages/LookRecords',  
211 - params: {  
212 - reportId: this.reportDetail?.reportId,  
213 - pid: personId  
214 - }  
215 - })  
216 - } else {  
217 - router.pushUrl({  
218 - url: 'pages/LookRecordCompany',  
219 - params: {  
220 - reportId: this.reportDetail?.reportId  
221 - }  
222 - })  
223 - }  
224 - })  
225 - }.justifyContent(FlexAlign.SpaceBetween).width('100%').margin({bottom: 10})  
226 - ForEach(this.projectList, (item: ProjectList, index) => {  
227 - Column({space: 5}){  
228 Row(){ 399 Row(){
229 - Row({space: 5}){  
230 - Text((index + 1).toString()).padding(10).borderRadius(5)  
231 - .backgroundColor(Color.Gray).fontSize('#666')  
232 - Text(item.projectName).fontSize(12).fontColor('#999')  
233 - }  
234 - Row(){  
235 - Text('查看视频/图片内容').fontSize(12).fontColor('#1890ff')  
236 - Image($r('app.media.right_arrow')).width(12)  
237 - }.visibility(this.isShowCloudDown && item.cosKey !== null ? Visibility.Visible : Visibility.None)  
238 - .onClick(() => {  
239 - router.pushUrl({  
240 - url: 'pages/VideoDetail',  
241 - params: {  
242 - cosKey: item.cosKey,  
243 - relateId: item.relateId  
244 - }  
245 - })  
246 - })  
247 - }.width('100%').justifyContent(FlexAlign.SpaceBetween)  
248 - Row(){  
249 - Text(item.updateTime).fontSize(12).fontColor('#999')  
250 - Text(item.state == '0' ? '未编辑' : '已编辑')  
251 - .padding({left: 6, right: 6})  
252 - .borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).fontColor(item.state == '0' ? '#ff4949' : '#13ce66')  
253 - .backgroundColor(item.state == '0' ? '#ffeded' : '#e7faf0').borderColor(item.state == '0' ? '#ffdbdb' : '#d0f5e0')  
254 - }.width('100%').justifyContent(FlexAlign.SpaceBetween)  
255 - Row(){  
256 - Row(){  
257 - Image($r('app.media.photo')).width(12).margin({right: 4})  
258 - Text('上传视频/图片').fontSize(12).fontColor('#1890ff')  
259 - }.layoutWeight(1).justifyContent(FlexAlign.Center)  
260 - .visibility(this.isShowCloudDown ? Visibility.Visible : Visibility.None)  
261 - .onClick(async () => {  
262 - // 上传文件到腾讯云存储  
263 - try {  
264 - let key: string = item.cosKey == null ? '' : item.cosKey  
265 - let systemPhotoImagePath: string = await selectImgOrVideo() // 选择文件  
266 - this.loadingController.open()  
267 - await uploadFileByTask(key, item.relateId, systemPhotoImagePath)  
268 - this.loadingController.close()  
269 - } catch (error) {  
270 - let err: BusinessError = error as BusinessError;  
271 - console.error(`Invoke uploadFile failed, code is ${err.code}, message is ${err.message}`); 400 + Image($r('app.media.finish')).width(16)
  401 + Text('完成').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
  402 + }
  403 + Image($r('app.media.right_arrow')).width(16)
  404 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  405 + .visibility(this.reportDetail?.state == '5' && roleName == 'company' ? Visibility.Visible : Visibility.None)
  406 + .onClick(async () => {
  407 + AlertDialog.show({
  408 + title: '提示',
  409 + message: `完成签发后不可退回修改,确认完成吗`,
  410 + alignment: DialogAlignment.Center,
  411 + primaryButton: {
  412 + value: '取消',
  413 + action: () => {
  414 + console.info('Callback when the first button is clicked')
  415 + }
  416 + },
  417 + secondaryButton: {
  418 + enabled: true,
  419 + defaultFocus: true,
  420 + style: DialogButtonStyle.HIGHLIGHT,
  421 + value: '确认',
  422 + action: async () => {
  423 + await successReport(reportId)
  424 + await deleteRecords({reportId, state: '1'})
  425 + promptAction.showToast({message: '修改完成'})
272 } 426 }
273 - })  
274 - Text().width(2).height(16).backgroundColor('#eee').visibility(this.isShowCloudDown ? Visibility.Visible : Visibility.None)  
275 - Row(){  
276 - Image($r('app.media.edit_1')).width(12).margin({right: 4})  
277 - Text('编辑详情').fontSize(12).fontColor('#1890ff').onClick(() => {  
278 - router.pushUrl({  
279 - url: 'pages/FireProtectionDetail',  
280 - params: item  
281 - })  
282 - })  
283 - }.layoutWeight(1).justifyContent(FlexAlign.Center)  
284 - }.width('100%').padding({top: 5}).border({width: {top: 1}, color: '#eee'})  
285 - .visibility(item.state == '0' ? Visibility.Visible : Visibility.None)  
286 - }.padding({top: 10, left: 10, right: 10, bottom: 10}).borderWidth(1).borderColor('#eee').shadow({ radius: 5, color: Color.Gray }).borderRadius(5)  
287 - })  
288 - }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')  
289 -  
290 - // 消防设施故障处理单  
291 - Column({space: 10}){  
292 - Row(){  
293 - Row(){  
294 - Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})  
295 - Text('消防设施故障处理单').fontSize(12).fontColor('#999')  
296 - }  
297 - Row(){  
298 - Image($r('app.media.edit_1')).width(12)  
299 - Text('故障维修').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})  
300 - Image($r('app.media.right_arrow')).width(12)  
301 - }.onClick(() => {  
302 - router.pushUrl({  
303 - url: 'pages/FailureMaintenance',  
304 - params: {  
305 - applyCompanyName: this.reportDetail?.applyCompanyName,  
306 - companyName: this.reportDetail?.companyName,  
307 - reportName: this.reportDetail?.reportName,  
308 - reportId: this.reportDetail?.reportId,  
309 - reportType: this.reportDetail?.reportType  
310 } 427 }
311 }) 428 })
312 }) 429 })
313 - .visibility(this.reportDetail?.state == '5' || this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)  
314 - }.justifyContent(FlexAlign.SpaceBetween).width('100%').margin({bottom: 10})  
315 - Column(){  
316 - Row(){  
317 - Text('发现时间:').fontSize(12).fontColor('#999')  
318 - Text(this.findTime).fontColor('#999').fontSize(12).margin({left: 3, right: 3})  
319 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.Start).width('100%')  
320 - ForEach(this.malfunctionList, (malfunction: MalfunctionListRow, index: number) => {  
321 - Column({space: 4}){  
322 - Row({space: 10}){  
323 - Text((index + 1).toString()).width(30).height(30).backgroundColor(Color.Gray)  
324 - .borderWidth(1).borderColor('#eee').borderRadius(4).textAlign(TextAlign.Center)  
325 - Text(malfunction.malfunctionPart)  
326 - }.margin({bottom: 10})  
327 - Text(`故障情况及影响:${malfunction.malfunctionDes}`).fontSize(12).fontColor('#999')  
328 - Text(`采取的应急措施:${malfunction.security}`).fontSize(12).fontColor('#999')  
329 - Text(`更换设备及材料情况:${malfunction.maintenanceMethod}`).fontSize(12).fontColor('#999')  
330 - Text(`处理结果:${malfunction.malfunctionConfirm}`).fontSize(12).fontColor('#999')  
331 - Text(`备注:${malfunction.remark || '无'}`).fontSize(12).fontColor('#999')  
332 - }.border({width: {bottom: 1}, color: '#eee'}).width('100%')  
333 - .padding(10).alignItems(HorizontalAlign.Start)  
334 - })  
335 - Row(){  
336 - Text('维护保养单位意见:').fontSize(12).fontColor('#999')  
337 - Text(this.maintenanceComment).fontColor('#999').fontSize(12).margin({left: 3, right: 3})  
338 - }.padding(10).justifyContent(FlexAlign.Start).width('100%')  
339 - Row(){  
340 - Text('委托单位意见:').fontSize(12).fontColor('#999')  
341 - Text(this.applyCompanyComment).fontColor('#999').fontSize(12).margin({left: 3, right: 3})  
342 - }.padding(10).justifyContent(FlexAlign.Start).width('100%')  
343 - }.width('100%').alignItems(HorizontalAlign.Start)  
344 - .visibility(this.malfunctionList.length > 0 ? Visibility.Visible : Visibility.None)  
345 - Column(){  
346 - Image($r('app.media.emptyData')).width(100)  
347 - Text('暂无维修数据').fontSize(12).fontColor('#999').textAlign(TextAlign.Center).margin({top: 5})  
348 - }.visibility(this.malfunctionList.length == 0 ? Visibility.Visible : Visibility.None)  
349 - }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')  
350 -  
351 - // 更多操作  
352 - Column(){  
353 - Row(){  
354 - Row(){  
355 - Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})  
356 - Text('操作').fontSize(12).fontColor('#999')  
357 - }  
358 - }.border({width: {bottom: 1}, color: '#eee'}).justifyContent(FlexAlign.Start).width('100%').padding(5)  
359 - Row(){  
360 Row(){ 430 Row(){
361 - Image($r('app.media.trash_can')).width(16)  
362 - Text('删除').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3}).fontWeight(500)  
363 - }  
364 - Image($r('app.media.right_arrow')).width(16)  
365 - }.padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%').border({width: {bottom: 1}, color: '#eee'})  
366 - .visibility(this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)  
367 - .onClick(() => {  
368 - AlertDialog.show({  
369 - title: '删除提示',  
370 - message: `维保原始记录一经删除,无法找回,确认删除${this.reportDetail?.reportName}(${this.reportDetail?.reportNo})的原始记录吗?`,  
371 - alignment: DialogAlignment.Center,  
372 - primaryButton: {  
373 - value: '取消',  
374 - action: () => {  
375 - console.info('Callback when the first button is clicked')  
376 - }  
377 - },  
378 - secondaryButton: {  
379 - enabled: true,  
380 - defaultFocus: true,  
381 - style: DialogButtonStyle.HIGHLIGHT,  
382 - value: '确认',  
383 - action: async () => {  
384 - await deleteRecords({reportId, state: '2'})  
385 - router.back()  
386 - } 431 + Row(){
  432 + Image($r('app.media.returnUpdate')).width(16)
  433 + Text('修改原始记录').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
387 } 434 }
  435 + Image($r('app.media.right_arrow')).width(16)
  436 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  437 + .visibility(this.reportDetail?.state == '5' && roleName == 'company' ? Visibility.Visible : Visibility.None)
  438 + .onClick(async () => {
  439 + AlertDialog.show({
  440 + title: '重要提示',
  441 + message: `退回编辑会清除所有的维保人员签名和甲方签名,确认退回?`,
  442 + alignment: DialogAlignment.Center,
  443 + primaryButton: {
  444 + value: '取消',
  445 + action: () => {
  446 + console.info('Callback when the first button is clicked')
  447 + }
  448 + },
  449 + secondaryButton: {
  450 + enabled: true,
  451 + defaultFocus: true,
  452 + style: DialogButtonStyle.HIGHLIGHT,
  453 + value: '确认',
  454 + action: async () => {
  455 + const res: AxiosResponse<configTest> = await returnSing(reportId)
  456 + promptAction.showToast({message: res.data.msg})
  457 + const detail: AxiosResponse<reportDetailTest> = await getReportDetail(reportId)
  458 + this.reportDetail = detail.data.data
  459 + }
  460 + }
  461 + })
388 }) 462 })
389 - })  
390 - Row(){ 463 + // Row(){
  464 + // Row(){
  465 + // Image($r('app.media.lookView')).width(16)
  466 + // Text('预览统计').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
  467 + // }
  468 + // Image($r('app.media.right_arrow')).width(16)
  469 + // }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  470 + // .onClick(() => {
  471 + // pushOutsideWeb(`https://xfwbzs.crgx.net/report/preview?id=${reportId}`)
  472 + // })
391 Row(){ 473 Row(){
392 - Image($r('app.media.finish')).width(16)  
393 - Text('完成').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})  
394 - }  
395 - Image($r('app.media.right_arrow')).width(16)  
396 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
397 - .visibility(this.reportDetail?.state == '5' && roleName == 'company' ? Visibility.Visible : Visibility.None)  
398 - .onClick(async () => {  
399 - AlertDialog.show({  
400 - title: '提示',  
401 - message: `完成签发后不可退回修改,确认完成吗`,  
402 - alignment: DialogAlignment.Center,  
403 - primaryButton: {  
404 - value: '取消',  
405 - action: () => {  
406 - console.info('Callback when the first button is clicked')  
407 - }  
408 - },  
409 - secondaryButton: {  
410 - enabled: true,  
411 - defaultFocus: true,  
412 - style: DialogButtonStyle.HIGHLIGHT,  
413 - value: '确认',  
414 - action: async () => {  
415 - await successReport(reportId)  
416 - await deleteRecords({reportId, state: '1'})  
417 - promptAction.showToast({message: '修改完成'})  
418 - } 474 + Row(){
  475 + Image($r('app.media.document')).width(16)
  476 + Text('自动报告').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
419 } 477 }
  478 + Image($r('app.media.right_arrow')).width(16)
  479 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  480 + .visibility(this.reportDetail?.state == '1' ? Visibility.Visible : Visibility.None)
  481 + .onClick(() => {
  482 + pushOutsideWeb(`${basePath}/report/view?id=${reportId}`)
420 }) 483 })
421 - })  
422 - Row(){  
423 Row(){ 484 Row(){
424 - Image($r('app.media.returnUpdate')).width(16)  
425 - Text('修改原始记录').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})  
426 - }  
427 - Image($r('app.media.right_arrow')).width(16)  
428 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
429 - .visibility(this.reportDetail?.state == '5' && roleName == 'company' ? Visibility.Visible : Visibility.None)  
430 - .onClick(async () => {  
431 - AlertDialog.show({  
432 - title: '重要提示',  
433 - message: `退回编辑会清除所有的维保人员签名和甲方签名,确认退回?`,  
434 - alignment: DialogAlignment.Center,  
435 - primaryButton: {  
436 - value: '取消',  
437 - action: () => {  
438 - console.info('Callback when the first button is clicked')  
439 - }  
440 - },  
441 - secondaryButton: {  
442 - enabled: true,  
443 - defaultFocus: true,  
444 - style: DialogButtonStyle.HIGHLIGHT,  
445 - value: '确认',  
446 - action: async () => {  
447 - const res: AxiosResponse<configTest> = await returnSing(reportId)  
448 - promptAction.showToast({message: res.data.msg})  
449 - const detail: AxiosResponse<reportDetailTest> = await getReportDetail(reportId)  
450 - this.reportDetail = detail.data.data  
451 - } 485 + Row(){
  486 + Image($r('app.media.setting')).width(16)
  487 + Text('导出PDF').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
452 } 488 }
  489 + Image($r('app.media.right_arrow')).width(16)
  490 + }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
  491 + .visibility(this.reportDetail?.state == '1' ? Visibility.Visible : Visibility.None)
  492 + .onClick(() => {
  493 + pushOutsideWeb(`${basePath}/report/view?id=${reportId}`)
453 }) 494 })
454 - })  
455 - // Row(){  
456 - // Row(){  
457 - // Image($r('app.media.lookView')).width(16)  
458 - // Text('预览统计').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})  
459 - // }  
460 - // Image($r('app.media.right_arrow')).width(16)  
461 - // }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
462 - // .onClick(() => {  
463 - // pushOutsideWeb(`https://xfwbzs.crgx.net/report/preview?id=${reportId}`)  
464 - // })  
465 - Row(){  
466 - Row(){  
467 - Image($r('app.media.document')).width(16)  
468 - Text('自动报告').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})  
469 - }  
470 - Image($r('app.media.right_arrow')).width(16)  
471 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
472 - .visibility(this.reportDetail?.state == '1' ? Visibility.Visible : Visibility.None)  
473 - .onClick(() => {  
474 - pushOutsideWeb(`${basePath}/report/view?id=${reportId}`)  
475 - })  
476 - Row(){  
477 - Row(){  
478 - Image($r('app.media.setting')).width(16)  
479 - Text('导出PDF').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})  
480 - }  
481 - Image($r('app.media.right_arrow')).width(16)  
482 - }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')  
483 - .visibility(this.reportDetail?.state == '1' ? Visibility.Visible : Visibility.None)  
484 - .onClick(() => {  
485 - pushOutsideWeb(`${basePath}/report/view?id=${reportId}`)  
486 - })  
487 - }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')  
488 - }.width('100%')  
489 - }.height('100%').backgroundColor('#f2f3f7').padding(10) 495 + }.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
  496 + }.width('100%')
  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 -}  
  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 +}
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,96 +46,99 @@ struct UpdatePassword { @@ -45,96 +46,99 @@ struct UpdatePassword {
45 } 46 }
46 @State returnCode: string = '' 47 @State returnCode: string = ''
47 build() { 48 build() {
48 - Stepper({  
49 - index: this.currentIndex  
50 - }) {  
51 - // 第一个步骤页  
52 - StepperItem() {  
53 - Column() {  
54 - Text('身份验证')  
55 - .itemTextStyle()  
56 - Row(){ 49 + Column(){
  50 + NavHeader({title: '重置密码'})
  51 + Stepper({
  52 + index: this.currentIndex
  53 + }) {
  54 + // 第一个步骤页
  55 + StepperItem() {
  56 + Column() {
  57 + Text('身份验证')
  58 + .itemTextStyle()
57 Row(){ 59 Row(){
58 - Image($r('app.media.require')).width(20)  
59 - Text('邮箱')  
60 - }.width(90)  
61 - TextInput({placeholder: '请输入邮箱', text: $$this.updateForm.email})  
62 - .backgroundColor('#fff').layoutWeight(1).type(InputType.Email)  
63 - .showError(ValidateInputHandle(this.updateForm.email, 'email') ? '' : '请正确输入邮箱')  
64 - }.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})  
65 - Row(){ 60 + Row(){
  61 + Image($r('app.media.require')).width(20)
  62 + Text('邮箱')
  63 + }.width(90)
  64 + TextInput({placeholder: '请输入邮箱', text: $$this.updateForm.email})
  65 + .backgroundColor('#fff').layoutWeight(1).type(InputType.Email)
  66 + .showError(ValidateInputHandle(this.updateForm.email, 'email') ? '' : '请正确输入邮箱')
  67 + }.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
66 Row(){ 68 Row(){
67 - Image($r('app.media.require')).width(20)  
68 - Text('验证码')  
69 - }.width(90)  
70 - Row(){  
71 - TextInput({placeholder: '请输入验证码', text: $$this.updateForm.code})  
72 - .showError(this.updateForm.code == this.returnCode ? '' : '验证码不正确')  
73 - .backgroundColor('#fff').layoutWeight(1).onChange((value) => { 69 + Row(){
  70 + Image($r('app.media.require')).width(20)
  71 + Text('验证码')
  72 + }.width(90)
  73 + Row(){
  74 + TextInput({placeholder: '请输入验证码', text: $$this.updateForm.code})
  75 + .showError(this.updateForm.code == this.returnCode ? '' : '验证码不正确')
  76 + .backgroundColor('#fff').layoutWeight(1).onChange((value) => {
74 if(value == this.returnCode){ 77 if(value == this.returnCode){
75 this.firstState = ItemState.Normal 78 this.firstState = ItemState.Normal
76 } 79 }
77 - })  
78 - Text('获取验证码').fontSize(12).backgroundColor('#1890ff').borderRadius(5)  
79 - .padding({top: 4, bottom: 4, left: 10, right: 10}).fontColor('#fff')  
80 - .onClick(async () => {  
81 - if(this.updateForm.email == ''){  
82 - return promptAction.showToast({message: '请输入邮箱'})  
83 - }  
84 - this.loadingController.open()  
85 - const res: AxiosResponse<emailType> = await getEmailCode(this.updateForm.email)  
86 - this.returnCode = res.data.data  
87 - this.loadingController.close()  
88 - promptAction.showToast({  
89 - message: '已发送至邮箱,请查收'  
90 - })  
91 }) 80 })
92 - }.layoutWeight(1)  
93 - }.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})  
94 - }.itemStyle()  
95 - }  
96 - .nextLabel('下一步')  
97 - .status(this.firstState)  
98 - // 第二个步骤页  
99 - StepperItem() {  
100 - Column() {  
101 - Text('重置密码')  
102 - .itemTextStyle()  
103 - Row(){  
104 - Row(){  
105 - Image($r('app.media.require')).width(20)  
106 - Text('新密码')  
107 - }.width(90)  
108 - TextInput({placeholder: '请输入新密码', text: $$this.updateForm.password})  
109 - .backgroundColor('#fff').layoutWeight(1)  
110 - }.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})  
111 - Row(){  
112 - Row(){  
113 - Image($r('app.media.require')).width(20)  
114 - Text('确认密码')  
115 - }.width(90) 81 + Text('获取验证码').fontSize(12).backgroundColor('#1890ff').borderRadius(5)
  82 + .padding({top: 4, bottom: 4, left: 10, right: 10}).fontColor('#fff')
  83 + .onClick(async () => {
  84 + if(this.updateForm.email == ''){
  85 + return promptAction.showToast({message: '请输入邮箱'})
  86 + }
  87 + this.loadingController.open()
  88 + const res: AxiosResponse<emailType> = await getEmailCode(this.updateForm.email)
  89 + this.returnCode = res.data.data
  90 + this.loadingController.close()
  91 + promptAction.showToast({
  92 + message: '已发送至邮箱,请查收'
  93 + })
  94 + })
  95 + }.layoutWeight(1)
  96 + }.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
  97 + }.itemStyle()
  98 + }
  99 + .nextLabel('下一步')
  100 + .status(this.firstState)
  101 + // 第二个步骤页
  102 + StepperItem() {
  103 + Column() {
  104 + Text('重置密码')
  105 + .itemTextStyle()
116 Row(){ 106 Row(){
117 - TextInput({placeholder: '请确认密码', text: $$this.updateForm.againPassword}) 107 + Row(){
  108 + Image($r('app.media.require')).width(20)
  109 + Text('新密码')
  110 + }.width(90)
  111 + TextInput({placeholder: '请输入新密码', text: $$this.updateForm.password})
118 .backgroundColor('#fff').layoutWeight(1) 112 .backgroundColor('#fff').layoutWeight(1)
119 - }.layoutWeight(1)  
120 - }.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})  
121 - }.itemStyle()  
122 - }  
123 - .nextLabel('完成')  
124 - .prevLabel('Previous')  
125 - .status(this.secondState)  
126 - }  
127 - .backgroundColor('#F1F3F5')  
128 - .onFinish( async() => {  
129 - if(this.updateForm.againPassword !== this.updateForm.password) {  
130 - return promptAction.showToast({message: '两次密码输入不一致'}) 113 + }.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
  114 + Row(){
  115 + Row(){
  116 + Image($r('app.media.require')).width(20)
  117 + Text('确认密码')
  118 + }.width(90)
  119 + Row(){
  120 + TextInput({placeholder: '请确认密码', text: $$this.updateForm.againPassword})
  121 + .backgroundColor('#fff').layoutWeight(1)
  122 + }.layoutWeight(1)
  123 + }.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
  124 + }.itemStyle()
  125 + }
  126 + .nextLabel('完成')
  127 + .prevLabel('Previous')
  128 + .status(this.secondState)
131 } 129 }
132 - // 此处可处理点击最后一页的Finish时的逻辑,例如路由跳转等  
133 - await resetPassword(this.updateForm)  
134 - promptAction.showToast({message: '重置成功'})  
135 - router.replaceUrl({  
136 - url: 'pages/Login' 130 + .layoutWeight(1)
  131 + .onFinish( async() => {
  132 + if(this.updateForm.againPassword !== this.updateForm.password) {
  133 + return promptAction.showToast({message: '两次密码输入不一致'})
  134 + }
  135 + // 此处可处理点击最后一页的Finish时的逻辑,例如路由跳转等
  136 + await resetPassword(this.updateForm)
  137 + promptAction.showToast({message: '重置成功'})
  138 + router.replaceUrl({
  139 + url: 'pages/Login'
  140 + })
137 }) 141 })
138 - }) 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,78 +48,81 @@ struct DownLoadImage { @@ -48,78 +48,81 @@ struct DownLoadImage {
48 }) 48 })
49 } 49 }
50 build() { 50 build() {
51 - List(){  
52 - ListItem(){  
53 - Column({ space: 10 }) {  
54 - Row(){  
55 - Row({space: 5}){  
56 - Text().width(2).height(20).backgroundColor('#1890ff')  
57 - Text('图片').fontSize(14).fontWeight(600) 51 + Column(){
  52 + NavHeader({title: '下载图片'})
  53 + List(){
  54 + ListItem(){
  55 + Column({ space: 10 }) {
  56 + Row(){
  57 + Row({space: 5}){
  58 + Text().width(2).height(20).backgroundColor('#1890ff')
  59 + Text('图片').fontSize(14).fontWeight(600)
  60 + }
  61 + Text('预览图片')
  62 + .fontSize(14).fontColor('#fff').backgroundColor('#1890ff')
  63 + .padding({left: 15, right: 15, top: 2, bottom: 2})
  64 + .borderRadius(4)
  65 + .onClick(() => {
  66 + this.photoBrowserController.open()
  67 + })
58 } 68 }
59 - Text('预览图片')  
60 - .fontSize(14).fontColor('#fff').backgroundColor('#1890ff')  
61 - .padding({left: 15, right: 15, top: 2, bottom: 2})  
62 - .borderRadius(4)  
63 - .onClick(() => {  
64 - this.photoBrowserController.open() 69 + .justifyContent(FlexAlign.SpaceBetween)
  70 + .width('100%')
  71 + GridRow({ columns: 2, gutter: 10 }) {
  72 + ForEach(this.viewImg, (item: string) => {
  73 + GridCol() {
  74 + Column({space: 10}){
  75 + Image(item)
  76 + .width('100%')
  77 + .height(150)
  78 + .borderRadius(4)
  79 + Row(){
  80 + SaveButton(this.saveButtonOptions)
  81 + // 创建安全控件按钮
  82 + .onClick(async (event, result: SaveButtonOnClickResult) => {
  83 + if (result == SaveButtonOnClickResult.SUCCESS) {
  84 + downFile(item, 'jpg')
  85 + }
  86 + })
  87 + }
  88 + }
  89 + }
65 }) 90 })
  91 + }
66 } 92 }
67 - .justifyContent(FlexAlign.SpaceBetween)  
68 - .width('100%')  
69 - GridRow({ columns: 2, gutter: 10 }) {  
70 - ForEach(this.viewImg, (item: string) => {  
71 - GridCol() {  
72 - Column({space: 10}){  
73 - Image(item)  
74 - .width('100%')  
75 - .height(150)  
76 - .borderRadius(4)  
77 - Row(){ 93 + }.visibility(this.viewImg.length == 0 ? Visibility.None : Visibility.Visible)
  94 + ListItem(){
  95 + Column({ space: 10 }) {
  96 + Row(){
  97 + Row({space: 5}){
  98 + Text().width(2).height(20).backgroundColor('#1890ff')
  99 + Text('视频').fontSize(14).fontWeight(600)
  100 + }
  101 + }
  102 + .justifyContent(FlexAlign.Start)
  103 + .width('100%')
  104 + GridRow({ columns: 1}) {
  105 + ForEach(this.viewVideo, (item: string) => {
  106 + GridCol() {
  107 + Column({ space: 10}){
  108 + Video({ src: item }).width('100%').height(300).controls(true)
78 SaveButton(this.saveButtonOptions) 109 SaveButton(this.saveButtonOptions)
79 // 创建安全控件按钮 110 // 创建安全控件按钮
80 .onClick(async (event, result: SaveButtonOnClickResult) => { 111 .onClick(async (event, result: SaveButtonOnClickResult) => {
81 if (result == SaveButtonOnClickResult.SUCCESS) { 112 if (result == SaveButtonOnClickResult.SUCCESS) {
82 - downFile(item, 'jpg') 113 + downFile(item, 'mp4')
83 } 114 }
84 }) 115 })
85 } 116 }
86 } 117 }
87 - }  
88 - })  
89 - }  
90 - }  
91 - }.visibility(this.viewImg.length == 0 ? Visibility.None : Visibility.Visible)  
92 - ListItem(){  
93 - Column({ space: 10 }) {  
94 - Row(){  
95 - Row({space: 5}){  
96 - Text().width(2).height(20).backgroundColor('#1890ff')  
97 - Text('视频').fontSize(14).fontWeight(600)  
98 - }  
99 - }  
100 - .justifyContent(FlexAlign.Start)  
101 - .width('100%')  
102 - GridRow({ columns: 1}) {  
103 - ForEach(this.viewVideo, (item: string) => {  
104 - GridCol() {  
105 - Column({ space: 10}){  
106 - Video({ src: item }).width('100%').height(300).controls(true)  
107 - SaveButton(this.saveButtonOptions)  
108 - // 创建安全控件按钮  
109 - .onClick(async (event, result: SaveButtonOnClickResult) => {  
110 - if (result == SaveButtonOnClickResult.SUCCESS) {  
111 - downFile(item, 'mp4')  
112 - }  
113 - })  
114 - }  
115 - }  
116 - .margin({  
117 - top: 10 118 + .margin({
  119 + top: 10
  120 + })
118 }) 121 })
119 - }) 122 + }
120 } 123 }
121 - }  
122 - }.visibility(this.viewVideo.length == 0 ? Visibility.None : Visibility.Visible)  
123 - }.padding(10) 124 + }.visibility(this.viewVideo.length == 0 ? Visibility.None : Visibility.Visible)
  125 + }.padding(10)
  126 + }
124 } 127 }
125 } 128 }
1 -export default 'https://xfwbzshd.crgx.net'  
2 -export const basePath = 'https://xfwbzs.crgx.net'  
  1 +// export default 'https://xfwbzshd.crgx.net'
  2 +// 后端域名
  3 +export default 'https://xfappht.crgx.net'
  4 +// 前端地址
  5 +export const basePath = 'https://xfwbzs.crgx.net'
  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>
@@ -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",