Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jump_hm_warehouse
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
毛勇泽
jump_hm_warehouse
Commits
5b494d1c
Commit
5b494d1c
authored
Jan 16, 2024
by
毛勇泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置系统信息
parent
2bd482fa
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
280 行增加
和
1 行删除
+280
-1
DeviceInfoPage.ets
entry/src/main/ets/pages/sub_systemMaintenance/DeviceInfoPage.ets
+90
-0
UniInitList.ets
features/SystemMaintenance/src/main/ets/model/UniInitList.ets
+190
-1
没有找到文件。
entry/src/main/ets/pages/sub_systemMaintenance/DeviceInfoPage.ets
0 → 100644
View file @
5b494d1c
import {
deviceEnum,
getDeviceList,
getSystemList,
getDeveloperList,
getotherList,
UniListItem
} from '@ohos/system/src/main/ets/model/UniInitList'
import { TitleBar } from '../../view/title/TitleBar'
@Entry
@Component
struct DeviceInfoPage {
getListInfo(index:number):UniListItem[]{
switch (index){
case 0:
return getDeviceList
break;
case 1:
return getSystemList
break;
case 2:
return getDeveloperList
break;
case 3:
return getotherList
break;
}
}
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "设备系统信息" })
Divider()
.strokeWidth(2)
.color($r("app.color.white"))
.width("100%")
List({ space: 2 }) {
ForEach(deviceEnum, (item, index) => {
ListItem() {
Column() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center }) {
Text(item)
.fontSize(20)
.fontColor($r("app.color.title_background"))
.height(40)
.width("100%")
.textAlign(TextAlign.Center)
Divider()
.strokeWidth(2)
.color($r("app.color.title_background"))
.width("100%")
}.padding({top:30,bottom:30,right:35,left:35})
.width("100%")
Column() {
List() {
ForEach(this.getListInfo(index), (deviceItem: UniListItem) => {
ListItem(){
Column() {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text(deviceItem.title)
.fontSize(16)
.fontStyle(FontStyle.Normal)
.width("50%")
.fontColor($r("app.color.item_color_black"))
Text(deviceItem.description)
.fontSize(16)
.width("50%")
.fontColor($r("app.color.font_description"))
}.backgroundColor("fff").padding("10vp")
}.padding({top:13,bottom:13,left:20,right:20})
}.backgroundColor("#fff")
})
}.divider({ strokeWidth: 1, color: 'rgb(242,242,242)' })
}
}.width('100%')
.justifyContent(FlexAlign.Center)
}
})
}
}
}.width("100%")
.height("100%").linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [['#97c6a6', 0.0], ['#e8f5c2', 1.0]]
})
}
}
\ No newline at end of file
features/SystemMaintenance/src/main/ets/model/UniInitList.ets
View file @
5b494d1c
...
...
@@ -68,7 +68,7 @@ export const sysInitList: UniListItem[] = [
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
url: '
/Unit
',
url: '
pages/sub_systemMaintenance/DeviceInfoPage
',
targetValue: '应用设备信息'
},
]
...
...
@@ -179,6 +179,195 @@ export const generalInitList: UniListItem[] = [
description: '模式推送方式'
},
]
/*运行的应用设备*/
export const getDeviceList: UniListItem[] = [
{
title: '设备ID',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '1705233243627'
},
{
title: '设备类型',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: 'pc'
},
{
title: '设备品牌',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '为获取'
},
{
title: '设备型号',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: 'PC'
},
{
title: '设备方向',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '竖屏'
},
{
title: '设备像素比',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '2.00000298'
}
]
/*设备的操作系统*/
export const getSystemList: UniListItem[] = [
{
title: '操作系统版本',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '10X64'
},
{
title: '操作系统语言',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '未获取'
},
{
title: '操作系统主题',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '未获取'
},
{
title: '系统API版本',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '未获取'
},
{
title: '引擎版本号',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '未获取'
}
]
/*开发的应用相关信息*/
export const getDeveloperList: UniListItem[] = [
{
title: 'appID',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '_UNI_9833C17'
},
{
title: '应用名称',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '仓库终端'
},
{
title: '应用版本名称',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '1.0.1'
},
{
title: '应用版本号',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '101'
},
{
title: '应用资源(wgt)的版本名称',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '未获取'
},
{
title: '应用设置的语言',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: 'zh-Hans'
}
]
/*开发的应用相关信息*/
export const getotherList: UniListItem[] = [
{
title: 'userAgent标识',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '_UNI_9833C17'
},
{
title: '屏幕宽度',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '400'
},
{
title: '屏幕高度',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '904'
},
{
title: '可使用窗口宽度',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '400'
},
{
title: '可使用窗口高度',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '860'
},
{
title: '可使用顶部位置',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '44'
},
{
title: '可使用低部位置',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '0'
},
{
title: '手机状态高度',
showExtraIcon: true,
showArrow: true,
targetValue: '',
description: '0'
}
]
export const deviceEnum = ['运行应用的设备','设备的操作系统','开发者的应用的信息',"其他"];
export const documentList: UniListItem[] = [
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论