| | |
| | | import { http } from "@kit.NetworkKit"; |
| | | import { HttpResponseResult } from "../../data/HttpResponse"; |
| | | import { common } from "@kit.AbilityKit"; |
| | | import { ROMAIN } from "../../utils/config"; |
| | | import { DOMAIN } from "../../utils/config"; |
| | | |
| | | export class UserInfo { |
| | | nickName: string = '' |
| | |
| | | getUserInfo() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/userinfo`, |
| | | `${DOMAIN}/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')}` }, |
| | |
| | | .border({ width: 1, style: BorderStyle.Solid, color: '#f2f2f2' }) |
| | | .borderRadius(10) |
| | | } |
| | | }, (index: number) => index.toString()) |
| | | }) |
| | | } |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | |
| | | import { promptAction, router } from "@kit.ArkUI" |
| | | import { http } from "@kit.NetworkKit" |
| | | import { HttpResponseResult } from "../../data/HttpResponse" |
| | | import { ROMAIN } from "../../utils/config" |
| | | import { DOMAIN } from "../../utils/config" |
| | | import { UserInfo } from "./AccountPage" |
| | | |
| | | @Entry |
| | |
| | | getUserInfo() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/userinfo`, |
| | | `${DOMAIN}/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')}` }, |
| | |
| | | introduce: this.userInfo.introduce |
| | | } |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/userinfo`, |
| | | `${DOMAIN}/quiz-community/public/v1.0/users/userinfo`, |
| | | { |
| | | method: http.RequestMethod.PUT, |
| | | header: { 'Content-Type': 'application/json' }, |
| | |
| | | import { http } from "@kit.NetworkKit" |
| | | import { LvMarkdownIn } from "@luvi/lv-markdown-in" |
| | | import { HttpResponseResult } from "../../data/HttpResponse" |
| | | import { ROMAIN } from "../../utils/config" |
| | | import { DOMAIN } from "../../utils/config" |
| | | |
| | | class Activity { |
| | | id: string = '' |
| | |
| | | getDetail() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/home/hotTraining/details?hotTrainingId=${this.hotTrainingId}`, |
| | | `${DOMAIN}/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')}` }, |
| | |
| | | import { http } from "@kit.NetworkKit"; |
| | | import { HttpResponseResult } from "../../data/HttpResponse"; |
| | | import { LvMarkdownIn } from "@luvi/lv-markdown-in" |
| | | import { ROMAIN } from "../../utils/config"; |
| | | import { DOMAIN } from "../../utils/config"; |
| | | |
| | | class BannerInfo { |
| | | pic: string = '' |
| | |
| | | getDetail() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/home/slideshows/details?bannerId=${this.bannerId}`, |
| | | `${DOMAIN}/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')}` }, |
| | |
| | | import { http } from "@kit.NetworkKit" |
| | | import { LvMarkdownIn } from "@luvi/lv-markdown-in" |
| | | import { HttpResponseResult } from "../../data/HttpResponse" |
| | | import { ROMAIN } from "../../utils/config" |
| | | import { DOMAIN } from "../../utils/config" |
| | | |
| | | @Entry |
| | | @Component |
| | |
| | | getDetail() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/home/module/details?moduleName=${this.moduleName}`, |
| | | `${DOMAIN}/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')}` }, |
| | |
| | | import http from '@ohos.net.http'; |
| | | import { HttpResponseResult } from "../../data/HttpResponse"; |
| | | import { JSON } from "@kit.ArkTS"; |
| | | import { ROMAIN } from "../../utils/config"; |
| | | import { DOMAIN } from "../../utils/config"; |
| | | |
| | | class TabBarBase { |
| | | title: string = '' |
| | |
| | | getBannerList() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/home/slideshows`, |
| | | `${DOMAIN}/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( |
| | | `${ROMAIN}/quiz-community/public/v1.0/home/hotTraining`, |
| | | `${DOMAIN}/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( |
| | | `${ROMAIN}/quiz-community/public/v1.0/home/courses`, |
| | | `${DOMAIN}/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')}` }, |
| | |
| | | }) |
| | | }) |
| | | } |
| | | }, (index: number) => index.toString()) |
| | | }) |
| | | } |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | |
| | | .border({ width: 1, style: BorderStyle.Solid, color: '#f2f2f2' }) |
| | | .borderRadius(10) |
| | | } |
| | | }, (index: number) => index.toString()) |
| | | }) |
| | | } |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | |
| | | import http from '@ohos.net.http'; |
| | | import { HttpResponseResult } from '../../data/HttpResponse'; |
| | | import { JSON } from '@kit.ArkTS'; |
| | | import { ROMAIN } from '../../utils/config'; |
| | | import { DOMAIN } from '../../utils/config'; |
| | | |
| | | /** |
| | | * @Description : 登录页 |
| | |
| | | } |
| | | |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/login`, |
| | | `${DOMAIN}/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'; |
| | | import { DOMAIN } from '../../utils/config'; |
| | | |
| | | class DialogParams { |
| | | text: string = ""; |
| | |
| | | } |
| | | |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/users/register`, |
| | | `${DOMAIN}/quiz-community/public/v1.0/users/register`, |
| | | { |
| | | method: http.RequestMethod.POST, |
| | | header: { 'Content-Type': 'application/json' }, |
| | |
| | | import { http } from "@kit.NetworkKit" |
| | | import { LvMarkdownIn } from "@luvi/lv-markdown-in" |
| | | import { HttpResponseResult } from "../../data/HttpResponse" |
| | | import { ROMAIN } from "../../utils/config" |
| | | import { DOMAIN } from "../../utils/config" |
| | | |
| | | class JobItem { |
| | | ability: string = '' |
| | |
| | | getJobList() { |
| | | let httpRequest = http.createHttp(); |
| | | httpRequest.request( |
| | | `${ROMAIN}/quiz-community/public/v1.0/home/seek/job`, |
| | | `${DOMAIN}/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')}` }, |
| | |
| | | return ele.companyName.includes(this.searchKeyword) || ele.jobName.includes(this.searchKeyword) |
| | | }) |
| | | this.jobList = list |
| | | console.log(JSON.stringify(list)) |
| | | } else { |
| | | this.jobList = this.origJobList |
| | | } |
| | |
| | | .border({ width: 1, style: BorderStyle.Solid, color: this.expandIndex == index ? '#1756f4' : '#f2f2f2' }) |
| | | .borderRadius(10) |
| | | } |
| | | }, (index: number) => index.toString()) |
| | | }) |
| | | } |
| | | .listDirection(Axis.Vertical) // 排列方向 |
| | | .scrollBar(BarState.Off) |
| | |
| | | export const ROMAIN = 'http://192.168.20.70:8080' |
| | | // export const DOMAIN = 'http://192.168.20.70:8080' |
| | | export const DOMAIN = 'http://124.70.31.13:7776' |