| | |
| | | import { Home } from './home/Home' |
| | | import { MessagePage } from './message/MessagePage' |
| | | import { SearchPage } from './search/SearchPage' |
| | | import { AccountPage } from './account/AccountPage' |
| | | |
| | | /** |
| | | * @Description : 底部导航,APP模块 |
| | |
| | | { icon: 'tabs_message_icon', title: '消息' }, |
| | | { icon: 'tabs_account_icon', title: '我的' } |
| | | ] |
| | | @State selectIndex: number = 2 |
| | | @State selectIndex: number = 0 |
| | | private tabController: TabsController = new TabsController() |
| | | |
| | | @Builder tabItem(icon: ResourceStr,title: string,index: number){ |
| | |
| | | SearchPage() |
| | | } else if (this.selectIndex == 2){ |
| | | MessagePage() |
| | | } else if (index === 3){ |
| | | // AccountPage() |
| | | } else if (this.selectIndex == 3){ |
| | | AccountPage() |
| | | } |
| | | } |
| | | }) |
New file |
| | |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct AboutPage { |
| | | build() { |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | Text('关于') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | |
| | | Row() |
| | | } |
| | | .width('100%') |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Divider() |
| | | |
| | | Column() { |
| | | Column({ space: 10 }) { |
| | | Image($r('app.media.logo')) |
| | | .width(60) |
| | | .height(60) |
| | | Text('学聘同行') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | Text('当前版本 V2.1.2') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .fontColor('#999999') |
| | | } |
| | | .width('100%') |
| | | .height('30%') |
| | | .padding({ top: 50 }) |
| | | |
| | | Column() { |
| | | Divider() |
| | | .margin({ bottom: 6 }) |
| | | List({ space: 10, initialIndex: 0 }){ |
| | | ListItem() { |
| | | Row() { |
| | | Text('检测更新') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .layoutWeight(1) |
| | | Image($r('app.media.chevron_right')) |
| | | .width(12) |
| | | .height(12) |
| | | } |
| | | .width('100%') |
| | | .padding(8) |
| | | } |
| | | ListItem() { |
| | | Row() { |
| | | Text('去评分') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .layoutWeight(1) |
| | | Image($r('app.media.chevron_right')) |
| | | .width(12) |
| | | .height(12) |
| | | } |
| | | .width('100%') |
| | | .padding(8) |
| | | } |
| | | ListItem() { |
| | | Row() { |
| | | Text('用户协议') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .layoutWeight(1) |
| | | Image($r('app.media.chevron_right')) |
| | | .width(12) |
| | | .height(12) |
| | | } |
| | | .width('100%') |
| | | .padding(8) |
| | | } |
| | | ListItem() { |
| | | Row() { |
| | | Text('隐私政策') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .layoutWeight(1) |
| | | Image($r('app.media.chevron_right')) |
| | | .width(12) |
| | | .height(12) |
| | | } |
| | | .width('100%') |
| | | .padding(8) |
| | | } |
| | | } |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | | .friction(0.6) |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | .divider({strokeWidth: 1,color: '#f0f0f0'}) |
| | | } |
| | | .padding(16) |
| | | } |
| | | .padding({ top: 10 }) |
| | | .width('100%') |
| | | .height('100%') |
| | | } |
| | | } |
| | | } |
| | |
| | | import { ComponentContent, router } from "@kit.ArkUI" |
| | | import { PromptActionClass } from '../../utils/PromptActionClass'; |
| | | |
| | | class accountListItem { |
| | | title: string = '' |
| | | icon: string | Resource = '' |
| | | } |
| | | class DialogParams { |
| | | text: string = ""; |
| | | |
| | | constructor(text: string) { |
| | | this.text = text; |
| | | } |
| | | } |
| | | @Builder |
| | | function buildText(params: DialogParams) { |
| | | Column({ space: 12 }) { |
| | | Text('已沟通') |
| | | .width('100%') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | .textAlign(TextAlign.Center) |
| | | Text('4') |
| | | .fontSize(26) |
| | | .fontWeight(700) |
| | | .fontColor('#1761f4') |
| | | .width('100%') |
| | | .textAlign(TextAlign.Center) |
| | | Text('累计沟通岗位数') |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | Text('您是职场中的中流砥柱') |
| | | .width('100%') |
| | | .textAlign(TextAlign.Center) |
| | | .padding(16) |
| | | .fontSize(14) |
| | | .fontColor(Color.Black) |
| | | .fontWeight(500) |
| | | .backgroundColor('#f6f7fa') |
| | | } |
| | | .width(300) |
| | | .padding(20) |
| | | .borderRadius(14) |
| | | .backgroundColor(Color.White) |
| | | } |
| | | |
| | | @Builder |
| | | function buildText1(params: DialogParams) { |
| | | Column({ space: 12 }) { |
| | | Text('帮助中心') |
| | | .width('100%') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | .fontColor(Color.Black) |
| | | .textAlign(TextAlign.Center) |
| | | Text('400-100-1212') |
| | | .fontSize(26) |
| | | .fontWeight(700) |
| | | .fontColor(Color.Black) |
| | | .width('100%') |
| | | .textAlign(TextAlign.Center) |
| | | Button('拨打电话') |
| | | .width('100%') |
| | | .type(ButtonType.Normal) |
| | | .borderRadius(8) |
| | | } |
| | | .width(300) |
| | | .padding(20) |
| | | .borderRadius(14) |
| | | .backgroundColor(Color.White) |
| | | } |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct AccountPage { |
| | | @State message: string = 'Hello World'; |
| | | @State ListItems: accountListItem[] = [ |
| | | { title: '隐私设置', icon: $r('app.media.account_setting') }, |
| | | { title: '消息通知', icon: $r('app.media.account_message') }, |
| | | { title: '帮助中心', icon: $r('app.media.account_help') }, |
| | | { title: '关于我们', icon: $r('app.media.account_info') }, |
| | | ] |
| | | @State dialogMessage: string = '注册成功'; |
| | | private ctx: UIContext = this.getUIContext(); |
| | | private contentNode: ComponentContent<Object> = |
| | | new ComponentContent(this.ctx, wrapBuilder(buildText), new DialogParams((this.dialogMessage))); |
| | | params: DialogParams = new DialogParams('注册成功') |
| | | |
| | | aboutToAppear(): void { |
| | | PromptActionClass.setContext(this.ctx); |
| | | PromptActionClass.setContentNode(this.contentNode); |
| | | PromptActionClass.setOptions({ alignment: DialogAlignment.Center, offset: { dx: 0, dy: 0 } }); |
| | | } |
| | | build() { |
| | | RelativeContainer() { |
| | | Text(this.message) |
| | | .id('AccountPageHelloWorld') |
| | | .fontSize($r('app.float.page_text_font_size')) |
| | | .fontWeight(FontWeight.Bold) |
| | | .alignRules({ |
| | | center: { anchor: '__container__', align: VerticalAlign.Center }, |
| | | middle: { anchor: '__container__', align: HorizontalAlign.Center } |
| | | Column() { |
| | | Text('个人中心') |
| | | .fontSize(20) |
| | | .fontWeight(700) |
| | | .textAlign(TextAlign.Center) |
| | | .width('100%') |
| | | .backgroundColor(Color.White) |
| | | .padding({ top: 10, bottom: 10 }) |
| | | |
| | | Column({ space: 10 }) { |
| | | Row() { |
| | | Image($r('app.media.me_icon')) |
| | | .width(50) |
| | | .height(50) |
| | | Column() { |
| | | Text('李强') |
| | | .fontSize(16) |
| | | .width('100%') |
| | | .fontWeight(600) |
| | | .fontColor(Color.Black) |
| | | .textAlign(TextAlign.Start) |
| | | Text('男 | 28岁 | 前端开发工程师') |
| | | .fontColor('#333333') |
| | | .fontSize(14) |
| | | .width('100%') |
| | | .textAlign(TextAlign.Start) |
| | | } |
| | | .width(100) |
| | | .height(40) |
| | | .margin({ left: 10 }) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | .layoutWeight(1) |
| | | Image($r('app.media.chevron_right')) |
| | | .width(18) |
| | | .height(18) |
| | | } |
| | | .width('100%') |
| | | .onClick(() =>{ |
| | | router.pushUrl({ |
| | | url: '' |
| | | }) |
| | | }) |
| | | |
| | | Column({ space: 16 }) { |
| | | Row() { |
| | | Text('学习记录') |
| | | .fontSize(16) |
| | | .fontColor(Color.White) |
| | | .fontWeight(700) |
| | | Text('去应聘 > ') |
| | | .fontSize(13) |
| | | .borderRadius(20) |
| | | .fontWeight(500) |
| | | .backgroundColor(Color.White) |
| | | .padding({ left: 10, right: 10, top: 4, bottom: 4 }) |
| | | .fontColor('#1756f4') |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Text('当前学习级别:青铜') |
| | | .width('100%') |
| | | .fontColor(Color.White) |
| | | .fontSize(14) |
| | | Row() { |
| | | Column({ space: 4 }) { |
| | | Text('学习时长') |
| | | .fontColor(Color.White) |
| | | .fontSize(12) |
| | | .width('100%') |
| | | Text() { |
| | | Span('10').fontWeight(700).fontSize(14) |
| | | Span('分钟').fontSize(12) |
| | | } |
| | | .width('100%') |
| | | .fontColor(Color.White) |
| | | } |
| | | .width(80) |
| | | Column({ space: 4 }) { |
| | | Text('学习最长的课程') |
| | | .fontColor(Color.White) |
| | | .fontSize(12) |
| | | .width('100%') |
| | | Text('全栈开发:前后端打通实战') |
| | | .fontWeight(700) |
| | | .fontSize(14) |
| | | .width('100%') |
| | | .fontColor(Color.White) |
| | | } |
| | | } |
| | | .width('100%') |
| | | } |
| | | .width('100%') |
| | | .padding(16) |
| | | .borderRadius(14) |
| | | .linearGradient({ |
| | | direction: GradientDirection.Right, |
| | | colors: [['#36BCFF', 0.0], ['#2D74FF', 1.0]] |
| | | }) |
| | | } |
| | | .backgroundColor(Color.White) |
| | | .padding(16) |
| | | .margin({ top: 1 }) |
| | | |
| | | Row() { |
| | | Column({ space: 6 }) { |
| | | Image($r('app.media.account_learning')) |
| | | .width(40) |
| | | .height(40) |
| | | Text('学习记录') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | } |
| | | Column({ space: 6 }) { |
| | | Image($r('app.media.account_course')) |
| | | .width(40) |
| | | .height(40) |
| | | Text('课程收藏') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | } |
| | | Column({ space: 6 }) { |
| | | Image($r('app.media.account_vitae')) |
| | | .width(40) |
| | | .height(40) |
| | | Text('个人简历') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | } |
| | | Column({ space: 6 }) { |
| | | Image($r('app.media.account_communicated')) |
| | | .width(40) |
| | | .height(40) |
| | | Text('已沟通') |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | } |
| | | .onClick(() => { |
| | | this.message = 'Welcome'; |
| | | console.log('点击') |
| | | this.contentNode = new ComponentContent(this.ctx, wrapBuilder(buildText), new DialogParams((this.dialogMessage))); |
| | | PromptActionClass.setContentNode(this.contentNode); |
| | | PromptActionClass.openDialog() |
| | | }) |
| | | } |
| | | .width('100%') |
| | | .backgroundColor(Color.White) |
| | | .padding({ bottom: 10 }) |
| | | .justifyContent(FlexAlign.SpaceEvenly) |
| | | |
| | | Column() { |
| | | List({ space: 10, initialIndex: 0 }){ |
| | | ForEach(this.ListItems, (item: accountListItem) => { |
| | | ListItem() { |
| | | Row() { |
| | | Image(item.icon) |
| | | .width(20) |
| | | .height(20) |
| | | Text(item.title) |
| | | .fontSize(13) |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | .layoutWeight(1) |
| | | .margin({ left: 8 }) |
| | | |
| | | Image($r('app.media.chevron_right')) |
| | | .width(12) |
| | | .height(12) |
| | | } |
| | | .width('100%') |
| | | .padding(8) |
| | | .onClick(() => { |
| | | if (item.title == '隐私设置') { |
| | | router.pushUrl({ |
| | | url: '' |
| | | }) |
| | | } else if (item.title == '消息通知') { |
| | | |
| | | } else if (item.title == '帮助中心') { |
| | | this.contentNode = new ComponentContent(this.ctx, wrapBuilder(buildText1), new DialogParams((this.dialogMessage))); |
| | | PromptActionClass.setContentNode(this.contentNode); |
| | | PromptActionClass.openDialog() |
| | | } else if (item.title == '关于我们') { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | | .friction(0.6) |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | .divider({strokeWidth: 1,color: '#f0f0f0'}) |
| | | } |
| | | .padding(16) |
| | | .backgroundColor(Color.White) |
| | | .margin({ top: 1 }) |
| | | |
| | | Column() { |
| | | Button('退出应用') |
| | | .fontSize(14) |
| | | .height(36) |
| | | .type(ButtonType.Normal) |
| | | .borderRadius(6) |
| | | .width('100%') |
| | | .fontColor(Color.White) |
| | | .backgroundColor('#1761f4') |
| | | } |
| | | .padding(16) |
| | | .width('100%') |
| | | .background(Color.White) |
| | | .height(300) |
| | | |
| | | } |
| | | .backgroundColor('#f5f5f7') |
| | | .height('100%') |
| | | .width('100%') |
| | | } |
New file |
| | |
| | | |
| | | class Course { |
| | | title: string = '' |
| | | desc: string = '' |
| | | count: string = '' |
| | | time: string = '' |
| | | difficult: string = '' |
| | | } |
| | | @Entry |
| | | @Component |
| | | export struct CourseCollection { |
| | | @State courseList: Course[] = [ |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: 'Java高级:JVM深度调优与JVM深度调优', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | |
| | | ] |
| | | build() { |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | Text('课程收藏') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | Row() |
| | | } |
| | | .width('100%') |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Divider() |
| | | |
| | | Column() { |
| | | List({ space: 10, initialIndex: 0 }) { |
| | | ForEach(this.courseList, (item: Course, index: number) => { |
| | | ListItem() { |
| | | Row({ space: 10 }) { |
| | | Column() { |
| | | Text(item.title) |
| | | .fontSize(14) |
| | | .fontWeight(800) |
| | | .maxLines(1) |
| | | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| | | Text(item.desc) |
| | | .fontSize(12) |
| | | .fontColor('#666666') |
| | | .maxLines(2) |
| | | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| | | Row() { |
| | | Row({ space: 2 }) { |
| | | Image($r('app.media.person_icon')) |
| | | .width(10) |
| | | .height(10) |
| | | Text(item.count) |
| | | .fontSize(10) |
| | | .fontColor('#666666') |
| | | } |
| | | Row({ space: 2 }) { |
| | | Image($r('app.media.video_icon')) |
| | | .width(10) |
| | | .height(10) |
| | | Text(item.time) |
| | | .fontSize(10) |
| | | .fontColor('#666666') |
| | | } |
| | | Text() { |
| | | Span('课程难度: ') |
| | | Span(item.difficult) |
| | | } |
| | | .fontSize(10) |
| | | .fontColor('#666666') |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | } |
| | | .layoutWeight(0) |
| | | .width(170) |
| | | .height('100%') |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | .alignItems(HorizontalAlign.Start) |
| | | Image($r('app.media.active_list_img')) |
| | | .aspectRatio(16/9) |
| | | .height('100%') |
| | | .layoutWeight(1) |
| | | } |
| | | .width('100%') |
| | | .height(100) |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | .border({ width: 1, style: BorderStyle.Solid, color: '#f2f2f2' }) |
| | | .borderRadius(10) |
| | | } |
| | | }, (index: number) => index.toString()) |
| | | } |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | | .friction(0.6) |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | .height('100%') |
| | | |
| | | } |
| | | .padding(16) |
| | | |
| | | |
| | | |
| | | } |
| | | .width('100%') |
| | | .height('100%') |
| | | } |
| | | } |
New file |
| | |
| | | import { McLineChart, Options } from '@mcui/mccharts' |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct LearningRecordPage { |
| | | @State maxData: number[] = [0, 0, 0, 5, 0, 5, 0] |
| | | // 初始化数据 |
| | | @State seriesOption: Options = new Options({ |
| | | xAxis:{ |
| | | data:['09-01','09-02','09-03','09-04','09-05','09-06','09-07'] |
| | | }, |
| | | yAxis:{ |
| | | name:'分钟' |
| | | }, |
| | | series:[ |
| | | { |
| | | name:'学习时长', |
| | | data: this.maxData |
| | | } |
| | | ] |
| | | }) |
| | | |
| | | build() { |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | Text('学习记录') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | Row() |
| | | } |
| | | .width('100%') |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Divider() |
| | | |
| | | Column({ space: 20 }) { |
| | | Row() { |
| | | Column({ space: 12 }) { |
| | | Text('总学习时长') |
| | | .fontColor('#666666') |
| | | .fontSize(14) |
| | | Text() { |
| | | Span('10') |
| | | .fontSize(20) |
| | | .fontWeight(700) |
| | | .fontColor('#1761f4') |
| | | Span(' 分钟') |
| | | .fontSize(12) |
| | | } |
| | | } |
| | | Column({ space: 12 }) { |
| | | Text('今日学习时长') |
| | | .fontColor('#666666') |
| | | .fontSize(14) |
| | | Text() { |
| | | Span('0') |
| | | .fontSize(20) |
| | | .fontWeight(700) |
| | | .fontColor('#1761f4') |
| | | Span(' 分钟') |
| | | .fontSize(12) |
| | | } |
| | | } |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.SpaceEvenly) |
| | | .padding(20) |
| | | .borderRadius(10) |
| | | .shadow({ radius: 10, color: '#dcdcdc' }) |
| | | |
| | | Text('近一周学习时长统计') |
| | | .fontSize(14) |
| | | .fontColor(Color.Black) |
| | | .fontWeight(500) |
| | | .width('100%') |
| | | |
| | | Column(){ |
| | | McLineChart({ |
| | | options: this.seriesOption |
| | | }) |
| | | } |
| | | .width('100%') |
| | | .height(200) |
| | | |
| | | } |
| | | .padding(16) |
| | | |
| | | |
| | | |
| | | } |
| | | .width('100%') |
| | | .height('100%') |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | class MessageItem { |
| | | icon: string | Resource = '' |
| | | title: string = '' |
| | | desc: string = '' |
| | | time: string = '' |
| | | isRead: boolean = false |
| | | } |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct MessagePushPage { |
| | | @State messagePushFlag: boolean = false |
| | | @State autoUpdateFlag: boolean = false |
| | | @State messageList: MessageItem[] = [ |
| | | { icon: $r('app.media.message_note'), title: '课程提醒', desc: '您报名的《全栈开发:前后端打通实战》', time: '09-01 12:55', isRead: false }, |
| | | { icon: $r('app.media.message_gift'), title: '福袋派送官', desc: '您获得了一张价值100元的课程抵扣券,您可以从', time: '09-01 10:55', isRead: true }, |
| | | { icon: $r('app.media.message_pencil'), title: '官方通知', desc: '本平台将于09-01 00 对平台进行维护,请各位用户', time: '08-31 10:55', isRead: true } |
| | | ] |
| | | build() { |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | Text('消息通知') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | Row() |
| | | } |
| | | .width('100%') |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Divider() |
| | | |
| | | Column() { |
| | | List({ space: 10, initialIndex: 0 }){ |
| | | ForEach(this.messageList, (item: MessageItem) => { |
| | | ListItem() { |
| | | Row() { |
| | | Image(item.icon) |
| | | .width(40) |
| | | .height(40) |
| | | Column({ space: 10 }) { |
| | | Row() { |
| | | Text(item.title) |
| | | .fontSize(14) |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | Text(item.time) |
| | | .fontSize(12) |
| | | .fontWeight(500) |
| | | .margin({ left: 10 }) |
| | | .fontColor('#666666') |
| | | } |
| | | .width('100%') |
| | | |
| | | Text(item.desc) |
| | | .width('100%') |
| | | .fontSize(12) |
| | | .maxLines(1) |
| | | .fontColor('#666666') |
| | | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| | | } |
| | | .width(260) |
| | | .margin({ left: 10 }) |
| | | |
| | | if (!item.isRead) { |
| | | Image($r('app.media.message_circle')) |
| | | .width(10) |
| | | .height(10) |
| | | } |
| | | } |
| | | .width('100%') |
| | | .height(80) |
| | | .padding({ left: 16,right: 16, top: 4, bottom: 4 }) |
| | | .borderRadius(10) |
| | | .backgroundColor(Color.White) |
| | | .onClick(() => { |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | | .friction(0.6) |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | .divider({strokeWidth: 1,color: '#f0f0f0'}) |
| | | } |
| | | .padding({ top: 10 }) |
| | | .backgroundColor('#f5f5f7') |
| | | .width('100%') |
| | | .height('100%') |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | @Entry |
| | | @Component |
| | | export struct CourseCollection { |
| | | build() { |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | Text('个人简历') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | Row() |
| | | } |
| | | .width('100%') |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Divider() |
| | | |
| | | Image($r('app.media.person_vitae')) |
| | | .width('100%') |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | @Entry |
| | | @Component |
| | | export struct SettingPage { |
| | | @State messagePushFlag: boolean = false |
| | | @State autoUpdateFlag: boolean = false |
| | | build() { |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | Text('隐私设置') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | Row() |
| | | } |
| | | .width('100%') |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Divider() |
| | | |
| | | Column() { |
| | | Row() { |
| | | Column({ space: 10 }) { |
| | | Text('是否开启消息推送') |
| | | .fontColor(Color.Black) |
| | | .width('100%') |
| | | Text(`您已经${this.messagePushFlag?'开启':'关闭'}消息推送`) |
| | | .fontSize(12) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | } |
| | | .layoutWeight(1) |
| | | Toggle({ type: ToggleType.Switch, isOn: this.messagePushFlag }) |
| | | .selectedColor('#007DFF') |
| | | .switchPointColor('#FFFFFF') |
| | | .onChange(() => { |
| | | this.messagePushFlag = !this.messagePushFlag |
| | | }) |
| | | } |
| | | Divider().margin({ top: 20, bottom: 20 }) |
| | | .color('#ededed') |
| | | |
| | | Row() { |
| | | Column({ space: 10 }) { |
| | | Text('是否开启自动更新') |
| | | .fontColor(Color.Black) |
| | | .width('100%') |
| | | Text(`您已经${this.autoUpdateFlag?'开启':'关闭'}自动更新`) |
| | | .fontSize(12) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | } |
| | | .layoutWeight(1) |
| | | Toggle({ type: ToggleType.Switch, isOn: this.autoUpdateFlag }) |
| | | .selectedColor('#007DFF') |
| | | .switchPointColor('#FFFFFF') |
| | | .onChange(() => { |
| | | this.autoUpdateFlag = !this.autoUpdateFlag |
| | | }) |
| | | } |
| | | } |
| | | .padding(16) |
| | | .width('100%') |
| | | .height('100%') |
| | | |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | @Entry |
| | | @Component |
| | | export struct UserInfo { |
| | | @State nickName: string = '' |
| | | @State gender: string = '' |
| | | @State age: string = '' |
| | | @State preferJob: string = '' |
| | | @State job: string = '' |
| | | @State introduce: string = '' |
| | | |
| | | build() { |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | Text('个人信息') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | Row() |
| | | } |
| | | .width('100%') |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Divider() |
| | | |
| | | Column({ space: 14 }) { |
| | | Column() { |
| | | Text(`昵称`) |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.nickName }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | | } |
| | | |
| | | Column() { |
| | | Text(`性别`) |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.gender }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | | } |
| | | |
| | | Column() { |
| | | Text(`年龄`) |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.age }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | | } |
| | | |
| | | Column() { |
| | | Text(`职业`) |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.job }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | | } |
| | | |
| | | Column() { |
| | | Text(`心仪职业`) |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.preferJob }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | | } |
| | | |
| | | Column() { |
| | | Text(`个人简介`) |
| | | .fontColor('#666666') |
| | | .fontSize(14) |
| | | .width('100%') |
| | | TextArea({ placeholder: '介绍一下你自己吧~', text: this.job }) |
| | | .placeholderFont({ size: 14 }) |
| | | .backgroundColor('#fff') |
| | | .border({ width: 1, color: '#666666' }) |
| | | .borderRadius(5) |
| | | .minLines(10) |
| | | .maxLength(200) |
| | | .showCounter(true) |
| | | .margin({ top: 10 }) |
| | | } |
| | | |
| | | Button('保存') |
| | | .fontSize(14) |
| | | .height(36) |
| | | .type(ButtonType.Normal) |
| | | .borderRadius(6) |
| | | .width('100%') |
| | | .fontColor(Color.White) |
| | | .backgroundColor('#1761f4') |
| | | |
| | | } |
| | | .height('100%') |
| | | .width('100%') |
| | | .padding(16) |
| | | } |
| | | } |
| | | } |
| | |
| | | import { router } from "@kit.ArkUI"; |
| | | import { promptAction, router } from "@kit.ArkUI"; |
| | | import { http } from "@kit.NetworkKit"; |
| | | import { HttpResponseResult } from "../../data/HttpResponse"; |
| | | import { LvMarkdownIn } from "@luvi/lv-markdown-in" |
| | | |
| | | class BannerInfo { |
| | | pic: string = '' |
| | | content: string = '' |
| | | } |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct BannerDetail { |
| | | @State index: number = 0; |
| | | struct BannerDetail { |
| | | @State bannerId: string = ''; |
| | | @State bannerInfo: BannerInfo = { |
| | | pic: '', |
| | | content: '' |
| | | } |
| | | aboutToAppear(): void { |
| | | interface Params { |
| | | index: number |
| | | bannerId: string |
| | | } |
| | | const params: Params = router.getParams() as Params |
| | | if (params) { |
| | | this.index = params.index |
| | | this.bannerId = params.bannerId |
| | | console.log('bannerId', this.bannerId) |
| | | this.getDetail() |
| | | } |
| | | |
| | | } |
| | | |
| | | getDetail() { |
| | | interface PostData { |
| | | bannerId: string, |
| | | } |
| | | let postData: PostData = { |
| | | bannerId: this.bannerId |
| | | } |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `http://192.168.20.70:8080/quiz-community/public/v1.0/home/slideshows/details?bannerId=${this.bannerId}`, |
| | | { |
| | | method: http.RequestMethod.GET, |
| | | header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` }, |
| | | }, |
| | | (err, data) => { |
| | | console.log('response', '/home/slideshows/details') |
| | | console.log(JSON.stringify(data.result)) |
| | | if (data.responseCode == 200) { |
| | | const resData = (typeof data.result == 'string' ? JSON.parse(data.result) : data.result) as HttpResponseResult<BannerInfo> |
| | | if (resData.code == 200) { |
| | | this.bannerInfo = resData.data as BannerInfo |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | build() { |
| | |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('详情页') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Image($r('app.media.image1')) |
| | | Image(this.bannerInfo.pic) |
| | | .width('100%') |
| | | .height(150) |
| | | |
| | | Column({ space: 10 }) { |
| | | Text('华为[1+X]《网络系统建设与运维》') |
| | | .fontWeight(800) |
| | | .width('100%') |
| | | |
| | | Text('课程介绍') |
| | | .width('100%') |
| | | .fontSize(14) |
| | | .fontWeight(800) |
| | | .margin({ top: 10 }) |
| | | |
| | | Text('本课程是计算机网络技术、通信技术等专业的专业核心课程,旨在培养学生的网络技术职业能力、职业素养和创新能力。' + |
| | | '\n采用项目式实训教学,通过引入一个循序渐进的企业网络组建案例,让学生在模拟真实场景中掌握中小型企业网络组建的知识和能力' + |
| | | '教材内容覆盖华为“1+X”证书考试要求,包含大量实操练习。') |
| | | .width('100%') |
| | | .fontSize(13) |
| | | .lineHeight(20) |
| | | } |
| | | .padding(14) |
| | | |
| | | |
| | | LvMarkdownIn({ text: this.bannerInfo.content.toString() }) |
| | | .width('100%') |
| | | .height(560) |
| | | |
| | | } |
| | | .width('100%') |
| | |
| | | import { router } from "@kit.ArkUI" |
| | | import { promptAction, router } from "@kit.ArkUI" |
| | | import { http } from "@kit.NetworkKit" |
| | | import { LvMarkdownIn } from "@luvi/lv-markdown-in" |
| | | import { HttpResponseResult } from "../../data/HttpResponse" |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct ClassificationDetail { |
| | | @State title: string = '' |
| | | @State moduleName: string = '' |
| | | @State content: string = '' |
| | | aboutToAppear(): void { |
| | | interface Params { |
| | | title: string |
| | | moduleName: string |
| | | } |
| | | const params = router.getParams() as Params |
| | | this.title = params.title |
| | | this.moduleName = params.moduleName |
| | | this.getDetail() |
| | | } |
| | | |
| | | getDetail() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `http://192.168.20.70:8080/quiz-community/public/v1.0/home/module/details?moduleName=${this.moduleName}`, |
| | | { |
| | | method: http.RequestMethod.GET, |
| | | header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` }, |
| | | }, |
| | | (err, data) => { |
| | | console.log('response', '/home/module/details') |
| | | console.log(JSON.stringify(data.result)) |
| | | if (data.responseCode == 200) { |
| | | const resData = (typeof data.result == 'string' ? JSON.parse(data.result) : data.result) as HttpResponseResult<string> |
| | | if (resData.code == 200) { |
| | | this.content = resData.data || '' |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | build() { |
| | |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('详情页') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Image($r('app.media.image1')) |
| | | .width('100%') |
| | | .height(180) |
| | | |
| | | Column({ space: 10 }) { |
| | | |
| | | Text('详情介绍') |
| | | if (this.moduleName) { |
| | | Image($r(`app.media.classification_detail_${this.moduleName}`)) |
| | | .width('100%') |
| | | .fontSize(14) |
| | | .fontWeight(800) |
| | | .margin({ top: 10 }) |
| | | |
| | | Text('本课程是计算机网络技术、通信技术等专业的专业核心课程,旨在培养学生的网络技术职业能力、职业素养和创新能力。' + |
| | | '\n采用项目式实训教学,通过引入一个循序渐进的企业网络组建案例,让学生在模拟真实场景中掌握中小型企业网络组建的知识和能力' + |
| | | '教材内容覆盖华为“1+X”证书考试要求,包含大量实操练习。') |
| | | .width('100%') |
| | | .fontSize(13) |
| | | .lineHeight(20) |
| | | .height(180) |
| | | } |
| | | .padding(14) |
| | | LvMarkdownIn({ text: this.content.toString() }) |
| | | .width('100%') |
| | | .height(560) |
| | | } |
| | | .width('100%') |
| | | .height('100%') |
| | |
| | | import { router } from "@kit.ArkUI" |
| | | import { promptAction, router } from "@kit.ArkUI" |
| | | import http from '@ohos.net.http'; |
| | | import { HttpResponseResult } from "../../data/HttpResponse"; |
| | | import { JSON } from "@kit.ArkTS"; |
| | | |
| | | class TabBarBase { |
| | | title: string = '' |
| | | } |
| | | class SwiperItem { |
| | | pic: string = '' |
| | | id: string = '' |
| | | sort: number = 0 |
| | | } |
| | | |
| | | class Classification { |
| | | title: string = '' |
| | | value: string = '' |
| | | icon: ResourceStr = '' |
| | | } |
| | | class Activity { |
| | | title: string = '' |
| | | timeScope: string = '' |
| | | signupCount: number = 0 |
| | | statusText: string = '' |
| | | id: string = '' |
| | | name: string = '' |
| | | pic: string = '' |
| | | startDate: string = '' |
| | | endTime: string = '' |
| | | signupCount: string = '' |
| | | status: string = '' |
| | | } |
| | | class Course { |
| | | title: string = '' |
| | | desc: string = '' |
| | | count: string = '' |
| | | time: string = '' |
| | | difficult: string = '' |
| | | name: string = '' |
| | | pic: string = '' |
| | | description: string = '' |
| | | playCount: number = 0 |
| | | duration: number = 0 |
| | | difficulty: number = 0 |
| | | } |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct Home { |
| | | @State pageHeight: number = 0 |
| | | @State activeIndex:number = 1 |
| | | @State activeIndex:number = 0 |
| | | @State tabList: TabBarBase[] = [ |
| | | { title: '首页' }, |
| | | { title: '课程' } |
| | | ] |
| | | private tabController: TabsController = new TabsController() |
| | | @State swiperList: ResourceStr[] = [ |
| | | $r('app.media.image1'), |
| | | $r('app.media.image1'), |
| | | $r('app.media.image1'), |
| | | ] |
| | | @State swiperList: SwiperItem[] = [] |
| | | @State swiperIndex: number = 0 |
| | | //TabBar样式 |
| | | @State classificationList: Classification[] = [ |
| | | { title: '数通', icon: $r('app.media.classification_shutong') }, |
| | | { title: '安全', icon: $r('app.media.classification_safety') }, |
| | | { title: '云计算', icon: $r('app.media.classification_cloudcalc') }, |
| | | { title: '存储', icon: $r('app.media.classification_storage') }, |
| | | { title: '鲲鹏', icon: $r('app.media.classification_roc') }, |
| | | { title: 'AI', icon: $r('app.media.classification_AI') }, |
| | | { title: '连接', icon: $r('app.media.classification_link') }, |
| | | { title: '大数据', icon: $r('app.media.classification_bigdata') }, |
| | | { title: '云服务', icon: $r('app.media.classification_cloudservice') }, |
| | | { title: '更多', icon: $r('app.media.classification_more') }, |
| | | { title: '数通', value: 'shutong', icon: $r('app.media.classification_shutong') }, |
| | | { title: '安全', value: 'safety', icon: $r('app.media.classification_safety') }, |
| | | { title: '云计算', value: 'cloudcalc', icon: $r('app.media.classification_cloudcalc') }, |
| | | { title: '存储', value: 'storage', icon: $r('app.media.classification_storage') }, |
| | | { title: '鲲鹏', value: 'roc', icon: $r('app.media.classification_roc') }, |
| | | { title: 'AI', value: 'AI', icon: $r('app.media.classification_AI') }, |
| | | { title: '连接', value: 'link', icon: $r('app.media.classification_link') }, |
| | | { title: '大数据', value: 'bigdata', icon: $r('app.media.classification_bigdata') }, |
| | | { title: '云服务', value: 'cloudservice', icon: $r('app.media.classification_cloudservice') }, |
| | | { title: '更多', value: '', icon: $r('app.media.classification_more') }, |
| | | ] |
| | | @State activityList: Activity[] = [ |
| | | { title: '北京人工智能IE', timeScope: '20250520-20250620', signupCount: 80, statusText: '报名中' }, |
| | | { title: '北京人工智能IE', timeScope: '20250520-20250620', signupCount: 80, statusText: '进行中' }, |
| | | { title: '北京人工智能IE', timeScope: '20250520-20250620', signupCount: 80, statusText: '已结束' }, |
| | | { title: '北京人工智能IE', timeScope: '20250520-20250620', signupCount: 80, statusText: '报名中' }, |
| | | { title: '北京人工智能IE', timeScope: '20250520-20250620', signupCount: 80, statusText: '已结束' }, |
| | | ] |
| | | @State activityList: Activity[] = [] |
| | | @State courseList: Course[] = [ |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: 'Java高级:JVM深度调优与JVM深度调优', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: 'Java高级:JVM深度调优与JVM深度调优', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | // { title: '零基础到企业级项目实战', 'desc': '针对零基础小白或想升级技术栈的前端从业者,从核心语法入手,逐步深入Vue3组件开发打件开发件开发', count: '800', time: '01:30:23', difficult: '简单' }, |
| | | |
| | | ] |
| | | |
| | |
| | | |
| | | getTagFontColor(statusText: string) { |
| | | switch (statusText) { |
| | | case '报名中': |
| | | case 'signup': |
| | | return '#10920e' |
| | | case '进行中': |
| | | case 'training': |
| | | return '#ffa100' |
| | | default : |
| | | return '#666666' |
| | | } |
| | | } |
| | | |
| | | getTagBgColor(statusText: string) { |
| | | switch (statusText) { |
| | | case '报名中': |
| | | getTagBgColor(status: string) { |
| | | switch (status) { |
| | | case 'signup': |
| | | return '#d5f2db' |
| | | case '进行中': |
| | | case 'training': |
| | | return '#fff0cc' |
| | | default : |
| | | return '#ebebeb' |
| | | } |
| | | } |
| | | |
| | | getStatusText(status: string) { |
| | | if (status == 'signup') { |
| | | return '报名中' |
| | | } else if (status == 'training') { |
| | | return '进行中' |
| | | } else if (status == 'finished') { |
| | | return '已结束' |
| | | } |
| | | return '' |
| | | } |
| | | |
| | | aboutToAppear(): void { |
| | | this.getBannerList() |
| | | this.getActivityList() |
| | | this.getCourseList() |
| | | } |
| | | |
| | | getBannerList() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | "http://192.168.20.70:8080/quiz-community/public/v1.0/home/slideshows", |
| | | { |
| | | method: http.RequestMethod.GET, |
| | | header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` }, |
| | | }, |
| | | (err, data) => { |
| | | console.log('response', '/home/slideshows') |
| | | console.log(JSON.stringify(data.result)) |
| | | if (data.responseCode == 200) { |
| | | const resData = (typeof data.result == 'string' ? JSON.parse(data.result) : data.result) as HttpResponseResult<SwiperItem[]> |
| | | if (resData.code == 200) { |
| | | this.swiperList = resData.data || [] |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | getActivityList() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | "http://192.168.20.70:8080/quiz-community/public/v1.0/home/hotTraining", |
| | | { |
| | | method: http.RequestMethod.GET, |
| | | header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` }, |
| | | }, |
| | | (err, data) => { |
| | | console.log('response', '/home/hotTraining') |
| | | console.log(JSON.stringify(data.result)) |
| | | if (data.responseCode == 200) { |
| | | const resData = (typeof data.result == 'string' ? JSON.parse(data.result) : data.result) as HttpResponseResult<Activity[]> |
| | | if (resData.code == 200) { |
| | | this.activityList = resData.data || [] |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | getCourseList() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | "http://192.168.20.70:8080/quiz-community/public/v1.0/home/courses", |
| | | { |
| | | method: http.RequestMethod.GET, |
| | | header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` }, |
| | | }, |
| | | (err, data) => { |
| | | console.log('response', '/home/courses') |
| | | console.log(JSON.stringify(data.result)) |
| | | if (data.responseCode == 200) { |
| | | const resData = (typeof data.result == 'string' ? JSON.parse(data.result) : data.result) as HttpResponseResult<Course[]> |
| | | if (resData.code == 200) { |
| | | this.courseList = resData.data || [] |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | build() { |
| | |
| | | TabContent() { |
| | | Column({ space: 10 }){ |
| | | Swiper() { |
| | | ForEach(this.swiperList, (item: Resource) => { |
| | | Image(item) |
| | | ForEach(this.swiperList, (item: SwiperItem) => { |
| | | Image(item.pic) |
| | | .width('100%') |
| | | .height(120) |
| | | .backgroundColor(0xAFEEEE) |
| | | .onClick(() => { |
| | | this.getUIContext().getRouter().pushUrl({ |
| | | router.push({ |
| | | url: 'pages/home/BannerDetail', |
| | | params: { |
| | | id: index |
| | | bannerId: item.id |
| | | } |
| | | }) |
| | | }) |
| | |
| | | .fontWeight(500) |
| | | } |
| | | .onClick(() => { |
| | | if (!item.value) return |
| | | router.pushUrl({ |
| | | url: 'pages/home/ClassificationDetail', |
| | | params: { |
| | | title: item.title |
| | | moduleName: item.value |
| | | } |
| | | }) |
| | | }) |
| | |
| | | ListItem() { |
| | | Row() { |
| | | Column({ space: 6 }) { |
| | | Text(item.title) |
| | | Text(item.name) |
| | | .fontSize(12) |
| | | .fontWeight(500) |
| | | Row() { |
| | | Image($r('app.media.date_icon')) |
| | | .width(12) |
| | | .height(12) |
| | | Text(item.timeScope) |
| | | Text(`${item.startDate}-${item.endTime}`) |
| | | .fontSize(10) |
| | | .fontColor('#676767') |
| | | .margin({ left: 4 }) |
| | |
| | | Text(`${item.signupCount || 0}人已报名`) |
| | | .fontSize(10) |
| | | .fontColor('#676767') |
| | | Text(item.statusText) |
| | | Text(this.getStatusText(item.status)) |
| | | .fontSize(10) |
| | | .fontWeight(500) |
| | | .padding(6) |
| | | .borderRadius(10) |
| | | .fontColor(this.getTagFontColor(item.statusText)) |
| | | .backgroundColor(this.getTagBgColor(item.statusText)) |
| | | .fontColor(this.getTagFontColor(item.status)) |
| | | .backgroundColor(this.getTagBgColor(item.status)) |
| | | } |
| | | .height('100%') |
| | | .justifyContent(FlexAlign.Start) |
| | |
| | | .divider({ strokeWidth: 1, color: '#e8e8e8' }) // 每行之间的分界线 |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | .height(300) |
| | | .height(360) |
| | | } |
| | | .height('100%') |
| | | } |
| | |
| | | ListItem() { |
| | | Row({ space: 10 }) { |
| | | Column() { |
| | | Text(item.title) |
| | | Text(item.name) |
| | | .fontSize(14) |
| | | .fontWeight(800) |
| | | .maxLines(1) |
| | | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| | | Text(item.desc) |
| | | Text(item.description) |
| | | .fontSize(12) |
| | | .fontColor('#666666') |
| | | .maxLines(2) |
| | |
| | | Image($r('app.media.person_icon')) |
| | | .width(10) |
| | | .height(10) |
| | | Text(item.count) |
| | | Text(`${item.playCount}`) |
| | | .fontSize(10) |
| | | .fontColor('#666666') |
| | | } |
| | |
| | | Image($r('app.media.video_icon')) |
| | | .width(10) |
| | | .height(10) |
| | | Text(item.time) |
| | | Text(`${item.duration}`) |
| | | .fontSize(10) |
| | | .fontColor('#666666') |
| | | } |
| | | Text() { |
| | | Span('课程难度: ') |
| | | Span(item.difficult) |
| | | Span(`${item.difficulty}`) |
| | | } |
| | | .fontSize(10) |
| | | .fontColor('#666666') |
| | |
| | | import { UserInfoBase } from '../../data/UserInfoBase' |
| | | import { promptAction } from '@kit.ArkUI' |
| | | import { promptAction, router } from '@kit.ArkUI' |
| | | import PreferencesUtils from '../../utils/PreferencesUtils' |
| | | import http from '@ohos.net.http'; |
| | | import { HttpResponseResult } from '../../data/HttpResponse'; |
| | |
| | | PreferencesUtils.putPreferences('UserInfo','user',JSON.stringify(this.userInfoData)) |
| | | AppStorage.SetOrCreate('x-jwt-token', resData.data?.token) |
| | | promptAction.showToast({ message: '登录成功' }) |
| | | router.push({ |
| | | url: 'pages/MainPage' |
| | | }) |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | |
| | | import { CommonConstantWX } from '../../common/CommonConstantWX' |
| | | import { WxMessageBase } from '../../data/WxMessageBase' |
| | | import { WxUserInfoBase } from '../../data/WxUserInfoBase' |
| | | import { TitleUtils } from '../../utils/TitleUtils' |
| | | import { router } from '@kit.ArkUI' |
| | | |
| | | /** |
| | | * @ProjectName : HealthNS |
| | | * @FileName : MessageDetailsPage |
| | | * @UserName : 修梦 |
| | | * @Time : 2025/9/14 16:35 |
| | | * @Description : 文件描述 |
| | | */ |
| | | class Message { |
| | | avatar: string | Resource = '' |
| | | content: string = '' |
| | | isMe: boolean = false |
| | | } |
| | | |
| | | @Entry |
| | | @Component |
| | | struct MessageDetailsPage { |
| | | @State msgData: Array<WxMessageBase> = CommonConstantWX.mUserMessage |
| | | @State mContent:string = '' |
| | | private mScroller: Scroller = new Scroller() |
| | | @State mUserInfo: WxUserInfoBase = new WxMessageBase() |
| | | @State messageList: Message[] = [ |
| | | { avatar: '', content: '请发一下你的简历给我。', isMe: false }, |
| | | { avatar: '', content: '这个岗位我十分感兴趣,请看一下我的简历,我觉得我可以胜任这个岗位', isMe: true }, |
| | | |
| | | ] |
| | | aboutToAppear(): void { |
| | | let params = this.getUIContext().getRouter().getParams() as Record<string,WxUserInfoBase> |
| | | this.mUserInfo = params.userInfo |
| | | |
| | | } |
| | | build() { |
| | | RelativeContainer(){ |
| | | TitleUtils({titleName:this.mUserInfo.name}) |
| | | .id('heard') |
| | | List({space: 15,scroller:this.mScroller}){ |
| | | ForEach(this.msgData,(item: WxMessageBase) => { |
| | | ListItem(){ |
| | | MessageDetailsItem({item: item,icon: this.mUserInfo.img}) |
| | | } |
| | | }) |
| | | } |
| | | .id('list') |
| | | .alignRules({ |
| | | top:{anchor: 'heard',align: VerticalAlign.Bottom}, |
| | | bottom: {anchor: 'rowBottom',align: VerticalAlign.Top} |
| | | }) |
| | | .padding(10) |
| | | Row({space: 5}){ |
| | | Image($r('app.media.wx_voice_icon')).MessageImageSty() |
| | | TextArea({text: this.mContent}) |
| | | .backgroundColor(Color.White) |
| | | .borderRadius(5) |
| | | .width('70%') |
| | | .offset({y: 5}) |
| | | .onChange((value: string) => { |
| | | this.mContent = value |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Image($r('app.media.wx_smile_icon')).MessageImageSty() |
| | | if (this.mContent.trim().length === 0 || !this.mContent){ |
| | | Image($r('app.media.wx_more_icon')).MessageImageSty() |
| | | } else { |
| | | Button(){ |
| | | Text('发送') |
| | | .fontSize(15) |
| | | .fontColor(Color.White) |
| | | } |
| | | .padding(5) |
| | | //发送数据,添加到了聊天列表 |
| | | .onClick(() =>{ |
| | | this.msgData.push({ |
| | | id: 99, |
| | | content: this.mContent, |
| | | img: $r('app.media.avatar_icon1'), |
| | | category: 1 |
| | | }) |
| | | this.mContent = '' |
| | | //滚动到底部 |
| | | this.mScroller.scrollToIndex(this.msgData.length - 1) |
| | | }) |
| | | Column() { |
| | | Text('李女士') |
| | | .fontSize(16) |
| | | .fontWeight(700) |
| | | Text('摩米移动科技') |
| | | .fontSize(12) |
| | | .fontColor('#666666') |
| | | .margin({ top: 4 }) |
| | | } |
| | | |
| | | Row() |
| | | } |
| | | .width('100%') |
| | | .alignItems(VerticalAlign.Bottom) |
| | | .padding(10) |
| | | .backgroundColor("#ffe9e6e6") |
| | | .id('rowBottom') |
| | | .alignRules({ |
| | | bottom: {anchor: '__container__',align: VerticalAlign.Bottom} |
| | | }) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | .backgroundColor('#fff') |
| | | |
| | | Column() { |
| | | List({ space: 20, initialIndex: 0 }){ |
| | | ForEach(this.messageList, (item: Message) => { |
| | | ListItem() { |
| | | if (item.isMe) { |
| | | Row({ space: 10 }) { |
| | | Text(item.content) |
| | | .fontSize(14) |
| | | .fontColor(Color.White) |
| | | .fontWeight(500) |
| | | .backgroundColor('#1761f4') |
| | | .padding(10) |
| | | .borderRadius({ topLeft: 12, topRight: 12, bottomLeft: 12 }) |
| | | .constraintSize({ maxWidth: 250 }) |
| | | Image($r('app.media.me_icon')) |
| | | .width(32) |
| | | .height(32) |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.End) |
| | | .alignItems(VerticalAlign.Bottom) |
| | | } else { |
| | | Row({ space: 10 }) { |
| | | Image($r('app.media.avatar')) |
| | | .width(32) |
| | | .height(32) |
| | | Text(item.content) |
| | | .fontSize(14) |
| | | .fontColor(Color.Black) |
| | | .fontWeight(500) |
| | | .backgroundColor('#FFF') |
| | | .padding(10) |
| | | .borderRadius({ topLeft: 12, topRight: 12, bottomRight: 12 }) |
| | | .constraintSize({ maxWidth: 250 }) |
| | | } |
| | | .width('100%') |
| | | .alignItems(VerticalAlign.Bottom) |
| | | .justifyContent(FlexAlign.Start) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | | .friction(0.6) |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | } |
| | | .padding(16) |
| | | .width('100%') |
| | | .height(600) |
| | | |
| | | Row({ space: 8 }) { |
| | | Image($r('app.media.audio_icon')) |
| | | .width(24) |
| | | .height(24) |
| | | TextInput() |
| | | .width(240) |
| | | .placeholderColor('#999999') |
| | | .backgroundColor('#f3f7fe') |
| | | Image($r('app.media.expression_icon')) |
| | | .width(24) |
| | | .height(24) |
| | | Image($r('app.media.add_icon')) |
| | | .width(24) |
| | | .height(24) |
| | | } |
| | | .backgroundColor('#FFF') |
| | | .width('100%') |
| | | .height(60) |
| | | .padding(10) |
| | | .alignItems(VerticalAlign.Center) |
| | | |
| | | } |
| | | .width('100%') |
| | | .height('100%') |
| | | .backgroundColor('#ccc') |
| | | .backgroundColor('#f5f5f7') |
| | | } |
| | | } |
| | | |
| | | @Component |
| | | struct MessageDetailsItem { |
| | | @Prop item: WxMessageBase |
| | | @Prop icon: ResourceStr |
| | | build() { |
| | | if (this.item.category === 0){ |
| | | Row({space:5}){ |
| | | Image(this.icon) |
| | | .width(40) |
| | | .height(40) |
| | | Text(this.item.content) |
| | | .backgroundColor(Color.White) |
| | | .padding(5) |
| | | } |
| | | .width('78%') |
| | | } else { |
| | | Row({space:5}){ |
| | | Row(){ |
| | | Text(this.item.content) |
| | | .backgroundColor("#ff3cc12e") |
| | | .padding(5) |
| | | } |
| | | .justifyContent(FlexAlign.End) |
| | | .width('78%') |
| | | Image($r('app.media.avatar_icon1')) |
| | | .width(40) |
| | | .height(40) |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.End) |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | @Extend(Image) |
| | | function MessageImageSty() { |
| | | .width(25) |
| | | .height(25) |
| | | .objectFit(ImageFit.Fill) |
| | | } |
| | | } |
| | |
| | | import { router } from "@kit.ArkUI" |
| | | |
| | | class Message { |
| | | avatar: string | Resource = '' |
| | | name: string = '' |
| | | company: string = '' |
| | | desc: string = '' |
| | | price: string = '' |
| | | } |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct MessagePage { |
| | | @State messageList: Message[] = [ |
| | | { avatar: '', name: '李女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...' }, |
| | | { avatar: '', name: '林先生', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...' }, |
| | | { avatar: '', name: '吴女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...' } |
| | | { avatar: '', name: '李女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '林先生', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '吴女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K' }, |
| | | { avatar: '', name: '李女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '林先生', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '吴女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K' }, |
| | | { avatar: '', name: '李女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '林先生', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '吴女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K' }, |
| | | { avatar: '', name: '李女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '林先生', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '吴女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K' }, |
| | | { avatar: '', name: '李女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '林先生', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K·14薪' }, |
| | | { avatar: '', name: '吴女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我...', price: '20-35K' }, |
| | | ] |
| | | |
| | | build() { |
| | |
| | | |
| | | List({ space: 10, initialIndex: 0 }){ |
| | | ForEach(this.messageList, (item: Message) => { |
| | | |
| | | ListItem() { |
| | | Row() { |
| | | Image($r('app.media.avatar')) |
| | | .width(40) |
| | | .height(40) |
| | | .margin({ right: 10 }) |
| | | Column() { |
| | | Row({ space: 6 }) { |
| | | Text(item.name) |
| | | .fontSize(14) |
| | | Text(item.company) |
| | | .maxLines(1) |
| | | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| | | .fontColor('#999999') |
| | | .width(150) |
| | | .fontSize(12) |
| | | Text(item.price) |
| | | .width(80) |
| | | .fontColor('#999999') |
| | | .fontSize(12) |
| | | .textAlign(TextAlign.End) |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.Start) |
| | | Text(item.desc) |
| | | .fontColor('#999999') |
| | | .fontSize(13) |
| | | .maxLines(1) |
| | | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| | | .width('100%') |
| | | } |
| | | .height('100%') |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | .width(290) |
| | | } |
| | | .width('100%') |
| | | .height(40) |
| | | .margin({ top: 10, bottom: 10 }) |
| | | .onClick(() => { |
| | | router.pushUrl({ |
| | | url: 'pages/message/MessageDetailsPage' |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | .height('100%') |
| | | .padding({top:10}) |
| | | .margin({bottom: 30}) |
| | | .backgroundColor(Color.White) |
| | | .divider({strokeWidth: 2,color: '#ccc'}) |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | | .friction(0.6) |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | .height(560) |
| | | .divider({strokeWidth: 1,color: '#f0f0f0'}) |
| | | } |
| | | .height('100%') |
| | | .width('100%') |
| | |
| | | "pages/home/ClassificationDetail", |
| | | "pages/home/ActiveDetail", |
| | | "pages/search/SearchPage", |
| | | "pages/message/MessagePage" |
| | | "pages/message/MessagePage", |
| | | "pages/message/MessageDetailsPage", |
| | | "pages/account/UserInfoPage", |
| | | "pages/account/LearningRecordPage", |
| | | "pages/account/SettingPage", |
| | | "pages/account/MessagePushPage", |
| | | "pages/account/AboutPage" |
| | | ] |
| | | } |
| | |
| | | "lockfileVersion": 3, |
| | | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |
| | | "specifiers": { |
| | | "@luvi/html2md@^1.0.0": "@luvi/html2md@1.0.3", |
| | | "@luvi/lv-markdown-in@^2.0.15": "@luvi/lv-markdown-in@2.0.15", |
| | | "@mcui/mccharts@^2.8.9": "@mcui/mccharts@2.8.9", |
| | | "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", |
| | | "@ohos/hypium@1.0.21": "@ohos/hypium@1.0.21" |
| | | "@ohos/hypium@1.0.21": "@ohos/hypium@1.0.21", |
| | | "@wuyan/hm_chart@^2.0.4": "@wuyan/hm_chart@2.0.4" |
| | | }, |
| | | "packages": { |
| | | "@luvi/html2md@1.0.3": { |
| | | "name": "", |
| | | "version": "1.0.3", |
| | | "integrity": "sha512-BBa2FqQKQ48dBmG+n2z63IGpbIV4Gc/g5Qj1FGssZ6ki+DHqYknZ46FRVRJeKtrfmCjYoiiKx5FtBjOuqnwbtA==", |
| | | "resolved": "https://ohpm.openharmony.cn/ohpm/@luvi/html2md/-/html2md-1.0.3.har", |
| | | "registryType": "ohpm" |
| | | }, |
| | | "@luvi/lv-markdown-in@2.0.15": { |
| | | "name": "", |
| | | "version": "2.0.15", |
| | | "integrity": "sha512-PSM3/BybA7QkYwiRUaxmsMdzBXyyz3AAQmdy84PzdTLo0t8AH7oOo4j01C6LvvnX0OzaQ6T3pFIpMOUqGxWEZg==", |
| | | "resolved": "https://ohpm.openharmony.cn/ohpm/@luvi/lv-markdown-in/-/lv-markdown-in-2.0.15.har", |
| | | "registryType": "ohpm", |
| | | "dependencies": { |
| | | "@luvi/html2md": "^1.0.0" |
| | | } |
| | | }, |
| | | "@mcui/mccharts@2.8.9": { |
| | | "name": "", |
| | | "version": "2.8.9", |
| | | "integrity": "sha512-mdpzc6TlYlR/xV+OH3u0Jq5s1UeND8EKQuyXUdtjPMozffrbitPWJcp5N4Fji9v1xs8d/WP62OKnbp79iWMtHA==", |
| | | "resolved": "https://ohpm.openharmony.cn/ohpm/@mcui/mccharts/-/mccharts-2.8.9.har", |
| | | "registryType": "ohpm" |
| | | }, |
| | | "@ohos/hamock@1.0.0": { |
| | | "name": "", |
| | | "version": "1.0.0", |
| | |
| | | "integrity": "sha512-iyKGMXxE+9PpCkqEwu0VykN/7hNpb+QOeIuHwkmZnxOpI+dFZt6yhPB7k89EgV1MiSK/ieV/hMjr5Z2mWwRfMQ==", |
| | | "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.21.har", |
| | | "registryType": "ohpm" |
| | | }, |
| | | "@wuyan/hm_chart@2.0.4": { |
| | | "name": "", |
| | | "version": "2.0.4", |
| | | "integrity": "sha512-fjyE05RpY0splKSNe5HWA4XHcQ4hZFyoKsJCQu27H8B7AvzCp3UcO5Y+Gsb+hfmg5kItNzVl3RkwUZ2klX2ffg==", |
| | | "resolved": "https://ohpm.openharmony.cn/ohpm/@wuyan/hm_chart/-/hm_chart-2.0.4.har", |
| | | "registryType": "ohpm" |
| | | } |
| | | } |
| | | } |
| | |
| | | "modelVersion": "5.0.5", |
| | | "description": "Please describe the basic information.", |
| | | "dependencies": { |
| | | "@wuyan/hm_chart": "^2.0.4", |
| | | "@mcui/mccharts": "^2.8.9", |
| | | "@luvi/lv-markdown-in": "^2.0.15" |
| | | }, |
| | | "devDependencies": { |
| | | "@ohos/hypium": "1.0.21", |
| | | "@ohos/hamock": "1.0.0" |
| | | } |
| | | } |
| | | }, |
| | | "dynamicDependencies": {} |
| | | } |