Commit 6bd1f4c6 by huangqy

写的一些列表

parent b5cfd81b
......@@ -20,6 +20,7 @@ export struct General {
builder: BasicDialog({
cancel: this.onCancel,
confirm: this.onSubmit,
title: '2.0业务终端IP'
}),
cancel: this.existApp,
autoCancel: true,
......
import { maintenanceList, UniListItem } from '@ohos/system/src/main/ets/model/UniInitList'
import { TitleBar } from '../../view/title/TitleBar'
@Entry
@Component
export struct Maintenance {
@State searchValue: string = ''
controller: SearchController = new SearchController()
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "联系" })
Column() {
Column() {
List({ space: 2 }) {
ForEach(maintenanceList, (item: UniListItem) => {
ListItem() {
Row() {
Image(item?.extraIcon)
.width(45)
.height(45)
.margin({ right: 8 })
.borderRadius(50)
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center }) {
Text(item.title).fontSize(20).fontColor('#3b4144')
Text(item.description).fontSize(14).fontColor('#999').margin({ top: 3 })
}
.width('50%')
Blank()
.layoutWeight(1)
Text(item.targetValue)
.fontSize(16)
.flexGrow(1)
.align(Alignment.End)
.margin({ right: 8 })
.fontColor('#999')
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 12, right: 18 })
}
.height('10%')
})
}
.width('100%')
.backgroundColor('#fff')
.divider({ strokeWidth: 1, color: 'rgb(242,242,242)' }) // 每行之间的分界线
}
Text('*请您耐心等待,我们非常理解您的心情,我们会尽快为您处理您的问题。')
.fontSize(10)
.margin({ top: 8, bottom: 8 })
}.padding(10)
}
}.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [['#36a3c0', 0.0], ['#97c6a6', 1.0], ['#c7d799', 2.0]]
})
}
}
\ No newline at end of file
import { TitleBar } from '../../view/title/TitleBar'
import router from '@ohos.router';
import { UniListItem, sysInitList } from '@ohos/system/src/main/ets/model/UniInitList';
import { UniListItem, sysInitList, sysExtraInitList } from '@ohos/system/src/main/ets/model/UniInitList';
@Entry
@Component
......@@ -52,6 +52,47 @@ export struct Setting {
.backgroundColor('#fff')
.divider({ strokeWidth: 1, color: 'rgb(242,242,242)' }) // 每行之间的分界线
}.margin({ top:5, bottom: 5 })
Column() {
List({ space: 2 }) {
ForEach(sysExtraInitList, (item: UniListItem) => {
ListItem() {
Row() {
Row() {
Image(item?.extraIcon)
.width(24)
.height(24)
.margin({ right: 8 })
Text(item?.title).fontSize(20).fontColor('#3b4144')
}
.width('60%')
Blank()
.layoutWeight(1)
Text(item.targetValue)
.fontSize(16)
.flexGrow(1)
.align(Alignment.End)
.margin({ right: 8 })
.fontColor('#999')
Image($r('app.media.right_grey')).width(8).height(16)
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 12, right: 18 })
}
.height('7%')
.onClick(() => {
router.pushUrl({
url: item.url
})
})
})
}
.width('100%')
.backgroundColor('#fff')
.divider({ strokeWidth: 1, color: 'rgb(242,242,242)' }) // 每行之间的分界线
}.margin({ top:5, bottom: 5 })
}
......
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#fff')
.fontColor('#0fa983')
.borderRadius(10)
.type(ButtonType.Normal)
.stateEffect(true)
}
@CustomDialog
@Component
export struct BasicDialog {
private title: string;
controller: CustomDialogController
cancel: () => void
confirm: () => void
build() {
Column() {
Row() {
Text().fontSize(20).textAlign(TextAlign.Start)
}.margin({ top: 10, bottom: 10 })
Flex({ alignItems: ItemAlign.Start }) {
Row() {
Divider()
.vertical(true)
.height(14)
.strokeWidth(3)
.color('#19ac88')
.opacity(0.6)
.margin({ left: 8, right: 8 })
Text(this.title)
.fontSize(20)
}.padding({ top: 10, bottom: 10 })
}
Flex({ justifyContent: FlexAlign.SpaceAround }) {
Button('确认')
.onClick(() => {
this.controller.close()
this.confirm()
}).backgroundColor('#0fa983').fontColor(Color.Black)
}).CommonButtonStyle()
Button('取消')
.onClick(() => {
this.controller.close()
this.cancel()
}).backgroundColor('#0fa983').fontColor(Color.Red)
}).CommonButtonStyle()
}.margin({ bottom: 10 })
}
}
......
......@@ -18,6 +18,7 @@
"pages/sub_systemMaintenance/GoodsShelf",
"pages/sub_systemMaintenance/Pmhx",
"pages/sub_systemMaintenance/Setting",
"pages/sub_systemMaintenance/General"
"pages/sub_systemMaintenance/General",
"pages/sub_systemMaintenance/Maintenance"
]
}
......@@ -73,6 +73,62 @@ export const sysInitList: UniListItem[] = [
},
]
export const sysExtraInitList: UniListItem[] = [
{
title: '意见反馈',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
url: 'pages/sub_systemMaintenance/General',
targetValue: ''
},
{
title: '联系运维',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
url: 'pages/sub_systemMaintenance/Maintenance',
targetValue: ''
},
{
title: '帮助',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
url: '/Unit',
targetValue: ''
},
{
title: '关于',
showExtraIcon: true,
showArrow: true,
//extraIcon: '',
url: '/Unit',
targetValue: '版本号: 1.0.1'
},
]
export const maintenanceList: UniListItem[] = [
{
title: '陈工',
showExtraIcon: true,
showArrow: true,
extraIcon: $r('app.media.tx2'),
description: '13449490736',
url: '',
targetValue: '负责:技术问题'
},
{
title: '李工',
showExtraIcon: true,
showArrow: true,
extraIcon: $r('app.media.tx1'),
description: '18518688936',
url: '',
targetValue: '负责:业务问题'
},
]
export const generalInitList: UniListItem[] = [
{
title: '2.0业务数据服务IP',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论