作者 xiaoqiu

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

正在显示 58 个修改的文件 包含 1205 行增加849 行删除
不能预览此文件类型
registry=https://ohpm.openharmony.cn/ohpm/,https://artifact.bytedance.com/repository/byted-ohpm/
\ No newline at end of file
... ...
不能预览此文件类型
{
"apiType": "stageMode",
"buildOption": {
"arkOptions": {
// "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
"runtimeOnly": {
"packages": [
"@csj/adapter_ks",
"ksadsdk",
"@csj/adapter_gdt",
"@gdt/gdt-union-sdk"
]
}
}
},
"buildOptionSet": [
{
... ...
不能预览此文件类型
不能预览此文件类型
... ... @@ -5,6 +5,7 @@
"main": "",
"author": "",
"license": "",
"dependencies": {}
"dependencies": {
}
}
... ...
不能预览此文件类型
... ... @@ -201,8 +201,8 @@ export interface reportDetailData {
maintenanceTime: string;
technicalDirectorId?: string;
technicalDirector?: null;
approvePersonId?: null;
approvePerson?: null;
approvePersonId?: number;
approvePerson?: string;
allowPerson?: null;
state: string;
reportType: string;
... ... @@ -370,7 +370,7 @@ export interface MalfunctionListTest {
export interface MalfunctionListRow {
malfunctionId?: number;
findTime?: null | string;
findTime?: string;
findPeople?: null;
malfunctionPart: string;
malfunctionDes: string;
... ... @@ -383,8 +383,8 @@ export interface MalfunctionListRow {
malfunctionConfirm: string;
reportId?: number;
version?: number;
maintenanceComment?: null | string;
applyCompanyComment?: null | string;
maintenanceComment?: string;
applyCompanyComment?: string;
remark: null | string;
companyName?: null | string;
applyCompanyName?: string;
... ...
import { router } from '@kit.ArkUI'
@Component
export default struct NavHeader {
@Prop title:string = ''
build() {
Row(){
Image($r('app.media.back_light')).width(20).margin({right: 10})
.onClick(() => {
router.back()
})
Text(this.title).fontSize(16).fontWeight(500)
Text('').width(20)
}.justifyContent(FlexAlign.SpaceBetween).width('100%').padding(10).backgroundColor('#fff')
}
}
\ No newline at end of file
... ...
... ... @@ -14,8 +14,10 @@ export default struct CertificateDialog {
Text('取消')
.fontColor('#909090')
.onClick(() => {
this.selectValue = this.certificateList[0]
this.personCertificateInfo.certificateId = this.certificateData[0].certificateId
if(this.selectValue == ''){
this.selectValue = this.certificateList[0]
this.personCertificateInfo.certificateId = this.certificateData[0].certificateId
}
this.controller.close()
})
Text('请选择证书类型')
... ...
... ... @@ -79,7 +79,7 @@ export default struct ImportRecordsDialog{
.onClick(() => {
AlertDialog.show({
title: '',
message: '删除后无法找回,确认删除全部故障处理记录并提交?',
message: '导入手会替换掉原来填写的信息,是否导入?',
autoCancel: true,
alignment: DialogAlignment.Center,
gridCount: 4,
... ...
import { window } from '@kit.ArkUI'
export class DemoConstants {
static windowStage: window.WindowStage
}
\ No newline at end of file
... ...
import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
import { window } from '@kit.ArkUI';
import { DemoConstants } from './DemoConstants';
export default class EntryAbility extends UIAbility {
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
... ... @@ -11,10 +11,10 @@ export default class EntryAbility extends UIAbility {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
}
onWindowStageCreate(windowStage: window.WindowStage): void {
async onWindowStageCreate(windowStage: window.WindowStage) {
// Main window is created, set main page for this ability
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
// await showStartAd(windowStage, this.context)
windowStage.loadContent('pages/Login', (err) => {
if (err.code) {
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 {
}
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
});
DemoConstants.windowStage = windowStage
}
onWindowStageDestroy(): void {
... ... @@ -39,3 +40,17 @@ export default class EntryAbility extends UIAbility {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
}
}
/**
* 打开启动广告
* @param windowStage
* @param ctx
*/
async function showStartAd(windowStage: window.WindowStage, ctx: Context) {
// const adStore = new AdStore(ctx)
// const ad = await getStartAd() // 获取广告数据
// await adStore.setStartAd(ad) // 写入首选项
const win = await windowStage.createSubWindow('startAd') // 创建子窗口
await win.showWindow()
win.setUIContent('pages/StartAd')
}
... ...
import { AdSlot, CSJAdCreator } from '@csj/openadsdk/Index';
import { hilog } from '@kit.PerformanceAnalysisKit';
/**
* Created by xgc on 2024/3/5
*/
export class PrintBiddingTokenUtils {
//qa要求打印biddingToken测试
static printBiddingToken(adSlot: AdSlot, adCreator: CSJAdCreator) {
// let biddingToken = adCreator.getBiddingToken(adSlot, true, 7);
// if (biddingToken) {
// let first = biddingToken.substring(0, biddingToken.length / 2);
// let second = biddingToken.substring(biddingToken.length / 2, biddingToken.length);
// hilog.info(1, "biddingTokenQA1", first);
// hilog.info(1, "biddingTokenQA2", second);
// } else {
// hilog.info(1, "biddingTokenQA3", "error");
// }
}
}
\ No newline at end of file
... ...
import { AdSlot, AdSlotBuilder, AdSlotType, CSJAdSdk } from '@csj/openadsdk'
import { List } from '@kit.ArkTS'
/**
* 聚合功能使用示例
* 如服务端激励验证处理逻辑示例、首次预缓存功能等
*/
export class AdUtils {
/**
* 首次预缓存功能,使用注意
* 1、使用该接口时,创建AdSlot时codeId和adType是必传的,否则广告位无效。
* 2、该接口传入的AdSlot要与后续发起请求的AdSlot参数设置完全一致,否则会导致无法命中预缓存。
* 3、初始化后,开发者仅能调用一次该接口,多次调用不生效。
* 4、调用该接口的最早时机:SDK初始化完成后;该时机与开屏广告加载的时机非常近,因此不建议开屏广告用该接口提前加载。
*/
preload() {
// 第一步:准备需要预缓存的AdSlot list
let adSlotList: List<AdSlot> = new List()
let adSlot1 = new AdSlotBuilder()
.setCodeId("102922441") // 预缓存必传!
.setAdType(AdSlotType.TYPE_REWARD_VIDEO) // 预缓存必传!
.build()
let adSlot2 = new AdSlotBuilder()
.setCodeId("103056846")
.setAdType(AdSlotType.TYPE_REWARD_VIDEO) // 激励类型广告位
.setRewardName("金币")
.setRewardAmount(1)
.build()
let adSlot3 = new AdSlotBuilder()
.setCodeId("103086407")
.setAdType(AdSlotType.TYPE_FULL_SCREEN_VIDEO) // 插屏类型广告位
.build()
adSlotList.add(adSlot1)
adSlotList.add(adSlot2)
adSlotList.add(adSlot3)
// 第二步:设置并行加载的数量和时间间隔
let parallelNum = 2
let requestIntervalS = 2
// 第三步:发起预请求
CSJAdSdk.getMediationManager().preload(adSlotList, parallelNum, requestIntervalS)
}
}
\ No newline at end of file
... ...
import display from '@ohos.display'
export class UIUtil {
static getScreenWidthPx() {
let screen = display.getDefaultDisplaySync()
return screen.width
}
/**
* 获得屏幕高度,包含了挖孔区域
* @returns
*/
static getScreenHeightPx() : number {
let screen = display.getDefaultDisplaySync()
return screen.height
}
static getScreenWidthVp(): number {
return UIUtil.getScreenWidthPx() / UIUtil.getDensityPixels()
}
static getScreenHeightVp() : number {
return UIUtil.getScreenHeightPx() / UIUtil.getDensityPixels()
}
static getScreenStatusBarHeightVp(): number {
return 38.3
}
static getDensityPixels() {
let screen = display.getDefaultDisplaySync()
return screen.densityPixels
}
}
\ No newline at end of file
... ...
import {
AdSlotBuilder,
CSJAdCreator,
CSJSplashAd,
CSJAdSdk,
CSJSplashAdInteractionListener,
CSJSplashAdLoadListener,
CSJSplashAdCloseType,
CSJSplashAdLoadParam,
MediationAdInfo
} from '@csj/openadsdk'
import { UIUtil } from '../mediation_adtype/tools/UIUtil'
import { PrintBiddingTokenUtils } from '../mediation_adtype/test/PrintBiddintTokenUtils'
import { window, promptAction, router } from '@kit.ArkUI'
import { DemoConstants } from '../entryability/DemoConstants'
import('./SplashAdShowPage')
@Builder
function bottomViewBuilder() {
Text('Bottom View')
.backgroundColor(Color.Yellow)
.width(UIUtil.getScreenWidthVp())
.height(UIUtil.getScreenHeightVp() - adHeight)
}
@Builder
function closeBtnBuilder(closeBlock: () => void) {
Text('close')
.textAlign(TextAlign.Center)
.backgroundColor(Color.Yellow)
.width(60)
.height(60)
.borderRadius(30)
.margin({ top: 50, right: 40 })
.onClick((event) => {
closeBlock()
})
}
let globalBuilder: WrappedBuilder<[]> = wrapBuilder(bottomViewBuilder)
let globalCloseBtnBuilder: WrappedBuilder<[closeBlock: () => void]> = wrapBuilder(closeBtnBuilder)
let screenWidth: number = UIUtil.getScreenWidthVp()
let screenHeight: number = UIUtil.getScreenHeightVp()
let adWidth: number = Math.round(screenWidth)
let adHeight: number = Math.round(screenHeight)
@Entry
@Component
export struct SplashAdDemoPage {
private mAdCreator: CSJAdCreator = CSJAdSdk.getAdCreator()
private splashAd: CSJSplashAd | undefined
context = getContext(this)
@State adLoadSuccess: Boolean = false
@State errorMsg: string | undefined = undefined;
@State startLoad: boolean = false;
private mLoadListener: CSJSplashAdLoadListener = {
onAdLoaded: (splashAd: CSJSplashAd) => {
console.log("开屏回调 - onAdLoaded")
this.splashAd = splashAd;
this.adLoadSuccess = true;
this.startLoad = false;
// 方式一:直接showSplashAd
this.splashAd.setInteractionListener(this.mSplashAdInteractionListener)
if (adHeight < screenHeight) {
this.splashAd?.showSplashAd(DemoConstants.windowStage, globalBuilder,
this.useCustomCloseBtn ? globalCloseBtnBuilder : undefined)
} else {
this.splashAd?.showSplashAd(DemoConstants.windowStage, undefined,
this.useCustomCloseBtn ? globalCloseBtnBuilder : undefined)
}
},
onError: (code: number, message: string) => {
this.errorMsg = "onError code: " + code + "message: " + message;
console.log(`开屏回调 - onError code: ${code} message: ${message}`)
},
onRenderSuccess: (splashAd: CSJSplashAd) => {
this.splashAd = splashAd;
this.adLoadSuccess = true;
this.startLoad = false;
console.log("开屏回调 - onRenderSuccess")
},
onRenderFail: (code: number, message: string) => {
console.log("开屏回调 - onRenderFail")
}
}
@State widthLabelText: string = "宽:" + adWidth
@State heightLabelText: string = "高:" + adHeight
private useCustomCloseBtn: boolean = false
private loadTimeout: number = 3000
private mWindow: window.Window | undefined = undefined
closeWin() {
const win = window.findWindow('startAd') // 找到子窗口
win.destroyWindow() // 销毁窗口
}
aboutToAppear(){
let adSlot = new AdSlotBuilder()
.setCodeId("103398151")
.setAcceptSize(adWidth,
adHeight)
.build()
let param = new CSJSplashAdLoadParam(adSlot, this.mLoadListener, this.getUIContext(), this.loadTimeout)
PrintBiddingTokenUtils.printBiddingToken(adSlot, this.mAdCreator);
this.mAdCreator.loadSplashAd(param)
}
build() {
Column() {
Image($r('app.media.logo')).width(60).height(60)
}.width('100%').height('100%').justifyContent(FlexAlign.Center)
}
// CSJSplashAdInteractionListener
private mSplashAdInteractionListener: CSJSplashAdInteractionListener = {
onDidShow: () => {
console.log("开屏回调 - onDidShow")
// 聚合show信息获取
let info = this.splashAd?.getMediaExtraInfo()
if (info instanceof MediationAdInfo) {
let showcpm = info.getShowEcpm()
if (showcpm) {
console.log("GMMediation_showcpm", "adnName:"+showcpm.getAdnName())
console.log("GMMediation_showcpm", "ritType:"+showcpm.getRitType())
console.log("GMMediation_showcpm", "adnRitId:"+showcpm.getAdnRitId())
console.log("GMMediation_showcpm", "ecpm:"+showcpm.getEcpm())
}
}
},
onDidClose: (closeType: CSJSplashAdCloseType) => {
this.splashAd = undefined
// 方式二:需自行移除广告
this.mWindow?.destroyWindow()
router.pushUrl({ url: "pages/Login"})
this.closeWin()
},
onDidClick: () => {
console.log("开屏回调 - onDidClick")
router.pushUrl({ url: "pages/Login"})
},
onVideoDidPlayFinish: () => {
console.log("开屏回调 - onVideoDidPlayFinish")
},
onVideoDidPlayFail: () => {
console.log("开屏回调 - onVideoDidPlayFail")
}
}
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,7 @@ import {
projectType,
RecordsList
} from '../api/recordsType'
import NavHeader from '../components/NavHeader'
import { quarterType, quarterTest } from '../api/options/optionsType'
import { getMaintenanceType, getLatestProjectList, getEquipmentList, addRecords, getCompanyPersonList, getReportDetail, updateRecords, getRecordsList } from '../api/originalRecords'
import { AxiosResponse } from '@ohos/axios'
... ... @@ -92,6 +93,7 @@ struct EditUser {
@State errorMsg: string = ''
flag: boolean = true
async aboutToAppear() {
// reportId等于undefined为编辑状态
this.isEdit = reportId !== undefined
if(reportId){
this.addForm.reportId = reportId
... ... @@ -110,6 +112,7 @@ struct EditUser {
this.addForm.state = result.state
this.addForm.technicalDirectorId = result.technicalDirectorId
this.addForm.maintenancePeopleList = result.technicalDirectorId?.split(',')
this.addForm.approvePersonId = result.approvePersonId as number
this.addForm.projectList = result.projectList.map(item => {
return { projectId: item.projectId } as projectType
})
... ... @@ -144,6 +147,7 @@ struct EditUser {
build() {
Column(){
NavHeader({title: '添加原始记录'})
Scroll(){
Column(){
Column(){
... ... @@ -217,9 +221,15 @@ struct EditUser {
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) {
ForEach(this.companyPersonList, (children: companyPersonRow) => {
Row() {
Radio({ value: children.personId.toString(), group: 'radioGroup',
Radio({ value: children.personId.toString(), group: 'radioGroupPeople',
indicatorType:RadioIndicatorType.TICK,
}).height(14).width(14).checked(this.addForm.approvePersonId == children.personId)
}).height(14).width(14).checked(this.addForm.approvePersonId === children.personId)
.onChange((checked: boolean) => {
if (checked) {
this.addForm.approvePerson = children.personName
this.addForm.approvePersonId = children.personId
}
})
Text(children.personName).fontSize(14)
}
})
... ... @@ -478,9 +488,20 @@ struct EditUser {
promptAction.showToast({
message: '添加成功'
})
router.back()
}
})
}.width('100%').height(40).backgroundColor('#fff').padding({left: 10, right: 10})
}.width('100%').height('100%').backgroundColor('#f2f3f7')
}
pageTransition() {
// 该页面进入动画时长为1000ms,尽量与另一页面的退出动画时长匹配
PageTransitionEnter({ duration: 500 })
.slide(SlideEffect.Left).opacity(0)
// 该页面退出动画时长为1200ms,尽量与另一页面的进入动画时长匹配
PageTransitionExit({ duration: 500 })
.translate({ x: 150.0 })
.opacity(0)
}
}
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@ import { promptAction } from '@kit.ArkUI';
import { AxiosResponse } from '@ohos/axios'
import { headerTest, headerRow, companyData } from '../api/userType'
import { getHeaderInfo, updateHeaderInfo, addHeaderInfo } from '../api/user'
import NavHeader from '../components/NavHeader'
let companyId = preferencesUtil.get('XF_COMPANY_ID', 65) as number
@Entry
... ... @@ -80,6 +80,7 @@ struct EditUser {
}
build() {
Column(){
NavHeader({title: '公司信息'})
Column(){
Column(){
Row(){
... ...
import NavHeader from '../components/NavHeader'
@Entry
@Component
struct CancellationAgreement {
build() {
Scroll(){
Column({space: 10}){
NavHeader({title: '注销协议'})
Text('消防维保助手账号注销协议').textAlign(TextAlign.Center).width('100%')
Column({space: 10}){
Text('尊敬的用户,您好!在您正式开始下一步消防维保助手账号注销流程前,我们特意为您作出如下重要提示:注销消防维保助手账号是不可恢复的操作,注销消防维保助手账号后,您将无法找回您通过该账号添加或绑定的任何内容和信息,即使您选择相同的身份证号/统一社会信用代码再次注册账号并使 用消防维保助手产品及服务。').fontSize(12)
... ...
... ... @@ -8,7 +8,7 @@ import PhotoBrowser from '../dialog/PhotoBrowserDialog'
import { uploadFile, uploadResult } from '../utils/uploadFile'
import { request } from '@kit.BasicServicesKit'
import { promptAction } from '@kit.ArkUI';
import NavHeader from '../components/NavHeader'
let personId = preferencesUtil.get('XF_PERSON_ID', 0) as number
@Entry
@Component
... ... @@ -56,6 +56,7 @@ struct EditUser {
})
build() {
Column(){
NavHeader({ title: '证书信息'})
Column(){
Column(){
Row(){
... ...
... ... @@ -13,6 +13,8 @@ import { getReportDetail, getMalfunctionList, deleteRecords, successReport, retu
import { reportDetailTest, reportDetailData, ProjectList, MalfunctionListTest, MalfunctionListRow, configTest } from '../api/recordsType'
import { pushOutsideWeb } from '../utils/pushOutsideWeb'
import ThemeStaticTest from '../components/ThemeStaticText'
import NavHeader from '../components/NavHeader'
interface routerParams {
reportId: number
... ... @@ -85,80 +87,295 @@ struct DetailRecords {
}
build() {
Scroll(){
Column({space: 10}){
// 概况
Column(){
Row(){
Column(){
NavHeader({title: '维保记录详情'})
Scroll(){
Column({space: 10}){
// 概况
Column(){
Row(){
Row(){
Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
Text('概况').fontSize(12).fontColor('#999')
}
Row(){
Image($r('app.media.edit_1')).width(12)
Text('修改概况').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
Image($r('app.media.right_arrow')).width(12)
}.onClick(() => {
router.pushUrl({
url: 'pages/AddRecords',
params: {
reportId: this.reportDetail?.reportId
}
})
})
.visibility(this.reportDetail?.state == '5' || this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)
}.border({width: {bottom: 1}, color: '#eee'}).justifyContent(FlexAlign.SpaceBetween).width('100%').padding(5)
Row(){
Text('消防设施使用单位').fontSize(12).fontColor('#999')
Text(this.reportDetail?.applyCompanyName || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('项目名称').fontSize(12).fontColor('#999')
Text(this.reportDetail?.reportName || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('项目编号').fontSize(12).fontColor('#999')
Text(this.reportDetail?.reportNo || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('维保记录类型').fontSize(12).fontColor('#999')
ThemeStaticTest({
textValue: this.reportDetail?.reportType,
type: '0'
})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('状态').fontSize(12).fontColor('#999')
ThemeStaticTest({
textValue: this.reportDetail?.state,
type: '1'
})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('创建日期').fontSize(12).fontColor('#999')
Text(this.reportDetail?.reportTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
Text('概况').fontSize(12).fontColor('#999')
}
Text('维保日期').fontSize(12).fontColor('#999')
Text(this.reportDetail?.maintenanceTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Image($r('app.media.edit_1')).width(12)
Text('修改概况').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
Image($r('app.media.right_arrow')).width(12)
}.onClick(() => {
router.pushUrl({
url: 'pages/AddRecords',
params: {
reportId: this.reportDetail?.reportId
Text('完成日期').fontSize(12).fontColor('#999')
Text(this.reportDetail?.maintenanceEndTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('项目负责人').fontSize(12).fontColor('#999')
Text(this.reportDetail?.approvePerson || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('维保人员').fontSize(12).fontColor('#999')
Text(this.reportDetail?.maintenancePeople || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('甲方签字').fontSize(12).fontColor('#999')
Row({space: 5}){
Image($r('app.media.share')).width(14)
Text('分享签名').fontSize(12).fontColor('#1890ff')
}.onClick(() => {
AlertDialog.show({
title: '分享签名提示',
message: `出于对多个甲方见证人签名的考虑,在甲方签名完成后,仍是"待甲方签名"的状态,需【维保公司账号】前往【更多操作】-->【完成】`,
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
action: () => {
console.info('Callback when the first button is clicked')
}
},
secondaryButton: {
enabled: true,
defaultFocus: true,
style: DialogButtonStyle.HIGHLIGHT,
value: '确认',
action: async () => {
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', '')}`)
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', '')}`)
}
}
})
})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '1' || this.reportDetail?.state == '5' ? Visibility.Visible : Visibility.None)
Column({space: 5}){
Text('仪器设备').fontSize(12).fontColor('#999')
Text(this.reportDetail?.equipment || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).alignItems(HorizontalAlign.Start).width('100%')
Row(){
Text('备注').fontSize(12).fontColor('#999').margin({right: 10})
HmParseHTML({
htmlStr: this.reportDetail?.result || '<p>无</p>',
baseFontSize: 12,
baseFontColor: '#999'
})
}.padding(10).justifyContent(FlexAlign.SpaceBetween)
}.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
// 主要消防措施
Column({space: 10}){
Row(){
Row(){
Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
Text('主要消防措施').fontSize(12).fontColor('#999')
}
Row(){
Image($r('app.media.edit_1')).width(12)
Text('查看记录').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
Image($r('app.media.right_arrow')).width(12)
}.onClick(() => {
if(personId !== '') {
router.pushUrl({
url: 'pages/LookRecords',
params: {
reportId: this.reportDetail?.reportId,
pid: personId
}
})
} else {
router.pushUrl({
url: 'pages/LookRecordCompany',
params: {
reportId: this.reportDetail?.reportId
}
})
}
})
}.justifyContent(FlexAlign.SpaceBetween).width('100%').margin({bottom: 10})
ForEach(this.projectList, (item: ProjectList, index) => {
Column({space: 5}){
Row(){
Row({space: 5}){
Text((index + 1).toString()).padding(10).borderRadius(5)
.backgroundColor(Color.Gray).fontSize('#666')
Text(item.projectName).fontSize(12).fontColor('#999')
}
Row(){
Text('查看视频/图片内容').fontSize(12).fontColor('#1890ff')
Image($r('app.media.right_arrow')).width(12)
}.visibility(this.isShowCloudDown && item.cosKey !== null ? Visibility.Visible : Visibility.None)
.onClick(() => {
router.pushUrl({
url: 'pages/VideoDetail',
params: {
cosKey: item.cosKey,
relateId: item.relateId
}
})
})
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
Row(){
Text(item.updateTime).fontSize(12).fontColor('#999')
Text(item.state == '0' ? '未编辑' : '已编辑')
.padding({left: 6, right: 6})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).fontColor(item.state == '0' ? '#ff4949' : '#13ce66')
.backgroundColor(item.state == '0' ? '#ffeded' : '#e7faf0').borderColor(item.state == '0' ? '#ffdbdb' : '#d0f5e0')
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
Row(){
Row(){
Image($r('app.media.photo')).width(12).margin({right: 4})
Text('上传视频/图片').fontSize(12).fontColor('#1890ff')
}.layoutWeight(1).justifyContent(FlexAlign.Center)
.visibility(this.isShowCloudDown ? Visibility.Visible : Visibility.None)
.onClick(async () => {
// 上传文件到腾讯云存储
try {
let key: string = item.cosKey == null ? '' : item.cosKey
let systemPhotoImagePath: string = await selectImgOrVideo() // 选择文件
this.loadingController.open()
await uploadFileByTask(key, item.relateId, systemPhotoImagePath)
this.loadingController.close()
} catch (error) {
let err: BusinessError = error as BusinessError;
console.error(`Invoke uploadFile failed, code is ${err.code}, message is ${err.message}`);
}
})
Text().width(2).height(16).backgroundColor('#eee').visibility(this.isShowCloudDown ? Visibility.Visible : Visibility.None)
Row(){
Image($r('app.media.edit_1')).width(12).margin({right: 4})
Text('编辑详情').fontSize(12).fontColor('#1890ff').onClick(() => {
router.pushUrl({
url: 'pages/FireProtectionDetail',
params: item
})
})
}.layoutWeight(1).justifyContent(FlexAlign.Center)
}.width('100%').padding({top: 5}).border({width: {top: 1}, color: '#eee'})
.visibility(item.state == '0' ? Visibility.Visible : Visibility.None)
}.padding({top: 10, left: 10, right: 10, bottom: 10}).borderWidth(1).borderColor('#eee').shadow({ radius: 5, color: Color.Gray }).borderRadius(5)
})
.visibility(this.reportDetail?.state == '5' || this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)
}.border({width: {bottom: 1}, color: '#eee'}).justifyContent(FlexAlign.SpaceBetween).width('100%').padding(5)
Row(){
Text('消防设施使用单位').fontSize(12).fontColor('#999')
Text(this.reportDetail?.applyCompanyName || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('项目名称').fontSize(12).fontColor('#999')
Text(this.reportDetail?.reportName || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('项目编号').fontSize(12).fontColor('#999')
Text(this.reportDetail?.reportNo || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('维保记录类型').fontSize(12).fontColor('#999')
ThemeStaticTest({
textValue: this.reportDetail?.reportType,
type: '0'
})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('状态').fontSize(12).fontColor('#999')
ThemeStaticTest({
textValue: this.reportDetail?.state,
type: '1'
})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('创建日期').fontSize(12).fontColor('#999')
Text(this.reportDetail?.reportTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('维保日期').fontSize(12).fontColor('#999')
Text(this.reportDetail?.maintenanceTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('完成日期').fontSize(12).fontColor('#999')
Text(this.reportDetail?.maintenanceEndTime || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('维保人员').fontSize(12).fontColor('#999')
Text(this.reportDetail?.maintenancePeople || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
Row(){
Text('甲方签字').fontSize(12).fontColor('#999')
Row({space: 5}){
Image($r('app.media.share')).width(14)
Text('分享签名').fontSize(12).fontColor('#1890ff')
}.onClick(() => {
}.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
// 消防设施故障处理单
Column({space: 10}){
Row(){
Row(){
Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
Text('消防设施故障处理单').fontSize(12).fontColor('#999')
}
Row(){
Image($r('app.media.edit_1')).width(12)
Text('故障维修').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
Image($r('app.media.right_arrow')).width(12)
}.onClick(() => {
router.pushUrl({
url: 'pages/FailureMaintenance',
params: {
applyCompanyName: this.reportDetail?.applyCompanyName,
companyName: this.reportDetail?.companyName,
reportName: this.reportDetail?.reportName,
reportId: this.reportDetail?.reportId,
reportType: this.reportDetail?.reportType
}
})
})
.visibility(this.reportDetail?.state == '5' || this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)
}.justifyContent(FlexAlign.SpaceBetween).width('100%').margin({bottom: 10})
Column(){
Row(){
Text('发现时间:').fontSize(12).fontColor('#999')
Text(this.findTime).fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.Start).width('100%')
ForEach(this.malfunctionList, (malfunction: MalfunctionListRow, index: number) => {
Column({space: 4}){
Row({space: 10}){
Text((index + 1).toString()).width(30).height(30).backgroundColor(Color.Gray)
.borderWidth(1).borderColor('#eee').borderRadius(4).textAlign(TextAlign.Center)
Text(malfunction.malfunctionPart)
}.margin({bottom: 10})
Text(`故障情况及影响:${malfunction.malfunctionDes}`).fontSize(12).fontColor('#999')
Text(`采取的应急措施:${malfunction.security}`).fontSize(12).fontColor('#999')
Text(`更换设备及材料情况:${malfunction.maintenanceMethod}`).fontSize(12).fontColor('#999')
Text(`处理结果:${malfunction.malfunctionConfirm}`).fontSize(12).fontColor('#999')
Text(`备注:${malfunction.remark || '无'}`).fontSize(12).fontColor('#999')
}.border({width: {bottom: 1}, color: '#eee'}).width('100%')
.padding(10).alignItems(HorizontalAlign.Start)
})
Row(){
Text('维护保养单位意见:').fontSize(12).fontColor('#999')
Text(this.maintenanceComment).fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.padding(10).justifyContent(FlexAlign.Start).width('100%')
Row(){
Text('委托单位意见:').fontSize(12).fontColor('#999')
Text(this.applyCompanyComment).fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.padding(10).justifyContent(FlexAlign.Start).width('100%')
}.width('100%').alignItems(HorizontalAlign.Start)
.visibility(this.malfunctionList.length > 0 ? Visibility.Visible : Visibility.None)
Column(){
Image($r('app.media.emptyData')).width(100)
Text('暂无维修数据').fontSize(12).fontColor('#999').textAlign(TextAlign.Center).margin({top: 5})
}.visibility(this.malfunctionList.length == 0 ? Visibility.Visible : Visibility.None)
}.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
// 更多操作
Column(){
Row(){
Row(){
Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
Text('操作').fontSize(12).fontColor('#999')
}
}.border({width: {bottom: 1}, color: '#eee'}).justifyContent(FlexAlign.Start).width('100%').padding(5)
Row(){
Row(){
Image($r('app.media.trash_can')).width(16)
Text('删除').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3}).fontWeight(500)
}
Image($r('app.media.right_arrow')).width(16)
}.padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%').border({width: {bottom: 1}, color: '#eee'})
.visibility(this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)
.onClick(() => {
AlertDialog.show({
title: '分享签名提示',
message: `出于对多个甲方见证人签名的考虑,在甲方签名完成后,仍是"待甲方签名"的状态,需【维保公司账号】前往【更多操作】-->【完成】`,
title: '删除提示',
message: `维保原始记录一经删除,无法找回,确认删除${this.reportDetail?.reportName}(${this.reportDetail?.reportNo})的原始记录吗?`,
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
... ... @@ -172,320 +389,123 @@ struct DetailRecords {
style: DialogButtonStyle.HIGHLIGHT,
value: '确认',
action: async () => {
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', '')}`)
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', '')}`)
await deleteRecords({reportId, state: '2'})
router.back()
}
}
})
})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '1' || this.reportDetail?.state == '5' ? Visibility.Visible : Visibility.None)
Column({space: 5}){
Text('仪器设备').fontSize(12).fontColor('#999')
Text(this.reportDetail?.equipment || '').fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).alignItems(HorizontalAlign.Start).width('100%')
Row(){
Text('备注').fontSize(12).fontColor('#999').margin({right: 10})
HmParseHTML({
htmlStr: this.reportDetail?.result || '<p>无</p>',
baseFontSize: 12,
baseFontColor: '#999'
})
}.padding(10).justifyContent(FlexAlign.SpaceBetween)
}.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
// 主要消防措施
Column({space: 10}){
Row(){
Row(){
Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
Text('主要消防措施').fontSize(12).fontColor('#999')
}
Row(){
Image($r('app.media.edit_1')).width(12)
Text('查看记录').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
Image($r('app.media.right_arrow')).width(12)
}.onClick(() => {
if(personId !== '') {
router.pushUrl({
url: 'pages/LookRecords',
params: {
reportId: this.reportDetail?.reportId,
pid: personId
}
})
} else {
router.pushUrl({
url: 'pages/LookRecordCompany',
params: {
reportId: this.reportDetail?.reportId
}
})
}
})
}.justifyContent(FlexAlign.SpaceBetween).width('100%').margin({bottom: 10})
ForEach(this.projectList, (item: ProjectList, index) => {
Column({space: 5}){
Row(){
Row({space: 5}){
Text((index + 1).toString()).padding(10).borderRadius(5)
.backgroundColor(Color.Gray).fontSize('#666')
Text(item.projectName).fontSize(12).fontColor('#999')
}
Row(){
Text('查看视频/图片内容').fontSize(12).fontColor('#1890ff')
Image($r('app.media.right_arrow')).width(12)
}.visibility(this.isShowCloudDown && item.cosKey !== null ? Visibility.Visible : Visibility.None)
.onClick(() => {
router.pushUrl({
url: 'pages/VideoDetail',
params: {
cosKey: item.cosKey,
relateId: item.relateId
}
})
})
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
Row(){
Text(item.updateTime).fontSize(12).fontColor('#999')
Text(item.state == '0' ? '未编辑' : '已编辑')
.padding({left: 6, right: 6})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).fontColor(item.state == '0' ? '#ff4949' : '#13ce66')
.backgroundColor(item.state == '0' ? '#ffeded' : '#e7faf0').borderColor(item.state == '0' ? '#ffdbdb' : '#d0f5e0')
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
Row(){
Row(){
Image($r('app.media.photo')).width(12).margin({right: 4})
Text('上传视频/图片').fontSize(12).fontColor('#1890ff')
}.layoutWeight(1).justifyContent(FlexAlign.Center)
.visibility(this.isShowCloudDown ? Visibility.Visible : Visibility.None)
.onClick(async () => {
// 上传文件到腾讯云存储
try {
let key: string = item.cosKey == null ? '' : item.cosKey
let systemPhotoImagePath: string = await selectImgOrVideo() // 选择文件
this.loadingController.open()
await uploadFileByTask(key, item.relateId, systemPhotoImagePath)
this.loadingController.close()
} catch (error) {
let err: BusinessError = error as BusinessError;
console.error(`Invoke uploadFile failed, code is ${err.code}, message is ${err.message}`);
Image($r('app.media.finish')).width(16)
Text('完成').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
}
Image($r('app.media.right_arrow')).width(16)
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '5' && roleName == 'company' ? Visibility.Visible : Visibility.None)
.onClick(async () => {
AlertDialog.show({
title: '提示',
message: `完成签发后不可退回修改,确认完成吗`,
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
action: () => {
console.info('Callback when the first button is clicked')
}
},
secondaryButton: {
enabled: true,
defaultFocus: true,
style: DialogButtonStyle.HIGHLIGHT,
value: '确认',
action: async () => {
await successReport(reportId)
await deleteRecords({reportId, state: '1'})
promptAction.showToast({message: '修改完成'})
}
})
Text().width(2).height(16).backgroundColor('#eee').visibility(this.isShowCloudDown ? Visibility.Visible : Visibility.None)
Row(){
Image($r('app.media.edit_1')).width(12).margin({right: 4})
Text('编辑详情').fontSize(12).fontColor('#1890ff').onClick(() => {
router.pushUrl({
url: 'pages/FireProtectionDetail',
params: item
})
})
}.layoutWeight(1).justifyContent(FlexAlign.Center)
}.width('100%').padding({top: 5}).border({width: {top: 1}, color: '#eee'})
.visibility(item.state == '0' ? Visibility.Visible : Visibility.None)
}.padding({top: 10, left: 10, right: 10, bottom: 10}).borderWidth(1).borderColor('#eee').shadow({ radius: 5, color: Color.Gray }).borderRadius(5)
})
}.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
// 消防设施故障处理单
Column({space: 10}){
Row(){
Row(){
Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
Text('消防设施故障处理单').fontSize(12).fontColor('#999')
}
Row(){
Image($r('app.media.edit_1')).width(12)
Text('故障维修').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
Image($r('app.media.right_arrow')).width(12)
}.onClick(() => {
router.pushUrl({
url: 'pages/FailureMaintenance',
params: {
applyCompanyName: this.reportDetail?.applyCompanyName,
companyName: this.reportDetail?.companyName,
reportName: this.reportDetail?.reportName,
reportId: this.reportDetail?.reportId,
reportType: this.reportDetail?.reportType
}
})
})
.visibility(this.reportDetail?.state == '5' || this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)
}.justifyContent(FlexAlign.SpaceBetween).width('100%').margin({bottom: 10})
Column(){
Row(){
Text('发现时间:').fontSize(12).fontColor('#999')
Text(this.findTime).fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.Start).width('100%')
ForEach(this.malfunctionList, (malfunction: MalfunctionListRow, index: number) => {
Column({space: 4}){
Row({space: 10}){
Text((index + 1).toString()).width(30).height(30).backgroundColor(Color.Gray)
.borderWidth(1).borderColor('#eee').borderRadius(4).textAlign(TextAlign.Center)
Text(malfunction.malfunctionPart)
}.margin({bottom: 10})
Text(`故障情况及影响:${malfunction.malfunctionDes}`).fontSize(12).fontColor('#999')
Text(`采取的应急措施:${malfunction.security}`).fontSize(12).fontColor('#999')
Text(`更换设备及材料情况:${malfunction.maintenanceMethod}`).fontSize(12).fontColor('#999')
Text(`处理结果:${malfunction.malfunctionConfirm}`).fontSize(12).fontColor('#999')
Text(`备注:${malfunction.remark || '无'}`).fontSize(12).fontColor('#999')
}.border({width: {bottom: 1}, color: '#eee'}).width('100%')
.padding(10).alignItems(HorizontalAlign.Start)
})
Row(){
Text('维护保养单位意见:').fontSize(12).fontColor('#999')
Text(this.maintenanceComment).fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.padding(10).justifyContent(FlexAlign.Start).width('100%')
Row(){
Text('委托单位意见:').fontSize(12).fontColor('#999')
Text(this.applyCompanyComment).fontColor('#999').fontSize(12).margin({left: 3, right: 3})
}.padding(10).justifyContent(FlexAlign.Start).width('100%')
}.width('100%').alignItems(HorizontalAlign.Start)
.visibility(this.malfunctionList.length > 0 ? Visibility.Visible : Visibility.None)
Column(){
Image($r('app.media.emptyData')).width(100)
Text('暂无维修数据').fontSize(12).fontColor('#999').textAlign(TextAlign.Center).margin({top: 5})
}.visibility(this.malfunctionList.length == 0 ? Visibility.Visible : Visibility.None)
}.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
// 更多操作
Column(){
Row(){
Row(){
Text().width(3).height(16).backgroundColor('#1890ff').margin({right: 10})
Text('操作').fontSize(12).fontColor('#999')
}
}.border({width: {bottom: 1}, color: '#eee'}).justifyContent(FlexAlign.Start).width('100%').padding(5)
Row(){
Row(){
Image($r('app.media.trash_can')).width(16)
Text('删除').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3}).fontWeight(500)
}
Image($r('app.media.right_arrow')).width(16)
}.padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%').border({width: {bottom: 1}, color: '#eee'})
.visibility(this.reportDetail?.state == '1' ? Visibility.None : Visibility.Visible)
.onClick(() => {
AlertDialog.show({
title: '删除提示',
message: `维保原始记录一经删除,无法找回,确认删除${this.reportDetail?.reportName}(${this.reportDetail?.reportNo})的原始记录吗?`,
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
action: () => {
console.info('Callback when the first button is clicked')
}
},
secondaryButton: {
enabled: true,
defaultFocus: true,
style: DialogButtonStyle.HIGHLIGHT,
value: '确认',
action: async () => {
await deleteRecords({reportId, state: '2'})
router.back()
}
Row(){
Image($r('app.media.returnUpdate')).width(16)
Text('修改原始记录').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
}
Image($r('app.media.right_arrow')).width(16)
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '5' && roleName == 'company' ? Visibility.Visible : Visibility.None)
.onClick(async () => {
AlertDialog.show({
title: '重要提示',
message: `退回编辑会清除所有的维保人员签名和甲方签名,确认退回?`,
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
action: () => {
console.info('Callback when the first button is clicked')
}
},
secondaryButton: {
enabled: true,
defaultFocus: true,
style: DialogButtonStyle.HIGHLIGHT,
value: '确认',
action: async () => {
const res: AxiosResponse<configTest> = await returnSing(reportId)
promptAction.showToast({message: res.data.msg})
const detail: AxiosResponse<reportDetailTest> = await getReportDetail(reportId)
this.reportDetail = detail.data.data
}
}
})
})
})
Row(){
// Row(){
// Row(){
// Image($r('app.media.lookView')).width(16)
// Text('预览统计').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
// }
// Image($r('app.media.right_arrow')).width(16)
// }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
// .onClick(() => {
// pushOutsideWeb(`https://xfwbzs.crgx.net/report/preview?id=${reportId}`)
// })
Row(){
Image($r('app.media.finish')).width(16)
Text('完成').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
}
Image($r('app.media.right_arrow')).width(16)
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '5' && roleName == 'company' ? Visibility.Visible : Visibility.None)
.onClick(async () => {
AlertDialog.show({
title: '提示',
message: `完成签发后不可退回修改,确认完成吗`,
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
action: () => {
console.info('Callback when the first button is clicked')
}
},
secondaryButton: {
enabled: true,
defaultFocus: true,
style: DialogButtonStyle.HIGHLIGHT,
value: '确认',
action: async () => {
await successReport(reportId)
await deleteRecords({reportId, state: '1'})
promptAction.showToast({message: '修改完成'})
}
Row(){
Image($r('app.media.document')).width(16)
Text('自动报告').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
}
Image($r('app.media.right_arrow')).width(16)
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '1' ? Visibility.Visible : Visibility.None)
.onClick(() => {
pushOutsideWeb(`${basePath}/report/view?id=${reportId}`)
})
})
Row(){
Row(){
Image($r('app.media.returnUpdate')).width(16)
Text('修改原始记录').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
}
Image($r('app.media.right_arrow')).width(16)
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '5' && roleName == 'company' ? Visibility.Visible : Visibility.None)
.onClick(async () => {
AlertDialog.show({
title: '重要提示',
message: `退回编辑会清除所有的维保人员签名和甲方签名,确认退回?`,
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
action: () => {
console.info('Callback when the first button is clicked')
}
},
secondaryButton: {
enabled: true,
defaultFocus: true,
style: DialogButtonStyle.HIGHLIGHT,
value: '确认',
action: async () => {
const res: AxiosResponse<configTest> = await returnSing(reportId)
promptAction.showToast({message: res.data.msg})
const detail: AxiosResponse<reportDetailTest> = await getReportDetail(reportId)
this.reportDetail = detail.data.data
}
Row(){
Image($r('app.media.setting')).width(16)
Text('导出PDF').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
}
Image($r('app.media.right_arrow')).width(16)
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '1' ? Visibility.Visible : Visibility.None)
.onClick(() => {
pushOutsideWeb(`${basePath}/report/view?id=${reportId}`)
})
})
// Row(){
// Row(){
// Image($r('app.media.lookView')).width(16)
// Text('预览统计').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
// }
// Image($r('app.media.right_arrow')).width(16)
// }.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
// .onClick(() => {
// pushOutsideWeb(`https://xfwbzs.crgx.net/report/preview?id=${reportId}`)
// })
Row(){
Row(){
Image($r('app.media.document')).width(16)
Text('自动报告').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
}
Image($r('app.media.right_arrow')).width(16)
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '1' ? Visibility.Visible : Visibility.None)
.onClick(() => {
pushOutsideWeb(`${basePath}/report/view?id=${reportId}`)
})
Row(){
Row(){
Image($r('app.media.setting')).width(16)
Text('导出PDF').fontColor('#1890ff').fontSize(12).margin({left: 3, right: 3})
}
Image($r('app.media.right_arrow')).width(16)
}.border({width: {bottom: 1}, color: '#eee'}).padding(10).justifyContent(FlexAlign.SpaceBetween).width('100%')
.visibility(this.reportDetail?.state == '1' ? Visibility.Visible : Visibility.None)
.onClick(() => {
pushOutsideWeb(`${basePath}/report/view?id=${reportId}`)
})
}.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
}.width('100%')
}.height('100%').backgroundColor('#f2f3f7').padding(10)
}.backgroundColor('#fff').borderRadius(10).padding(10).width('100%')
}.width('100%')
}.backgroundColor('#f2f3f7').padding(10)
}.height('100%').backgroundColor('#f2f3f7').padding( {bottom: 20})
}
pageTransition() {
// 该页面进入动画时长为1000ms,尽量与另一页面的退出动画时长匹配
PageTransitionEnter({ duration: 500 })
.slide(SlideEffect.Left).opacity(0)
// 该页面退出动画时长为1200ms,尽量与另一页面的进入动画时长匹配
PageTransitionExit({ duration: 500 })
.translate({ x: 150.0 })
.opacity(0)
}
}
\ No newline at end of file
... ...
... ... @@ -9,7 +9,7 @@ import { AxiosResponse } from '@ohos/axios'
import PhotoBrowser from '../dialog/PhotoBrowserDialog'
import { uploadFile, uploadResult } from '../utils/uploadFile'
import { request } from '@kit.BasicServicesKit'
import NavHeader from '../components/NavHeader'
@Entry
@Component
struct EditUser {
... ... @@ -43,6 +43,7 @@ struct EditUser {
build() {
Column(){
NavHeader({title: '修改企业信息'})
Column(){
Column(){
Row(){
... ...
... ... @@ -9,6 +9,8 @@ import { AxiosResponse } from '@ohos/axios'
import PhotoBrowser from '../dialog/PhotoBrowserDialog'
import { uploadFile, uploadResult } from '../utils/uploadFile'
import { request } from '@kit.BasicServicesKit'
import NavHeader from '../components/NavHeader'
@Entry
@Component
... ... @@ -43,6 +45,7 @@ struct EditUser {
}
build() {
Column(){
NavHeader({title: '编辑个人信息'})
Scroll(){
Column(){
Column(){
... ...
... ... @@ -4,6 +4,8 @@ import { MalfunctionListTest, MalfunctionListRow } from '../api/recordsType'
import { AxiosResponse } from '@ohos/axios'
import ThemeStaticTest from '../components/ThemeStaticText'
import ImportRecordDialog from '../dialog/ImportRecordsDialog'
import NavHeader from '../components/NavHeader'
interface routerParams {
applyCompanyName: string
companyName: string
... ... @@ -60,13 +62,14 @@ struct FailureMaintenance {
malfunctionPart: "",
remark: '',
security: "",
malfunctionId: 0,
reportId: routerQuery.reportId
}
]
@State malfunctionId: number = 0
@State findTime: string | null |undefined = ''
@State maintenanceComment: string | null |undefined = ''
@State applyCompanyComment: string | null |undefined = ''
@State maintenanceComment: string = ''
@State applyCompanyComment: string = ''
ImportController: CustomDialogController = new CustomDialogController({
builder: ImportRecordDialog({
applyCompanyName: routerQuery.applyCompanyName,
... ... @@ -77,8 +80,8 @@ struct FailureMaintenance {
this.malfunctionList = malfunction.data.rows
}
this.findTime = this.malfunctionList[0]?.findTime
this.maintenanceComment = this.malfunctionList[0]?.maintenanceComment
this.applyCompanyComment = this.malfunctionList[0]?.applyCompanyComment
this.maintenanceComment = this.malfunctionList[0]?.maintenanceComment as string
this.applyCompanyComment = this.malfunctionList[0]?.applyCompanyComment as string
}
}),
customStyle: true,
... ... @@ -91,13 +94,15 @@ struct FailureMaintenance {
const malfunction: AxiosResponse<MalfunctionListTest> = await getMalfunctionList({ pageNum: 1, pageSize: 500, reportId: routerQuery?.reportId })
if(malfunction.data.rows.length !== 0) {
this.malfunctionList = malfunction.data.rows
console.log('故障列表' + JSON.stringify(this.malfunctionList))
}
this.findTime = this.malfunctionList[0]?.findTime
this.maintenanceComment = this.malfunctionList[0]?.maintenanceComment
this.applyCompanyComment = this.malfunctionList[0]?.applyCompanyComment
this.maintenanceComment = this.malfunctionList[0]?.maintenanceComment as string
this.applyCompanyComment = this.malfunctionList[0]?.applyCompanyComment as string
}
build() {
Column(){
NavHeader({title: '故障维修'})
Column(){
Column(){
// 基本信息
... ... @@ -154,7 +159,8 @@ struct FailureMaintenance {
malfunctionConfirm: '',
remark: '',
reportId: routerQuery.reportId,
security: ''
security: '',
malfunctionId: this.malfunctionId + 1
}
this.malfunctionList.push(Malfunction)
promptAction.showToast({
... ... @@ -168,7 +174,7 @@ struct FailureMaintenance {
promptAction.showToast({message: '至少保留一个'})
} else {
this.malfunctionList = this.malfunctionList.filter((children: MalfunctionListRow) => children.malfunctionId !== item.malfunctionId )
this.malfunctionList[0].findTime = this.findTime
this.malfunctionList[0].findTime = this.findTime as string
this.malfunctionList[0].maintenanceComment = this.maintenanceComment
this.malfunctionList[0].applyCompanyComment = this.applyCompanyComment
}
... ...
... ... @@ -30,7 +30,7 @@ struct Index {
async aboutToAppear() {
const noticeRes: AxiosResponse<noticeDetailTest> = await getNoticeDetail(13)
this.noticeInfo = noticeRes.data.data
if (preferencesUtil.get('XF_TOKEN', '')) {
if (this.noticeInfo.noticeContent !== '') {
this.dialogController.open()
}
}
... ...
... ... @@ -4,8 +4,10 @@ import { login, getPersonInfo, getInfo, getCompanyInfo } from '../api/user'
import { router, promptAction } from '@kit.ArkUI'
import SelectRegDialog from '../dialog/SelectRegTypeDialog'
import preferencesUtil from '../utils/preferences'
let account: string = preferencesUtil.get('XF_ACCOUNT', '') as string || ''
let password: string = preferencesUtil.get('XF_PASSWORD', '') as string || ''
@Entry
@Component
struct Login {
... ... @@ -17,7 +19,7 @@ struct Login {
@State agreeSelect: boolean = false
// 记住密码
@State rememberSelect: boolean = preferencesUtil.get('XF_REMEMBER', false) as boolean
aboutToAppear(): void {
async aboutToAppear() {
if(this.rememberSelect) {
this.loginForm.username = account
this.loginForm.password = password
... ... @@ -28,7 +30,7 @@ struct Login {
})
}
}
// 选择注册方式弹窗
selectRegController: CustomDialogController = new CustomDialogController({
builder: SelectRegDialog(),
alignment: DialogAlignment.Bottom
... ... @@ -39,7 +41,7 @@ struct Login {
Column({space: 20}){
Image($r('app.media.logo')).width(100).borderRadius(22)
Text('消防维保助手').fontSize(30).fontWeight(500).fontColor('#fff')
}.margin({top: 30, bottom: 50})
}.margin({top: 50, bottom: 50})
Column(){
Row(){
... ... @@ -99,6 +101,7 @@ struct Login {
.onChange((value: boolean) => {
this.rememberSelect = value
preferencesUtil.set('XF_REMEMBER', value)
// 记住密码
if(value) {
preferencesUtil.set('XF_ACCOUNT', this.loginForm.username)
preferencesUtil.set('XF_PASSWORD', this.loginForm.password)
... ... @@ -128,10 +131,11 @@ struct Login {
}
const res: AxiosResponse<loginType> = await login(this.loginForm)
const token = res.data.token
await preferencesUtil.set('XF_TOKEN', token)
preferencesUtil.set('XF_TOKEN', token)
const accountInfo: AxiosResponse<InfoTest> = await getInfo()
let roleName: string = accountInfo.data.roles[0] || ''
await preferencesUtil.set('XF_ROLE_NAME', roleName)
preferencesUtil.set('XF_ROLE_NAME', roleName)
// 根据角色存储不同的数据
if(roleName == 'person'){
let personInfo: AxiosResponse<personTest> = await getPersonInfo()
preferencesUtil.set('XF_PERSON_INFO', JSON.stringify(personInfo.data.data))
... ... @@ -195,6 +199,6 @@ struct Login {
.textAlign(TextAlign.Center)
}.width('100%').height('100%').backgroundImage($r('app.media.login_back'))
.backgroundImageSize({width: '100%'})
.expandSafeArea([SafeAreaType.SYSTEM])
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
}
}
\ No newline at end of file
... ...
... ... @@ -150,7 +150,10 @@ struct MaintenanceRecords {
Column(){
// 顶部搜索
Row(){
Search({ value: $$this.params.reportName, placeholder: '请输入【原始记录名称】' })
Image($r('app.media.back_light')).width(20).onClick(() => {
router.back()
})
Search({ value: $$this.params.reportName, placeholder: '请输入【项目名称】' })
.searchButton('搜索', {
fontSize: 12
})
... ... @@ -260,4 +263,12 @@ struct MaintenanceRecords {
})
}.width('100%').height('100%')
}
pageTransition() {
// 该页面退出动画时长为1200ms,尽量与另一页面的进入动画时长匹配
PageTransitionExit({ duration: 500 })
.translate({ x: 150.0 })
.opacity(0)
}
}
... ...
... ... @@ -11,7 +11,6 @@ import FilterOrderDialog from '../dialog/FilterOrderDialog'
import FilterRecordDialog from '../dialog/FilterRecordDialog'
let companyId = preferencesUtils.get('XF_COMPANY_ID', '') as number
@Entry
@Component
... ... @@ -144,6 +143,9 @@ struct MyWallet {
Column(){
// 顶部搜索
Row(){
Image($r('app.media.back_light')).width(20).onClick(() => {
router.back()
})
Search({ placeholder: this.searchTip, value: $$this.searchKey })
.searchButton('搜索', {
fontSize: 12
... ...
... ... @@ -2,6 +2,7 @@ import { router } from '@kit.ArkUI'
import { AxiosResponse } from '@ohos/axios'
import { getNoticeDetail, noticeDetailTest, noticeRow } from '../api/notice'
import {HmParseHTML} from "@wuyan/html_parse"
import NavHeader from '../components/NavHeader'
interface routerParams {
id: number
}
... ... @@ -20,6 +21,7 @@ struct NoticeDetail {
build() {
Scroll(){
Column({space: 10}){
NavHeader({title: '公告详情'})
Text(this.noticeDetail?.noticeTitle).fontSize(24).fontWeight(700)
Text(this.noticeDetail?.createTime).fontSize(12).fontColor('#999')
HmParseHTML({
... ...
... ... @@ -83,6 +83,9 @@ struct NoticeList {
// 顶部搜索
// 顶部搜索
Row(){
Image($r('app.media.back_light')).width(20).onClick(() => {
router.back()
})
Search({ value: $$this.params.noticeTitle, placeholder: '请输入公告标题' })
.searchButton('搜索', {
fontSize: 12
... ...
import { webview } from '@kit.ArkWeb';
import NavHeader from '../components/NavHeader'
@Entry
@Component
struct WebComponent {
controller: webview.WebviewController = new webview.WebviewController();
build() {
Column() {
NavHeader({title: '操作手册'})
Web({ src: 'https://doc.crgx.net/xf-app/function.html', controller: this.controller })
}
}.width('100%')
}
}
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@ import { personData, personTest } from '../api/userType'
import baseUrl from '../utils/baseUrl'
import { router } from '@kit.ArkUI';
import { AxiosResponse } from '@ohos/axios'
import NavHeader from '../components/NavHeader'
import { getPersonDetail } from '../api/user'
interface routerQuery {
personId: number
... ... @@ -70,6 +70,7 @@ struct EditUser {
}
build() {
Column(){
NavHeader({title: '个人信息'})
Column(){
Column(){
Row(){
... ...
... ... @@ -119,6 +119,9 @@ struct PersonList {
Column(){
// 顶部搜索
Row(){
Image($r('app.media.back_light')).width(20).onClick(() => {
router.back()
})
Search({ value: $$this.params.personName, placeholder: '请输入人员姓名' })
.searchButton('搜索', {
fontSize: 12
... ...
... ... @@ -3,7 +3,7 @@ import preferencesUtils from '../utils/preferences'
import { getCompanyWallet, getBean , getComboList, beanType } from '../api/user'
import { promptAction } from '@kit.ArkUI';
import { AxiosResponse } from '@ohos/axios'
import NavHeader from '../components/NavHeader'
let companyId = preferencesUtils.get('XF_COMPANY_ID', '') as number
@Entry
... ... @@ -39,6 +39,7 @@ struct EditUser {
}
build() {
Column(){
NavHeader({title: '充值'})
Column(){
Column(){
Row(){
... ...
... ... @@ -9,6 +9,8 @@ import { AxiosResponse } from '@ohos/axios'
import { uploadFile, uploadResult } from '../utils/uploadFile'
import { uploadDocFile } from '../utils/uploadDocmentFile'
import { request } from '@kit.BasicServicesKit'
import NavHeader from '../components/NavHeader'
@Entry
@Component
... ... @@ -86,6 +88,7 @@ struct UserRegister {
}
build() {
Column(){
NavHeader({title: '注册'})
Scroll(){
Column(){
Column(){
... ...
import { CSJSplashAd } from '@csj/openadsdk';
import { NodeController, window } from '@kit.ArkUI';
@Entry({
routeName: "GMSplashAdShowPage",
storage: LocalStorage.getShared()
})
@Component
export struct SplashAdShowPage {
@LocalStorageLink('GMSplashAd') splashAd: CSJSplashAd | undefined = undefined
@LocalStorageLink('GMSplashSubWindow') _window: window.Window | undefined = undefined
@LocalStorageProp('GMSplashCustomCloseBtn') splashCustomCloseBtn: boolean = false
@State splashAdComponent: NodeController | undefined = undefined
aboutToAppear(): void {
this.splashAdComponent = this.splashAd?.getAdComponent(this.splashCustomCloseBtn, this._window)
}
onPageShow(): void {
this._window?.setWindowLayoutFullScreen(true)
}
onPageHide(): void {
this._window?.setWindowLayoutFullScreen(false)
}
build() {
Stack() {
if (this.splashAdComponent) {
NodeContainer(this.splashAdComponent)
}
if (this.splashCustomCloseBtn) {
Text('close')
.textAlign(TextAlign.Center)
.backgroundColor(Color.Yellow)
.width(60)
.height(60)
.borderRadius(30)
.margin({ left: 50, top: 50 })
.onClick(() => {
this.closeBtnClicked()
})
}
}
.alignContent(Alignment.TopStart)
}
closeBtnClicked() {
this._window?.destroyWindow()
}
}
\ No newline at end of file
... ...
@Entry
@Component
struct SplashFullScreenAdPage {
@State message: string = 'Hello World';
build() {
RelativeContainer() {
Text(this.message)
.id('SplashFullScreenAdPageHelloWorld')
.fontSize(50)
.fontWeight(FontWeight.Bold)
.alignRules({
center: { anchor: '__container__', align: VerticalAlign.Center },
middle: { anchor: '__container__', align: HorizontalAlign.Center }
})
}
.height('100%')
.width('100%')
}
}
\ No newline at end of file
import { Prompt, router } from '@kit.ArkUI';
import { advertising, AdComponent } from '@kit.AdsKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
@Entry
@Component
export struct SplashHalfScreenAdPage {
private ads: Array<advertising.Advertisement> = [];
private displayOptions?: advertising.AdDisplayOptions;
aboutToAppear() {
hilog.info(0x0000, 'testTag', '%{public}s', 'Start to splashHalfScreenAdPage aboutToAppear');
const params: Record<string, Object> = router.getParams() as Record<string, Object>;
if (params && params.ads as Array<advertising.Advertisement> &&
params.displayOptions as advertising.AdDisplayOptions) {
this.ads = params.ads as Array<advertising.Advertisement>;
this.displayOptions = params.displayOptions as advertising.AdDisplayOptions;
} else {
hilog.info(0x0000, 'testTag', '%{public}s', 'Router params are empty');
}
}
build() {
Column() {
// 运行在提供方进程里
AdComponent({
ads: this.ads, displayOptions: this.displayOptions,
interactionListener: {
onStatusChanged: (status: string, ad: advertising.Advertisement, data: string) => {
switch (status) {
case AdStatus.AD_OPEN:
hilog.info(0x0000, 'testTag', '%{public}s', 'Status is onAdOpen');
Prompt.showToast({
message: 'splash ad open',
duration: 1000
});
break;
case AdStatus.AD_CLICKED:
hilog.info(0x0000, 'testTag', '%{public}s', 'Status is onAdClick');
Prompt.showToast({
message: 'splash ad click',
duration: 1000
});
break;
case AdStatus.AD_CLOSED:
hilog.info(0x0000, 'testTag', '%{public}s', 'Status is onAdClose');
Prompt.showToast({
message: 'splash ad close',
duration: 1000
});
router.replaceUrl({
url: 'pages/Index',
})
break;
}
}
}
})
.width('100%')
.height('87%')
// 展示媒体自定义icon、应用名称、版权信息
Column({}) {
Row() {
Image($r('app.media.logo')).width(24).height(24).margin({ right: 8 })
Text($r('app.string.video')).fontColor('#1A1A1A').fontSize(16).width(32).height(21)
}.margin({ bottom: 8 })
Column() {
Text('123').fontColor('#1A1A1A').fontSize(9).height(15)
}
}.width('100%').height('100%')
}
}
}
export enum AdStatus {
AD_OPEN = 'onAdOpen',
AD_CLICKED = 'onAdClick',
AD_CLOSED = 'onAdClose'
}
\ No newline at end of file
import { window, promptAction, router } from '@kit.ArkUI';
import {
CSJAdSdk,
SDKConfigBuilder,
SDKConfig,
MediationConfigBuilder
} from '@csj/openadsdk';
// 创建SDKConfig对象
let adConfigBuilder = new SDKConfigBuilder()
let config: SDKConfig = adConfigBuilder
.appId("5669833")
.appName("消防维保助手")
.allowShowNotify(true)
.debug(true)
.setMediationConfig(new MediationConfigBuilder().useMediation(true).build())
.setThemeStatus(0)
.build()
@Entry
@Component
struct StartAd {
async aboutToAppear() {
// 初始化SDK
CSJAdSdk.init(getContext(this), config) //context类型必须为UIAbility,否则可能存在展示异常场景
// 启动SDK
const result = await CSJAdSdk.start()
if (result) {
if (result.code == 0 || result.code == 4200) {
router.pushUrl({ url: 'pages/AdMainPage' })
// this.loadOpenAd()
} else {
promptAction.showToast({ message: result.msg });
}
}
}
closeWin() {
const win = window.findWindow('startAd') // 找到子窗口
win.destroyWindow() // 销毁窗口
}
build() {
Column() {
Image($r('app.media.logo')).width(60).height(60)
}.width('100%').height('100%').justifyContent(FlexAlign.Center)
}
}
\ No newline at end of file
... ...
import { router, Prompt } from '@kit.ArkUI';
import { advertising, identifier } from '@kit.AdsKit';
import { common } from '@kit.AbilityKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
import { BusinessError } from '@kit.BasicServicesKit';
@Entry
@Component
export struct Index {
private context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext;
private oaid: string = '';
private isTimeOut: boolean = false;
// 超时时间(单位毫秒),开发者可根据实际情况修改
private timeOutDuration: number = 1 * 1000;
// 超时index
private timeOutIndex: number = -1;
// 广告展示参数
private adDisplayOptions: advertising.AdDisplayOptions = {
// 是否静音,默认不静音
mute: false
}
// 广告配置
private adOptions: advertising.AdOptions = {
// 是否允许流量下载0:不允许,1:允许,不设置以广告主设置为准
allowMobileTraffic: 0,
// 是否希望根据 COPPA 的规定将您的内容视为面向儿童的内容: -1默认值,不确定 0不希望 1希望
tagForChildProtection: -1,
// 是否希望按适合未达到法定承诺年龄的欧洲经济区 (EEA) 用户的方式处理该广告请求: -1默认值,不确定 0不希望 1希望
tagForUnderAgeOfPromise: -1,
// 设置广告内容分级上限: W: 3+,所有受众 PI: 7+,家长指导 J:12+,青少年 A: 16+/18+,成人受众
adContentClassification: 'A'
}
// 开屏视频广告请求参数
private splashVideoAdReqParams: advertising.AdRequestParams = {
// 'testd7c5cewoj6'为测试专用的广告位ID,App正式发布时需要改为正式的广告位ID
adId: 'testd7c5cewoj6',
adType: AdType.SPLASH_AD,
adCount: 1,
oaid: this.oaid
}
// 开屏图片广告请求参数
private splashImageAdReqParams: advertising.AdRequestParams = {
// 'testq6zq98hecj'为测试专用的广告位ID,App正式发布时需要改为正式的广告位ID
adId: 'testq6zq98hecj',
adType: AdType.SPLASH_AD,
adCount: 1,
oaid: this.oaid
}
aboutToAppear() {
hilog.info(0x0000, 'testTag', '%{public}s', 'Start to aboutToAppear');
try {
// 使用Promise回调方式获取OAID
identifier.getOAID().then((data: string) => {
this.oaid = data;
hilog.info(0x0000, 'testTag', '%{public}s', 'Succeeded in getting adsIdentifierInfo by promise');
}).catch((error: BusinessError) => {
hilog.error(0x0000, 'testTag', '%{public}s',
`Failed to get adsIdentifierInfo, code: ${error.code}, message: ${error.message}`);
})
} catch (error) {
hilog.error(0x0000, 'testTag', '%{public}s', `Catch err, code: ${error.code}, message: ${error.message}`);
}
}
build() {
Column() {
Column() {
// 跳转到开屏全屏视频广告展示页面
CustomButton({
mText: 'splash full screen request', mOnClick: () => {
this.requestAd(this.splashVideoAdReqParams, this.adOptions);
}
});
// 跳转到开屏半屏图片广告展示页面
CustomButton({
mText: 'splash half screen request', mOnClick: () => {
this.requestAd(this.splashImageAdReqParams, this.adOptions);
}
});
}.width('100%').height('80%').justifyContent(FlexAlign.Center)
}
.width('100%')
.height('100%')
}
private requestAd(adReqParams: advertising.AdRequestParams, adOptions: advertising.AdOptions): void {
// 广告请求回调监听
const adLoaderListener: advertising.AdLoadListener = {
// 广告请求失败回调
onAdLoadFailure: (errorCode: number, errorMsg: string) => {
clearTimeout(this.timeOutIndex);
if (this.isTimeOut) {
return;
}
hilog.error(0x0000, 'testTag', '%{public}s',
`Failed to request ad. errorCode is: ${errorCode}, errorMsg is: ${errorMsg}`);
Prompt.showToast({
message: `Failed to request ad, code is: ${errorCode} , errorMsg is: ${errorMsg}`,
duration: 1000
});
},
// 广告请求成功回调
onAdLoadSuccess: (ads: Array<advertising.Advertisement>) => {
clearTimeout(this.timeOutIndex);
if (this.isTimeOut) {
return;
}
hilog.info(0x0000, 'testTag', '%{public}s', 'Succeeded in requesting ad!');
// 保存请求到的广告内容用于展示
hilog.info(0x0000, 'testTag', '%{public}s', `ads[0].adType is : ${ads[0].adType}`);
if (canIUse("SystemCapability.Advertising.Ads")) {
if (ads[0].adType === AdType.SPLASH_AD) {
// 调用开屏广告展示页面
if (ads[0]?.isFullScreen === true) {
routePage('pages/SplashFullScreenAdPage', ads, this.adDisplayOptions);
} else {
routePage('pages/SplashHalfScreenAdPage', ads, this.adDisplayOptions);
}
} else {
hilog.error(0x0000, 'testTag', '%{public}s', 'Error adType');
}
}
}
};
// 创建AdLoader广告对象
const load: advertising.AdLoader = new advertising.AdLoader(this.context);
// 调用广告请求接口
hilog.info(0x0000, 'testTag', '%{public}s', 'Request ad!');
adReqParams.oaid = this.oaid;
this.timeOutHandler();
load.loadAd(adReqParams, adOptions, adLoaderListener);
}
private timeOutHandler(): void {
this.isTimeOut = false;
// 超时处理
this.timeOutIndex = setTimeout(() => {
this.isTimeOut = true;
const options: router.RouterOptions = {
// 开发者可根据项目实际情况修改超时之后要跳转的目标页面
url: 'pages/AdsServicePage',
};
router.pushUrl(options);
hilog.error(0x0000, 'testTag', '%{public}s', 'load ad time out');
}, this.timeOutDuration);
}
}
async function routePage(pageUri: string, ads: Array<advertising.Advertisement | null>,
displayOptions: advertising.AdDisplayOptions) {
let options: router.RouterOptions = {
url: pageUri,
params: {
ads: ads,
displayOptions: displayOptions
}
}
try {
hilog.info(0x0000, 'testTag', '%{public}s', `RoutePage: ${pageUri}`);
router.pushUrl(options);
} catch (error) {
hilog.error(0x0000, 'testTag', '%{public}s',
`Failed to routePage callback, code: ${error.code}, msg: ${error.message}`);
}
}
export enum AdType {
// 开屏广告的类型
SPLASH_AD = 1
}
@Component
export struct CustomButton {
private mText: string | Resource = '';
private mHeight: number = 40;
private mOnClick: (event?: ClickEvent) => void = (): void => {
};
build() {
Column() {
Button(this.mText)
.backgroundColor('#d3d4d6')
.fontSize(20)
.fontColor('#000')
.fontWeight(FontWeight.Normal)
.align(Alignment.Center)
.type(ButtonType.Capsule)
.width('90%')
.height(this.mHeight)
.margin({ top: 10, bottom: 5 })
.onClick(this.mOnClick);
}
}
}
\ No newline at end of file
import { webview } from '@kit.ArkWeb'
import { basePath } from '../utils/baseUrl'
import NavHeader from '../components/NavHeader'
@Entry
@Component
struct FireProtectionDetail {
webviewController: webview.WebviewController = new webview.WebviewController()
build() {
Column(){
NavHeader({title: '工具箱'})
Web({
src: `${basePath}/report/select`,
controller: this.webviewController,
... ...
... ... @@ -4,6 +4,7 @@ import { promptAction, router } from '@kit.ArkUI'
import { AxiosResponse } from '@ohos/axios'
import LoadingDialog from '../dialog/LoadingDialog'
import { ValidateInputHandle } from '../utils/validateInputHandle'
import NavHeader from '../components/NavHeader'
// xxx.ets
@Styles function itemStyle () {
.width('90%')
... ... @@ -45,96 +46,99 @@ struct UpdatePassword {
}
@State returnCode: string = ''
build() {
Stepper({
index: this.currentIndex
}) {
// 第一个步骤页
StepperItem() {
Column() {
Text('身份验证')
.itemTextStyle()
Row(){
Column(){
NavHeader({title: '重置密码'})
Stepper({
index: this.currentIndex
}) {
// 第一个步骤页
StepperItem() {
Column() {
Text('身份验证')
.itemTextStyle()
Row(){
Image($r('app.media.require')).width(20)
Text('邮箱')
}.width(90)
TextInput({placeholder: '请输入邮箱', text: $$this.updateForm.email})
.backgroundColor('#fff').layoutWeight(1).type(InputType.Email)
.showError(ValidateInputHandle(this.updateForm.email, 'email') ? '' : '请正确输入邮箱')
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('邮箱')
}.width(90)
TextInput({placeholder: '请输入邮箱', text: $$this.updateForm.email})
.backgroundColor('#fff').layoutWeight(1).type(InputType.Email)
.showError(ValidateInputHandle(this.updateForm.email, 'email') ? '' : '请正确输入邮箱')
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Image($r('app.media.require')).width(20)
Text('验证码')
}.width(90)
Row(){
TextInput({placeholder: '请输入验证码', text: $$this.updateForm.code})
.showError(this.updateForm.code == this.returnCode ? '' : '验证码不正确')
.backgroundColor('#fff').layoutWeight(1).onChange((value) => {
Row(){
Image($r('app.media.require')).width(20)
Text('验证码')
}.width(90)
Row(){
TextInput({placeholder: '请输入验证码', text: $$this.updateForm.code})
.showError(this.updateForm.code == this.returnCode ? '' : '验证码不正确')
.backgroundColor('#fff').layoutWeight(1).onChange((value) => {
if(value == this.returnCode){
this.firstState = ItemState.Normal
}
})
Text('获取验证码').fontSize(12).backgroundColor('#1890ff').borderRadius(5)
.padding({top: 4, bottom: 4, left: 10, right: 10}).fontColor('#fff')
.onClick(async () => {
if(this.updateForm.email == ''){
return promptAction.showToast({message: '请输入邮箱'})
}
this.loadingController.open()
const res: AxiosResponse<emailType> = await getEmailCode(this.updateForm.email)
this.returnCode = res.data.data
this.loadingController.close()
promptAction.showToast({
message: '已发送至邮箱,请查收'
})
})
}.layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
}.itemStyle()
}
.nextLabel('下一步')
.status(this.firstState)
// 第二个步骤页
StepperItem() {
Column() {
Text('重置密码')
.itemTextStyle()
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('新密码')
}.width(90)
TextInput({placeholder: '请输入新密码', text: $$this.updateForm.password})
.backgroundColor('#fff').layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('确认密码')
}.width(90)
Text('获取验证码').fontSize(12).backgroundColor('#1890ff').borderRadius(5)
.padding({top: 4, bottom: 4, left: 10, right: 10}).fontColor('#fff')
.onClick(async () => {
if(this.updateForm.email == ''){
return promptAction.showToast({message: '请输入邮箱'})
}
this.loadingController.open()
const res: AxiosResponse<emailType> = await getEmailCode(this.updateForm.email)
this.returnCode = res.data.data
this.loadingController.close()
promptAction.showToast({
message: '已发送至邮箱,请查收'
})
})
}.layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
}.itemStyle()
}
.nextLabel('下一步')
.status(this.firstState)
// 第二个步骤页
StepperItem() {
Column() {
Text('重置密码')
.itemTextStyle()
Row(){
TextInput({placeholder: '请确认密码', text: $$this.updateForm.againPassword})
Row(){
Image($r('app.media.require')).width(20)
Text('新密码')
}.width(90)
TextInput({placeholder: '请输入新密码', text: $$this.updateForm.password})
.backgroundColor('#fff').layoutWeight(1)
}.layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
}.itemStyle()
}
.nextLabel('完成')
.prevLabel('Previous')
.status(this.secondState)
}
.backgroundColor('#F1F3F5')
.onFinish( async() => {
if(this.updateForm.againPassword !== this.updateForm.password) {
return promptAction.showToast({message: '两次密码输入不一致'})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('确认密码')
}.width(90)
Row(){
TextInput({placeholder: '请确认密码', text: $$this.updateForm.againPassword})
.backgroundColor('#fff').layoutWeight(1)
}.layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
}.itemStyle()
}
.nextLabel('完成')
.prevLabel('Previous')
.status(this.secondState)
}
// 此处可处理点击最后一页的Finish时的逻辑,例如路由跳转等
await resetPassword(this.updateForm)
promptAction.showToast({message: '重置成功'})
router.replaceUrl({
url: 'pages/Login'
.layoutWeight(1)
.onFinish( async() => {
if(this.updateForm.againPassword !== this.updateForm.password) {
return promptAction.showToast({message: '两次密码输入不一致'})
}
// 此处可处理点击最后一页的Finish时的逻辑,例如路由跳转等
await resetPassword(this.updateForm)
promptAction.showToast({message: '重置成功'})
router.replaceUrl({
url: 'pages/Login'
})
})
})
}.backgroundColor('#F1F3F5')
}
}
\ No newline at end of file
... ...
import { webview } from '@kit.ArkWeb'
import NavHeader from '../components/NavHeader'
@Entry
@Component
struct FireProtectionDetail {
webviewController: webview.WebviewController = new webview.WebviewController()
build() {
Column(){
NavHeader({title: '用户协议'})
Web({
src: `https://doc.crgx.net/agreement.html`,
controller: this.webviewController,
... ...
... ... @@ -8,7 +8,7 @@ import { promptAction, router } from '@kit.ArkUI';
import { AxiosResponse } from '@ohos/axios'
import { uploadFile, uploadResult } from '../utils/uploadFile'
import { request } from '@kit.BasicServicesKit'
import NavHeader from '../components/NavHeader'
@Entry
@Component
struct UserRegister {
... ... @@ -74,6 +74,7 @@ struct UserRegister {
}
build() {
Column(){
NavHeader({title: '用户注册'})
Scroll(){
Column(){
Column(){
... ...
... ... @@ -3,7 +3,7 @@ import { AxiosResponse } from '@ohos/axios'
import { downFile } from '../utils/downFile'
import { router } from '@kit.ArkUI'
import PhotoBrowser from '../dialog/PhotoBrowserDialog'
import { uploadVideoOrImg } from '../api/cosKey'
import NavHeader from '../components/NavHeader'
interface routerParams {
cosKey: string
relateId: number
... ... @@ -48,78 +48,81 @@ struct DownLoadImage {
})
}
build() {
List(){
ListItem(){
Column({ space: 10 }) {
Row(){
Row({space: 5}){
Text().width(2).height(20).backgroundColor('#1890ff')
Text('图片').fontSize(14).fontWeight(600)
Column(){
NavHeader({title: '下载图片'})
List(){
ListItem(){
Column({ space: 10 }) {
Row(){
Row({space: 5}){
Text().width(2).height(20).backgroundColor('#1890ff')
Text('图片').fontSize(14).fontWeight(600)
}
Text('预览图片')
.fontSize(14).fontColor('#fff').backgroundColor('#1890ff')
.padding({left: 15, right: 15, top: 2, bottom: 2})
.borderRadius(4)
.onClick(() => {
this.photoBrowserController.open()
})
}
Text('预览图片')
.fontSize(14).fontColor('#fff').backgroundColor('#1890ff')
.padding({left: 15, right: 15, top: 2, bottom: 2})
.borderRadius(4)
.onClick(() => {
this.photoBrowserController.open()
.justifyContent(FlexAlign.SpaceBetween)
.width('100%')
GridRow({ columns: 2, gutter: 10 }) {
ForEach(this.viewImg, (item: string) => {
GridCol() {
Column({space: 10}){
Image(item)
.width('100%')
.height(150)
.borderRadius(4)
Row(){
SaveButton(this.saveButtonOptions)
// 创建安全控件按钮
.onClick(async (event, result: SaveButtonOnClickResult) => {
if (result == SaveButtonOnClickResult.SUCCESS) {
downFile(item, 'jpg')
}
})
}
}
}
})
}
}
.justifyContent(FlexAlign.SpaceBetween)
.width('100%')
GridRow({ columns: 2, gutter: 10 }) {
ForEach(this.viewImg, (item: string) => {
GridCol() {
Column({space: 10}){
Image(item)
.width('100%')
.height(150)
.borderRadius(4)
Row(){
}.visibility(this.viewImg.length == 0 ? Visibility.None : Visibility.Visible)
ListItem(){
Column({ space: 10 }) {
Row(){
Row({space: 5}){
Text().width(2).height(20).backgroundColor('#1890ff')
Text('视频').fontSize(14).fontWeight(600)
}
}
.justifyContent(FlexAlign.Start)
.width('100%')
GridRow({ columns: 1}) {
ForEach(this.viewVideo, (item: string) => {
GridCol() {
Column({ space: 10}){
Video({ src: item }).width('100%').height(300).controls(true)
SaveButton(this.saveButtonOptions)
// 创建安全控件按钮
.onClick(async (event, result: SaveButtonOnClickResult) => {
if (result == SaveButtonOnClickResult.SUCCESS) {
downFile(item, 'jpg')
downFile(item, 'mp4')
}
})
}
}
}
})
}
}
}.visibility(this.viewImg.length == 0 ? Visibility.None : Visibility.Visible)
ListItem(){
Column({ space: 10 }) {
Row(){
Row({space: 5}){
Text().width(2).height(20).backgroundColor('#1890ff')
Text('视频').fontSize(14).fontWeight(600)
}
}
.justifyContent(FlexAlign.Start)
.width('100%')
GridRow({ columns: 1}) {
ForEach(this.viewVideo, (item: string) => {
GridCol() {
Column({ space: 10}){
Video({ src: item }).width('100%').height(300).controls(true)
SaveButton(this.saveButtonOptions)
// 创建安全控件按钮
.onClick(async (event, result: SaveButtonOnClickResult) => {
if (result == SaveButtonOnClickResult.SUCCESS) {
downFile(item, 'mp4')
}
})
}
}
.margin({
top: 10
.margin({
top: 10
})
})
})
}
}
}
}.visibility(this.viewVideo.length == 0 ? Visibility.None : Visibility.Visible)
}.padding(10)
}.visibility(this.viewVideo.length == 0 ? Visibility.None : Visibility.Visible)
}.padding(10)
}
}
}
... ...
export default 'https://xfwbzshd.crgx.net'
export const basePath = 'https://xfwbzs.crgx.net'
\ No newline at end of file
// export default 'https://xfwbzshd.crgx.net'
// 后端域名
export default 'https://xfappht.crgx.net'
// 前端地址
export const basePath = 'https://xfwbzs.crgx.net'
... ...
<?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>
\ No newline at end of file
... ...
... ... @@ -29,8 +29,8 @@
"pages/ToolBox",
"pages/LookRecordCompany",
"pages/ViewFile",
"pages/StartPage",
"pages/SplashFullScreenAdPage",
"pages/SplashHalfScreenAdPage"
"pages/StartAd",
"pages/AdMainPage",
"pages/SplashAdShowPage"
]
}
\ No newline at end of file
... ...
... ... @@ -5,13 +5,105 @@
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@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",
"@csj/adapter_gdt@^1.0.0-2": "@csj/adapter_gdt@1.0.0-2",
"@csj/adapter_ks@^2.0.3-beta-2": "@csj/adapter_ks@2.0.3-beta-2",
"@csj/openadsdk@6.7.0": "@csj/openadsdk@6.7.0",
"@csj/openadsdk@^6.7.0": "@csj/openadsdk@6.7.0",
"@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",
"@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",
"@gdt/gdt-union-sdk@entry/libs/GDTUnionSDK-default-release.har": "@gdt/gdt-union-sdk@entry/libs/GDTUnionSDK-default-release.har",
"@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",
"@ohasasugar/hp-richtext@^3.0.4": "@ohasasugar/hp-richtext@3.0.4",
"@ohos/axios@^2.2.4": "@ohos/axios@2.2.4",
"@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0",
"@ohos/hypium@1.0.19": "@ohos/hypium@1.0.19",
"@wuyan/html_parse@^1.0.7": "@wuyan/html_parse@1.0.7"
"@ohos/lottie@^2.0.9": "@ohos/lottie@2.0.16",
"@wuyan/html_parse@^1.0.7": "@wuyan/html_parse@1.0.7",
"ksadsdk@entry/libs/KSAdSDK.har": "ksadsdk@entry/libs/KSAdSDK.har",
"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",
"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",
"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",
"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",
"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"
},
"packages": {
"@bdms/bdmssdk_pgl@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/bdmssdk.har": {
"name": "@bdms/bdmssdk_pgl",
"version": "8.0.13",
"resolved": "oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/bdmssdk.har",
"registryType": "local",
"dependencies": {
"libbdmssdk.so": "file:./src/main/cpp/types/libbdmssdk"
}
},
"@csj/adapter_gdt@1.0.0-2": {
"name": "@csj/adapter_gdt",
"version": "1.0.0-2",
"integrity": "sha512-44DHPdek83HX2OiSgsUaiMWoYxEcRxs-3E7PQtEx3z7h_fr1dzfIb5eV_cOkcLoqnOTm6ptv7M4z6nGFnDgZ3Q==",
"resolved": "http://artifact.bytedance.com/repository/byted-ohpm/@csj/adapter_gdt/-/adapter_gdt-1.0.0-2.har",
"registryType": "ohpm",
"dependencies": {
"@csj/openadsdk": "6.7.0"
}
},
"@csj/adapter_ks@2.0.3-beta-2": {
"name": "@csj/adapter_ks",
"version": "2.0.3-beta-2",
"integrity": "sha512-T5IkTcfAKAfM1b8ZKah52ow1I6oqeUBTq_uobNEI4DxAaV57gsSIrekklvJvMvpRDM5TLpmOaY-YqK_C5SyQDQ==",
"resolved": "http://artifact.bytedance.com/repository/byted-ohpm/@csj/adapter_ks/-/adapter_ks-2.0.3-beta-2.har",
"registryType": "ohpm",
"dependencies": {
"@csj/openadsdk": "6.7.0"
}
},
"@csj/openadsdk@6.7.0": {
"name": "@csj/openadsdk",
"version": "6.7.0",
"integrity": "sha512-KecBLYuy1wbEbpvMpjDGjwqf3ExtqQayo0iD6nxg3TZqAkVjY-YkFjRf0J3oS2EEJIGUBXTa4CiNaZKYfNmWxw==",
"resolved": "http://artifact.bytedance.com/repository/byted-ohpm/@csj/openadsdk/-/openadsdk-6.7.0.har",
"registryType": "ohpm",
"dependencies": {
"@csj/panglearmor": "file:harlib/panglearmor.har",
"@bdms/bdmssdk_pgl": "file:harlib/bdmssdk.har",
"@hpem/apmplus_crash_lite": "file:./harlib/apm.har",
"@dp/applog": "file:./harlib/applog.har",
"@ohos/lottie": "^2.0.9"
}
},
"@csj/panglearmor@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/panglearmor.har": {
"name": "@csj/panglearmor",
"version": "1.0.2",
"resolved": "oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/panglearmor.har",
"registryType": "local",
"dependencies": {
"libpanglearmor.so": "file:./src/main/cpp/types/libpanglearmor"
}
},
"@dp/applog@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/applog.har": {
"name": "@dp/applog",
"version": "1.1.0",
"resolved": "oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/applog.har",
"registryType": "local",
"dependencies": {
"libapplogrs.so": "file:./src/main/ets/types/libapplogrs"
}
},
"@gdt/gdt-union-sdk@entry/libs/GDTUnionSDK-default-release.har": {
"name": "@gdt/gdt-union-sdk",
"version": "1.0.0",
"resolved": "entry/libs/GDTUnionSDK-default-release.har",
"registryType": "local",
"dependencies": {
"libgdtunionsdk.so": "file:./src/main/cpp/types/libgdtunionsdk"
}
},
"@hpem/apmplus_crash_lite@oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/apm.har": {
"name": "@hpem/apmplus_crash_lite",
"version": "2.0.7",
"resolved": "oh_modules/.ohpm/@csj+openadsdk@6.7.0/oh_modules/@csj/openadsdk/harlib/apm.har",
"registryType": "local"
},
"@ohasasugar/hp-richtext@3.0.4": {
"name": "@ohasasugar/hp-richtext",
"version": "3.0.4",
... ... @@ -40,12 +132,58 @@
"resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.19.har",
"registryType": "ohpm"
},
"@ohos/lottie@2.0.16": {
"name": "@ohos/lottie",
"version": "2.0.16",
"integrity": "sha512-1A7sbWSzbrrH1TV37J9AH6peNMNU5xylO3+TvXGveOy591KOE45WGhR2+SMQcEPSb+KVXAHtekoC9A4PS9pK1w==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/lottie/-/lottie-2.0.16.har",
"registryType": "ohpm"
},
"@wuyan/html_parse@1.0.7": {
"name": "@wuyan/html_parse",
"version": "1.0.7",
"integrity": "sha512-HT1vqQh2LyIbFVOS914MpNTGSobHcBYbxvhgsBEU8PEV8UML5UwHnrBqYFhYlv62s8lgBV4B6ZEoFZXngdwMWQ==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@wuyan/html_parse/-/html_parse-1.0.7.har",
"registryType": "ohpm"
},
"ksadsdk@entry/libs/KSAdSDK.har": {
"name": "ksadsdk",
"version": "2.0.3-beta",
"resolved": "entry/libs/KSAdSDK.har",
"registryType": "local",
"dependencies": {
"libksadsdk.so": "file:./src/main/cpp/types/libksadsdk"
}
},
"libapplogrs.so@oh_modules/.ohpm/@dp+applog@+e6gtiy4h3epopwj9muptqswanljuqcdrohmi055hmq=/oh_modules/@dp/applog/src/main/ets/types/libapplogrs": {
"name": "libapplogrs.so",
"version": "0.0.0",
"resolved": "oh_modules/.ohpm/@dp+applog@+e6gtiy4h3epopwj9muptqswanljuqcdrohmi055hmq=/oh_modules/@dp/applog/src/main/ets/types/libapplogrs",
"registryType": "local"
},
"libbdmssdk.so@oh_modules/.ohpm/@bdms+bdmssdk_pgl@uj8yipotnt2kw6duljuflmytrqjyvr8n+3zwgb2vucm=/oh_modules/@bdms/bdmssdk_pgl/src/main/cpp/types/libbdmssdk": {
"name": "libbdmssdk.so",
"version": "0.0.0",
"resolved": "oh_modules/.ohpm/@bdms+bdmssdk_pgl@uj8yipotnt2kw6duljuflmytrqjyvr8n+3zwgb2vucm=/oh_modules/@bdms/bdmssdk_pgl/src/main/cpp/types/libbdmssdk",
"registryType": "local"
},
"libgdtunionsdk.so@oh_modules/.ohpm/@gdt+gdt-union-sdk@b5jdbuym1iad3fajvkonrnxtqyf6hyyu738leyst8vi=/oh_modules/@gdt/gdt-union-sdk/src/main/cpp/types/libgdtunionsdk": {
"name": "libgdtunionsdk.so",
"version": "1.0.0",
"resolved": "oh_modules/.ohpm/@gdt+gdt-union-sdk@b5jdbuym1iad3fajvkonrnxtqyf6hyyu738leyst8vi=/oh_modules/@gdt/gdt-union-sdk/src/main/cpp/types/libgdtunionsdk",
"registryType": "local"
},
"libksadsdk.so@oh_modules/.ohpm/ksadsdk@6melecmoydimfn9fu+zsmjlvqd2bit1oaxtxm8ycnsa=/oh_modules/ksadsdk/src/main/cpp/types/libksadsdk": {
"name": "libksadsdk.so",
"version": "0.0.0",
"resolved": "oh_modules/.ohpm/ksadsdk@6melecmoydimfn9fu+zsmjlvqd2bit1oaxtxm8ycnsa=/oh_modules/ksadsdk/src/main/cpp/types/libksadsdk",
"registryType": "local"
},
"libpanglearmor.so@oh_modules/.ohpm/@csj+panglearmor@cksmdebfkaayuazinfq2bjsbl2liolozgz0idliqkoi=/oh_modules/@csj/panglearmor/src/main/cpp/types/libpanglearmor": {
"name": "libpanglearmor.so",
"version": "0.0.0",
"resolved": "oh_modules/.ohpm/@csj+panglearmor@cksmdebfkaayuazinfq2bjsbl2liolozgz0idliqkoi=/oh_modules/@csj/panglearmor/src/main/cpp/types/libpanglearmor",
"registryType": "local"
}
}
}
\ No newline at end of file
... ...
... ... @@ -4,7 +4,12 @@
"dependencies": {
"@ohos/axios": "^2.2.4",
"@ohasasugar/hp-richtext": "^3.0.4",
"@wuyan/html_parse": "^1.0.7"
"@wuyan/html_parse": "^1.0.7",
"@csj/openadsdk": "^6.7.0",
"@csj/adapter_gdt": "^1.0.0-2",
"@csj/adapter_ks": "^2.0.3-beta-2",
"ksadsdk": "file:./entry/libs/KSAdSDK.har",
"@gdt/gdt-union-sdk": "file:./entry/libs/GDTUnionSDK-default-release.har"
},
"devDependencies": {
"@ohos/hypium": "1.0.19",
... ...