| | |
| | | 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) |