1 文件已重命名
19个文件已修改
4个文件已添加
| | |
| | | } else if (this.selectIndex == 2){ |
| | | MessagePage() |
| | | } else if (this.selectIndex == 3){ |
| | | AccountPage() |
| | | AccountPage({ selectIndex: this.selectIndex }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | import { router } from "@kit.ArkUI" |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct AboutPage { |
| | | struct AboutPage { |
| | | build() { |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('关于') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | import { ComponentContent, router } from "@kit.ArkUI" |
| | | import { ComponentContent, promptAction, router } from "@kit.ArkUI" |
| | | import { PromptActionClass } from '../../utils/PromptActionClass'; |
| | | import { http } from "@kit.NetworkKit"; |
| | | import { HttpResponseResult } from "../../data/HttpResponse"; |
| | | import { common } from "@kit.AbilityKit"; |
| | | import { ROMAIN } from "../../utils/config"; |
| | | |
| | | export class UserInfo { |
| | | nickName: string = '' |
| | | mobilePhone: string = '' |
| | | age: string = '' |
| | | gender: string = '' |
| | | job: string = '' |
| | | preferJob: string = '' |
| | | introduce: string = '' |
| | | } |
| | | class accountListItem { |
| | | title: string = '' |
| | | icon: string | Resource = '' |
| | |
| | | .backgroundColor(Color.White) |
| | | } |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct AccountPage { |
| | | @State ListItems: accountListItem[] = [ |
| | |
| | | private contentNode: ComponentContent<Object> = |
| | | new ComponentContent(this.ctx, wrapBuilder(buildText), new DialogParams((this.dialogMessage))); |
| | | params: DialogParams = new DialogParams('注册成功') |
| | | @State userInfo: UserInfo = { |
| | | nickName: '', |
| | | mobilePhone: '', |
| | | age: '', |
| | | gender: '', |
| | | job: '', |
| | | preferJob: '', |
| | | introduce: '', |
| | | } |
| | | @Link selectIndex: number | undefined; |
| | | |
| | | aboutToAppear(): void { |
| | | PromptActionClass.setContext(this.ctx); |
| | | PromptActionClass.setContentNode(this.contentNode); |
| | | PromptActionClass.setOptions({ alignment: DialogAlignment.Center, offset: { dx: 0, dy: 0 } }); |
| | | this.getUserInfo() |
| | | } |
| | | |
| | | getUserInfo() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/userinfo`, |
| | | { |
| | | method: http.RequestMethod.GET, |
| | | header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` }, |
| | | }, |
| | | (err, data) => { |
| | | console.log('response', '/users/userinfo') |
| | | console.log(JSON.stringify(data.result)) |
| | | if (data.responseCode == 200) { |
| | | const resData = (typeof data.result == 'string' ? JSON.parse(data.result) : data.result) as HttpResponseResult<UserInfo> |
| | | if (resData.code == 200) { |
| | | this.userInfo = resData.data as UserInfo |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | build() { |
| | | Column() { |
| | | Text('个人中心') |
| | |
| | | .width(50) |
| | | .height(50) |
| | | Column() { |
| | | Text('李强') |
| | | Text(this.userInfo.nickName || '李强') |
| | | .fontSize(16) |
| | | .width('100%') |
| | | .fontWeight(600) |
| | | .fontColor(Color.Black) |
| | | .textAlign(TextAlign.Start) |
| | | Text('男 | 28岁 | 前端开发工程师') |
| | | Text(`${this.userInfo.gender || '男'} | ${this.userInfo.age || 28}岁 | ${this.userInfo.job || '前端开发工程师'}`) |
| | | .fontColor('#333333') |
| | | .fontSize(14) |
| | | .width('100%') |
| | |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | .layoutWeight(1) |
| | | Image($r('app.media.chevron_right')) |
| | | .width(18) |
| | | .height(18) |
| | | .width(14) |
| | | .height(14) |
| | | } |
| | | .width('100%') |
| | | .onClick(() =>{ |
| | | router.pushUrl({ |
| | | url: '' |
| | | url: 'pages/account/UserInfoPage' |
| | | }) |
| | | }) |
| | | |
| | |
| | | .backgroundColor(Color.White) |
| | | .padding({ left: 10, right: 10, top: 4, bottom: 4 }) |
| | | .fontColor('#1756f4') |
| | | .onClick(() => { |
| | | this.selectIndex = 1 |
| | | }) |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | |
| | | Row() { |
| | | Text('当前学习级别:青铜') |
| | | .width('100%') |
| | | .fontColor(Color.White) |
| | | .fontSize(14) |
| | | Image($r('app.media.bronze_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .margin({ left: 6 }) |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.Start) |
| | | |
| | | Row() { |
| | | Column({ space: 4 }) { |
| | | Text('学习时长') |
| | |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | } |
| | | .onClick(() => { |
| | | router.pushUrl({ |
| | | url: 'pages/account/LearningRecordPage' |
| | | }) |
| | | }) |
| | | |
| | | Column({ space: 6 }) { |
| | | Image($r('app.media.account_course')) |
| | | .width(40) |
| | |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | } |
| | | .onClick(() => { |
| | | router.pushUrl({ |
| | | url: 'pages/account/CourseCollection' |
| | | }) |
| | | }) |
| | | |
| | | Column({ space: 6 }) { |
| | | Image($r('app.media.account_vitae')) |
| | | .width(40) |
| | |
| | | .fontWeight(500) |
| | | .fontColor(Color.Black) |
| | | } |
| | | .onClick(() => { |
| | | router.pushUrl({ |
| | | url: 'pages/account/PersonVitae' |
| | | }) |
| | | }) |
| | | |
| | | Column({ space: 6 }) { |
| | | Image($r('app.media.account_communicated')) |
| | | .width(40) |
| | |
| | | .onClick(() => { |
| | | if (item.title == '隐私设置') { |
| | | router.pushUrl({ |
| | | url: '' |
| | | url: 'pages/account/SettingPage' |
| | | }) |
| | | } else if (item.title == '消息通知') { |
| | | |
| | | router.pushUrl({ |
| | | url: 'pages/account/MessagePushPage' |
| | | }) |
| | | } 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 == '关于我们') { |
| | | |
| | | router.pushUrl({ |
| | | url: 'pages/account/AboutPage' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | .width('100%') |
| | | .fontColor(Color.White) |
| | | .backgroundColor('#1761f4') |
| | | .onClick(() => { |
| | | (getContext(this) as common.UIAbilityContext)?.terminateSelf() |
| | | }) |
| | | } |
| | | .padding(16) |
| | | .width('100%') |
| | | .background(Color.White) |
| | | .backgroundColor(Color.White) |
| | | .height(300) |
| | | |
| | | } |
| | |
| | | import { router } from '@kit.ArkUI' |
| | | |
| | | class Course { |
| | | title: string = '' |
| | |
| | | } |
| | | @Entry |
| | | @Component |
| | | export struct CourseCollection { |
| | | 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: '简单' }, |
| | |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('课程收藏') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | import { McLineChart, Options } from '@mcui/mccharts' |
| | | import { router } from '@kit.ArkUI' |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct LearningRecordPage { |
| | | struct LearningRecordPage { |
| | | @State maxData: number[] = [0, 0, 0, 5, 0, 5, 0] |
| | | // 初始化数据 |
| | | @State seriesOption: Options = new Options({ |
| | |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('学习记录') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | import { router } from '@kit.ArkUI' |
| | | |
| | | class MessageItem { |
| | | icon: string | Resource = '' |
| | |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct MessagePushPage { |
| | | struct MessagePushPage { |
| | | @State messagePushFlag: boolean = false |
| | | @State autoUpdateFlag: boolean = false |
| | | @State messageList: MessageItem[] = [ |
| | |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('消息通知') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | import { router } from '@kit.ArkUI' |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct CourseCollection { |
| | | struct PersonVitae { |
| | | build() { |
| | | Column() { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('个人简历') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | import { router } from '@kit.ArkUI' |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct SettingPage { |
| | | struct SettingPage { |
| | | @State messagePushFlag: boolean = false |
| | | @State autoUpdateFlag: boolean = false |
| | | build() { |
| | |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('隐私设置') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | import { promptAction, router } from "@kit.ArkUI" |
| | | import { http } from "@kit.NetworkKit" |
| | | import { HttpResponseResult } from "../../data/HttpResponse" |
| | | import { ROMAIN } from "../../utils/config" |
| | | import { UserInfo } from "./AccountPage" |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct UserInfo { |
| | | struct UserInfoPage { |
| | | @State nickName: string = '' |
| | | @State gender: string = '' |
| | | @State age: string = '' |
| | | @State preferJob: string = '' |
| | | @State job: string = '' |
| | | @State introduce: string = '' |
| | | @State userInfo: UserInfo = { |
| | | nickName: '', |
| | | mobilePhone: '', |
| | | age: '', |
| | | gender: '', |
| | | job: '', |
| | | preferJob: '', |
| | | introduce: '', |
| | | } |
| | | |
| | | aboutToAppear(): void { |
| | | this.getUserInfo() |
| | | } |
| | | |
| | | getUserInfo() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/userinfo`, |
| | | { |
| | | method: http.RequestMethod.GET, |
| | | header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` }, |
| | | }, |
| | | (err, data) => { |
| | | console.log('response', '/users/userinfo') |
| | | console.log(JSON.stringify(data.result)) |
| | | if (data.responseCode == 200) { |
| | | const resData = (typeof data.result == 'string' ? JSON.parse(data.result) : data.result) as HttpResponseResult<UserInfo> |
| | | if (resData.code == 200) { |
| | | this.userInfo = resData.data as UserInfo |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | saveInfo() { |
| | | let httpRequest = http.createHttp(); |
| | | let postData: UserInfo = { |
| | | nickName: this.userInfo.nickName, |
| | | mobilePhone: '', |
| | | age: this.userInfo.age, |
| | | gender: this.userInfo.gender, |
| | | job: this.userInfo.job, |
| | | preferJob: this.userInfo.preferJob, |
| | | introduce: this.userInfo.introduce |
| | | } |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/userinfo`, |
| | | { |
| | | method: http.RequestMethod.PUT, |
| | | header: { 'Content-Type': 'application/json' }, |
| | | extraData: postData |
| | | }, |
| | | (err, data) => { |
| | | console.log('response', '/users/userinfo') |
| | | 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) { |
| | | promptAction.showToast({ message: '保存成功' }) |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | build() { |
| | | Column() { |
| | |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('个人信息') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.nickName }) |
| | | TextInput({ placeholder: '请输入', text: $$this.userInfo.nickName }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.gender }) |
| | | TextInput({ placeholder: '请输入', text: $$this.userInfo.gender }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.age }) |
| | | TextInput({ placeholder: '请输入', text: $$this.userInfo.age }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.job }) |
| | | TextInput({ placeholder: '请输入', text: $$this.userInfo.job }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | |
| | | .fontSize(14) |
| | | .fontColor('#666666') |
| | | .width('100%') |
| | | TextInput({ placeholder: '请输入', text: this.preferJob }) |
| | | TextInput({ placeholder: '请输入', text: $$this.userInfo.preferJob }) |
| | | .placeholderFont({ size: 14 }) |
| | | .showUnderline(true) |
| | | .margin({ top: -6 }) |
| | |
| | | .fontColor('#666666') |
| | | .fontSize(14) |
| | | .width('100%') |
| | | TextArea({ placeholder: '介绍一下你自己吧~', text: this.job }) |
| | | TextArea({ placeholder: '介绍一下你自己吧~', text: this.userInfo.introduce }) |
| | | .placeholderFont({ size: 14 }) |
| | | .backgroundColor('#fff') |
| | | .border({ width: 1, color: '#666666' }) |
| | | .borderRadius(5) |
| | | .minLines(10) |
| | | .maxLength(200) |
| | | .constraintSize({ minHeight: 200 }) |
| | | .showCounter(true) |
| | | .margin({ top: 10 }) |
| | | } |
| | |
| | | .width('100%') |
| | | .fontColor(Color.White) |
| | | .backgroundColor('#1761f4') |
| | | .onClick(() => { |
| | | this.saveInfo() |
| | | }) |
| | | |
| | | } |
| | | .height('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" |
| | | import { ROMAIN } from "../../utils/config" |
| | | |
| | | class Activity { |
| | | id: string = '' |
| | | name: string = '' |
| | | pic: string = '' |
| | | startDate: string = '' |
| | | endTime: string = '' |
| | | signupCount: number = 0 |
| | | status: string = '' |
| | | content: string = '' |
| | | } |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct ActiveDetail { |
| | | @State index: number = 0 |
| | | @State hotTrainingId: string = '' |
| | | @State activeInfo: Activity = { |
| | | id: '', |
| | | name: '', |
| | | pic: '', |
| | | startDate: '', |
| | | endTime: '', |
| | | signupCount: 0, |
| | | status: '', |
| | | content: '', |
| | | } |
| | | aboutToAppear(): void { |
| | | interface Params { |
| | | index: number |
| | | id: string |
| | | } |
| | | const params: Params = router.getParams() as Params |
| | | this.index = params.index |
| | | this.hotTrainingId = params.id |
| | | this.getDetail() |
| | | } |
| | | |
| | | getDetail() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/home/hotTraining/details?hotTrainingId=${this.hotTrainingId}`, |
| | | { |
| | | 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/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<Activity> |
| | | if (resData.code == 200) { |
| | | this.activeInfo = resData.data as Activity |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | 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 '' |
| | | } |
| | | |
| | | build() { |
| | |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | | .height(20) |
| | | .onClick(() => { |
| | | router.back() |
| | | }) |
| | | Text('详情页') |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | |
| | | .height(150) |
| | | |
| | | Column({ space: 14 }) { |
| | | Text('北京人工智能IE') |
| | | Text(this.activeInfo.name) |
| | | .fontWeight(800) |
| | | .width('100%') |
| | | |
| | | Row({ space: 10 }) { |
| | | Text('报名中') |
| | | Text(this.getStatusText(this.activeInfo.status)) |
| | | .fontSize(10) |
| | | .fontWeight(500) |
| | | .padding({ left: 4, right: 4, top: 2, bottom: 2 }) |
| | | .borderRadius(10) |
| | | .fontColor(this.getTagFontColor('报名中')) |
| | | .backgroundColor(this.getTagBgColor('报名中')) |
| | | .fontColor(this.getTagFontColor(this.activeInfo.status)) |
| | | .backgroundColor(this.getTagBgColor(this.activeInfo.status)) |
| | | Row() { |
| | | Image($r('app.media.date_icon')) |
| | | .width(12) |
| | | .height(12) |
| | | Text('20250520-20250620') |
| | | Text(`${this.activeInfo.startDate}-${this.activeInfo.endTime}`) |
| | | .fontSize(10) |
| | | .fontColor('#676767') |
| | | .margin({ left: 4 }) |
| | | } |
| | | Text(`80人已报名`) |
| | | Text(`${this.activeInfo.signupCount}人已报名`) |
| | | .fontSize(10) |
| | | .fontColor('#676767') |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.Start) |
| | | |
| | | Text('课程介绍') |
| | | LvMarkdownIn({ text: this.activeInfo.content }) |
| | | .width('100%') |
| | | .fontSize(14) |
| | | .fontWeight(800) |
| | | |
| | | Text('本课程是计算机网络技术、通信技术等专业的专业核心课程,旨在培养学生的网络技术职业能力、职业素养和创新能力。' + |
| | | '\n采用项目式实训教学,通过引入一个循序渐进的企业网络组建案例,让学生在模拟真实场景中掌握中小型企业网络组建的知识和能力' + |
| | | '教材内容覆盖华为“1+X”证书考试要求,包含大量实操练习。') |
| | | .width('100%') |
| | | .fontSize(13) |
| | | .lineHeight(20) |
| | | .height(560) |
| | | .padding({ left: 10, right: 10 }) |
| | | } |
| | | .padding(14) |
| | | |
| | | |
| | | |
| | | } |
| | | .width('100%') |
| | | .height('100%') |
| | |
| | | import { http } from "@kit.NetworkKit"; |
| | | import { HttpResponseResult } from "../../data/HttpResponse"; |
| | | import { LvMarkdownIn } from "@luvi/lv-markdown-in" |
| | | import { ROMAIN } from "../../utils/config"; |
| | | |
| | | class BannerInfo { |
| | | pic: string = '' |
| | |
| | | } |
| | | |
| | | 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}`, |
| | | `${ROMAIN}/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')}` }, |
| | |
| | | LvMarkdownIn({ text: this.bannerInfo.content.toString() }) |
| | | .width('100%') |
| | | .height(560) |
| | | .padding({ left: 10, right: 10 }) |
| | | |
| | | } |
| | | .width('100%') |
| | |
| | | import { http } from "@kit.NetworkKit" |
| | | import { LvMarkdownIn } from "@luvi/lv-markdown-in" |
| | | import { HttpResponseResult } from "../../data/HttpResponse" |
| | | import { ROMAIN } from "../../utils/config" |
| | | |
| | | @Entry |
| | | @Component |
| | |
| | | getDetail() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `http://192.168.20.70:8080/quiz-community/public/v1.0/home/module/details?moduleName=${this.moduleName}`, |
| | | `${ROMAIN}/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')}` }, |
| | |
| | | LvMarkdownIn({ text: this.content.toString() }) |
| | | .width('100%') |
| | | .height(560) |
| | | .padding({ left: 10, right: 10 }) |
| | | } |
| | | .width('100%') |
| | | .height('100%') |
| | |
| | | import http from '@ohos.net.http'; |
| | | import { HttpResponseResult } from "../../data/HttpResponse"; |
| | | import { JSON } from "@kit.ArkTS"; |
| | | import { ROMAIN } from "../../utils/config"; |
| | | |
| | | class TabBarBase { |
| | | title: string = '' |
| | |
| | | { title: '更多', value: '', icon: $r('app.media.classification_more') }, |
| | | ] |
| | | @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: '简单' }, |
| | | |
| | | ] |
| | | @State origCourseList: Course[] = [] |
| | | @State courseList: Course[] = [] |
| | | @State @Watch('filterCourseList') searchKeyword: string = '' |
| | | |
| | | @Builder tabBarItem(name:string,index: number){ |
| | | Row(){ |
| | |
| | | return '' |
| | | } |
| | | |
| | | getDifficultText(difficult: number) { |
| | | if (difficult == 1) { |
| | | return '简单' |
| | | } else if (difficult == 2) { |
| | | return '中等' |
| | | } else if (difficult == 3) { |
| | | return '困难' |
| | | } |
| | | return '' |
| | | } |
| | | |
| | | filterCourseList() { |
| | | if (this.searchKeyword) { |
| | | let list = this.origCourseList.filter((ele: Course) => { |
| | | return ele.name.includes(this.searchKeyword) || ele.description.includes(this.searchKeyword) |
| | | }) |
| | | this.courseList = list |
| | | } else { |
| | | this.courseList = this.origCourseList |
| | | } |
| | | } |
| | | |
| | | aboutToAppear(): void { |
| | | this.getBannerList() |
| | | this.getActivityList() |
| | |
| | | getBannerList() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | "http://192.168.20.70:8080/quiz-community/public/v1.0/home/slideshows", |
| | | `${ROMAIN}/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')}` }, |
| | |
| | | getActivityList() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | "http://192.168.20.70:8080/quiz-community/public/v1.0/home/hotTraining", |
| | | `${ROMAIN}/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')}` }, |
| | |
| | | getCourseList() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | "http://192.168.20.70:8080/quiz-community/public/v1.0/home/courses", |
| | | `${ROMAIN}/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')}` }, |
| | |
| | | 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 || [] |
| | | this.origCourseList = resData.data || [] |
| | | this.filterCourseList() |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | |
| | | router.pushUrl({ |
| | | url: 'pages/home/ActiveDetail', |
| | | params: { |
| | | index: index |
| | | id: item.id |
| | | } |
| | | }) |
| | | }) |
| | |
| | | Image($r('app.media.search_icon')) |
| | | .width(14) |
| | | .height(14) |
| | | TextInput({ placeholder: '搜索想要查找的内容' }) |
| | | TextInput({ placeholder: '搜索想要查找的内容', text: $$this.searchKeyword }) |
| | | .placeholderFont({ size: 14}) |
| | | .placeholderColor('#999999') |
| | | .backgroundColor('#f3f7fe') |
| | |
| | | } |
| | | Text() { |
| | | Span('课程难度: ') |
| | | Span(`${item.difficulty}`) |
| | | Span(this.getDifficultText(item.difficulty)) |
| | | } |
| | | .fontSize(10) |
| | | .fontColor('#666666') |
| | |
| | | .friction(0.6) |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | .height(530) |
| | | |
| | | .height(580) |
| | | } |
| | | .height('100%') |
| | | }.tabBar(this.tabBarItem(item.title, index)) |
| | |
| | | import http from '@ohos.net.http'; |
| | | import { HttpResponseResult } from '../../data/HttpResponse'; |
| | | import { JSON } from '@kit.ArkTS'; |
| | | import { ROMAIN } from '../../utils/config'; |
| | | |
| | | /** |
| | | * @Description : 登录页 |
| | |
| | | } |
| | | |
| | | httpRequest.request( |
| | | "http://192.168.20.70:8080/quiz-community/public/v1.0/users/login", |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/login`, |
| | | { |
| | | method: http.RequestMethod.PUT, |
| | | header: { 'Content-Type': 'application/json' }, |
| | |
| | | import { HttpResponseResult } from '../../data/HttpResponse'; |
| | | import { ComponentContent } from '@kit.ArkUI'; |
| | | import { PromptActionClass } from '../../utils/PromptActionClass'; |
| | | import { ROMAIN } from '../../utils/config'; |
| | | |
| | | class DialogParams { |
| | | text: string = ""; |
| | |
| | | } |
| | | |
| | | httpRequest.request( |
| | | "http://192.168.20.70:8080/quiz-community/public/v1.0/users/register", |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/register`, |
| | | { |
| | | method: http.RequestMethod.POST, |
| | | header: { 'Content-Type': 'application/json' }, |
| | |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } else { |
| | | promptAction.showToast({ message: err.message }) |
| | | } |
| | | } |
| | | ) |
| | |
| | | @State messageList: Message[] = [ |
| | | { avatar: '', content: '请发一下你的简历给我。', isMe: false }, |
| | | { avatar: '', content: '这个岗位我十分感兴趣,请看一下我的简历,我觉得我可以胜任这个岗位', isMe: true }, |
| | | |
| | | ] |
| | | aboutToAppear(): void { |
| | | @State avatar: string | Resource = '' |
| | | @State name: string = '' |
| | | @State company: string = '' |
| | | @State pageHeight: number = 0 |
| | | @State chatHeight: number = 0 |
| | | @State inputText: string = '' |
| | | |
| | | aboutToAppear(): void { |
| | | interface Params { |
| | | avatar: string | Resource |
| | | name: string |
| | | company: string |
| | | } |
| | | const params: Params = router.getParams() as Params |
| | | this.name = params.name |
| | | this.company = params.company |
| | | this.avatar = params.avatar |
| | | } |
| | | |
| | | build() { |
| | | Column() { |
| | | Flex({ direction: FlexDirection.Column }) { |
| | | Row() { |
| | | Image($r('app.media.left_icon')) |
| | | .width(20) |
| | |
| | | router.back() |
| | | }) |
| | | Column() { |
| | | Text('李女士') |
| | | Text(this.name) |
| | | .fontSize(16) |
| | | .fontWeight(700) |
| | | Text('摩米移动科技') |
| | | Text(this.company) |
| | | .fontSize(12) |
| | | .fontColor('#666666') |
| | | .margin({ top: 4 }) |
| | | } |
| | | |
| | | Row() |
| | | } |
| | | .width('100%') |
| | | .padding(10) |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | | .backgroundColor('#fff') |
| | | .expandSafeArea() |
| | | |
| | | Column() { |
| | | List({ space: 20, initialIndex: 0 }){ |
| | |
| | | .alignItems(VerticalAlign.Bottom) |
| | | } else { |
| | | Row({ space: 10 }) { |
| | | Image($r('app.media.avatar')) |
| | | Image(this.avatar) |
| | | .width(32) |
| | | .height(32) |
| | | Text(item.content) |
| | |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | } |
| | | .layoutWeight(1) |
| | | .padding(16) |
| | | .width('100%') |
| | | .height(600) |
| | | .expandSafeArea() |
| | | |
| | | Row({ space: 8 }) { |
| | | Image($r('app.media.audio_icon')) |
| | | .width(24) |
| | | .height(24) |
| | | TextInput() |
| | | .width(240) |
| | | TextInput({ text: $$this.inputText }) |
| | | .layoutWeight(1) |
| | | .placeholderColor('#999999') |
| | | .backgroundColor('#f3f7fe') |
| | | Image($r('app.media.expression_icon')) |
| | | .width(24) |
| | | .height(24) |
| | | if (this.inputText) { |
| | | Button('发送') |
| | | .type(ButtonType.Normal) |
| | | .borderRadius(6) |
| | | .onClick(() => { |
| | | this.messageList.push({ |
| | | avatar: '', content: this.inputText, isMe: true |
| | | }) |
| | | this.inputText = '' |
| | | }) |
| | | } else { |
| | | 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%') |
| | |
| | | @Entry |
| | | @Component |
| | | export struct MessagePage { |
| | | @State messageList: Message[] = [ |
| | | { 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' }, |
| | | @State origMessageList: Message[] = [ |
| | | { avatar: $r('app.media.avatar1'), name: '李女士', company: '摩米移动科技|移动端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我觉得我可以胜任这个岗位', price: '20-35K·14薪' }, |
| | | { avatar: $r('app.media.avatar2'), name: '林先生', company: '云枢前端技术有限公司|高级开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我觉得我可以胜任这个岗位', price: '20-40K·14薪' }, |
| | | { avatar: $r('app.media.avatar3'), name: '吴女士', company: '擎岳后端科技|后端开发工程师', desc: '这个岗位我十分感兴趣,请看一下我的简历,我觉得我可以胜任这个岗位', price: '20-35K·13薪' }, |
| | | ] |
| | | @State @Watch('filterMessageList') searchKeyword: string = '' |
| | | @State messageList: Message[] = [] |
| | | |
| | | filterMessageList() { |
| | | if (this.searchKeyword) { |
| | | let list = this.origMessageList.filter((ele: Message) => { |
| | | return ele.name.includes(this.searchKeyword) || ele.company.includes(this.searchKeyword) |
| | | }) |
| | | this.messageList = list |
| | | } else { |
| | | this.messageList = this.origMessageList |
| | | } |
| | | } |
| | | |
| | | aboutToAppear(): void { |
| | | this.filterMessageList() |
| | | } |
| | | |
| | | build() { |
| | | Column({space: 10}) { |
| | |
| | | Image($r('app.media.search_icon')) |
| | | .width(14) |
| | | .height(14) |
| | | TextInput({ placeholder: '搜索想要查找的岗位' }) |
| | | TextInput({ placeholder: '搜索相关岗位', text: $$this.searchKeyword }) |
| | | .placeholderFont({ size: 14}) |
| | | .placeholderColor('#999999') |
| | | .backgroundColor('#f3f7fe') |
| | |
| | | ForEach(this.messageList, (item: Message) => { |
| | | ListItem() { |
| | | Row() { |
| | | Image($r('app.media.avatar')) |
| | | Image(item.avatar) |
| | | .width(40) |
| | | .height(40) |
| | | .margin({ right: 10 }) |
| | |
| | | .margin({ top: 10, bottom: 10 }) |
| | | .onClick(() => { |
| | | router.pushUrl({ |
| | | url: 'pages/message/MessageDetailsPage' |
| | | url: 'pages/message/MessageDetailsPage', |
| | | params: { |
| | | avatar: item.avatar, |
| | | name: item.name, |
| | | company: item.company |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | |
| | | .friction(0.6) |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | .height(560) |
| | | .height(610) |
| | | .divider({strokeWidth: 1,color: '#f0f0f0'}) |
| | | } |
| | | .height('100%') |
| | |
| | | import { IconType } from "@kit.ArkUI" |
| | | import { IconType, promptAction } from "@kit.ArkUI" |
| | | import { http } from "@kit.NetworkKit" |
| | | import { LvMarkdownIn } from "@luvi/lv-markdown-in" |
| | | import { HttpResponseResult } from "../../data/HttpResponse" |
| | | import { ROMAIN } from "../../utils/config" |
| | | |
| | | class JobItem { |
| | | title: string = '' |
| | | payment: string = '' |
| | | tagList: string[] = [] |
| | | company: string = '' |
| | | address: string = '' |
| | | detail: string = '' |
| | | ability: string = '' |
| | | addr: string = '' |
| | | companyName: string = '' |
| | | degree: string = '' |
| | | exp: string = '' |
| | | jobName: string = '' |
| | | salary: string = '' |
| | | } |
| | | |
| | | @Entry |
| | | @Component |
| | | export struct SearchPage { |
| | | @State jobList: JobItem[] = [ |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k-40k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k-40k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | { title: '高级前端开发工程师(Vue3+TS方向)', payment: '25k · 14薪', tagList: ['1-3年', '本科及以上'], company: '云舒技术有限公司', address: '深圳市 南山区 蛇口', detail: '' }, |
| | | ] |
| | | @State expandIndex: number | null = 0 |
| | | @State jobList: JobItem[] = [] |
| | | @State expandIndex: number | null = null |
| | | @State @Watch('filterJobList') searchKeyword: string = '' |
| | | @State origJobList: JobItem[] = [] |
| | | |
| | | aboutToAppear(): void { |
| | | this.getJobList() |
| | | } |
| | | |
| | | getJobList() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/home/seek/job`, |
| | | { |
| | | method: http.RequestMethod.GET, |
| | | header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` }, |
| | | }, |
| | | (err, data) => { |
| | | console.log('response', '/home/seek/job') |
| | | console.log(JSON.stringify(data.result)) |
| | | if (data.responseCode == 200) { |
| | | const resData = (typeof data.result == 'string' ? JSON.parse(data.result) : data.result) as HttpResponseResult<JobItem[]> |
| | | if (resData.code == 200) { |
| | | this.origJobList = resData.data as JobItem[] |
| | | this.filterJobList() |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |
| | | } |
| | | } |
| | | ) |
| | | } |
| | | |
| | | filterJobList() { |
| | | if (this.searchKeyword) { |
| | | let list = this.origJobList.filter((ele: JobItem) => { |
| | | return ele.companyName.includes(this.searchKeyword) || ele.jobName.includes(this.searchKeyword) |
| | | }) |
| | | this.jobList = list |
| | | } else { |
| | | this.jobList = this.origJobList |
| | | } |
| | | } |
| | | |
| | | build() { |
| | | Column({ space: 10 }) { |
| | |
| | | Image($r('app.media.search_icon')) |
| | | .width(14) |
| | | .height(14) |
| | | TextInput({ placeholder: '搜索想要查找的岗位' }) |
| | | TextInput({ placeholder: '搜索想要查找的岗位', text: $$this.searchKeyword }) |
| | | .placeholderFont({ size: 14}) |
| | | .placeholderColor('#999999') |
| | | .backgroundColor('#f3f7fe') |
| | |
| | | Column() { |
| | | Row({ space: 10 }) { |
| | | Column() { |
| | | Text(item.title) |
| | | .fontSize(14) |
| | | .fontWeight(800) |
| | | Text(item.jobName) |
| | | .fontSize(18) |
| | | .fontWeight(700) |
| | | Row({ space: 10 }) { |
| | | ForEach(item.tagList, (tag: string) => { |
| | | Text(tag) |
| | | Text(item.exp) |
| | | .padding(4) |
| | | .borderRadius(4) |
| | | .fontSize(10) |
| | | .fontSize(12) |
| | | .fontColor('#999999') |
| | | .backgroundColor('#f5f5f5') |
| | | }) |
| | | Text(item.degree) |
| | | .padding(4) |
| | | .borderRadius(4) |
| | | .fontSize(12) |
| | | .fontColor('#999999') |
| | | .backgroundColor('#f5f5f5') |
| | | } |
| | | .width('100%') |
| | | .justifyContent(FlexAlign.Start) |
| | |
| | | .width(16) |
| | | .height(16) |
| | | |
| | | Text(item.company) |
| | | .fontSize(10) |
| | | Text(item.companyName) |
| | | .fontSize(12) |
| | | |
| | | } |
| | | } |
| | |
| | | .alignItems(HorizontalAlign.Start) |
| | | |
| | | Column() { |
| | | Text(item.payment) |
| | | Text(item.salary) |
| | | .fontColor('#1756f4') |
| | | .fontSize(14) |
| | | .fontWeight(800) |
| | | Text(item.address) |
| | | .fontSize(16) |
| | | .fontWeight(700) |
| | | Text(item.addr) |
| | | .fontColor('#a6a6a6') |
| | | .fontSize(10) |
| | | .fontSize(12) |
| | | } |
| | | .height('100%') |
| | | .justifyContent(FlexAlign.SpaceBetween) |
| | |
| | | |
| | | Row() { |
| | | Text() { |
| | | Span(this.expandIndex == index ? '收起' : '展开') |
| | | Span(this.expandIndex == index ? '收起' : '查看') |
| | | Span('岗位要求') |
| | | } |
| | | .fontSize(10) |
| | | .fontSize(12) |
| | | .fontColor('#666666') |
| | | Image(this.expandIndex == index ? $r('app.media.down_icon') : $r('app.media.up_icon')) |
| | | Image(this.expandIndex == index ? $r('app.media.up_icon') : $r('app.media.down_icon')) |
| | | .width(14) |
| | | .height(14) |
| | | .margin({ left: 4 }) |
| | |
| | | .margin({ top: 10 }) |
| | | .width('100%') |
| | | .textAlign(TextAlign.Start) |
| | | Text('1.学历要求:本科及以上学历,计算机科学与技术、软件工程等相关专业优先,优秀大专学历者' + |
| | | '1.学历要求:本科及以上学历,计算机科学与技术、软件工程等相关专业优先,优秀大专学历者') |
| | | .fontSize(10) |
| | | .margin({ top: 6 }) |
| | | .fontColor('#666666') |
| | | .lineHeight(15) |
| | | LvMarkdownIn({ text: item.ability }) |
| | | .width('100%') |
| | | .textAlign(TextAlign.Start) |
| | | .padding({ left: 10, right: 10 }) |
| | | } |
| | | |
| | | |
| | | } |
| | | .padding(10) |
| | | .border({ width: 1, style: BorderStyle.Solid, color: this.expandIndex == index ? '#1756f4' : '#f2f2f2' }) |
| | |
| | | .friction(0.6) |
| | | .edgeEffect(EdgeEffect.Spring) |
| | | .width('100%') |
| | | .height(560) |
| | | |
| | | .height(600) |
| | | } |
| | | .padding({ left: 10, right: 10 }) |
| | | .height('100%') |
New file |
| | |
| | | export const ROMAIN = 'http://192.168.20.70:8080' |
| | |
| | | "pages/message/MessageDetailsPage", |
| | | "pages/account/UserInfoPage", |
| | | "pages/account/LearningRecordPage", |
| | | "pages/account/CourseCollection", |
| | | "pages/account/PersonVitae", |
| | | "pages/account/SettingPage", |
| | | "pages/account/MessagePushPage", |
| | | "pages/account/AboutPage" |