diff --git a/src/api/home.ts b/src/api/home.ts index e5272dc..3b39499 100644 --- a/src/api/home.ts +++ b/src/api/home.ts @@ -35,7 +35,22 @@ export const HomeApi = { return request<{ data: Curriculum[], total: number }>('/home/v1/course/course', "GET", {page, page_size}) }, /** 健康管理 */ + healthTop(count: number) { + return request('/home/v1/health/top', "GET", {count}) + }, health(page: number, page_size: number) { return request<{ data: Health[], total: number }>('/home/v1/health/index', "GET", {page, page_size}) + }, + /** 增加播放量 */ + healthSetPlay(id) { + return request(`/home/v1/health/set_play/${id}`, "PUT") + }, + /** 品牌 */ + brand(page: number, page_size: number) { + return request<{ data: Brand[], total: number }>('/home/v1/brand/list', "GET", {page, page_size}) + }, + /** 技能 */ + skillTop(count: number) { + return request('/home/v1/skill/top', "GET", {count}) } } diff --git a/src/app.config.ts b/src/app.config.ts index 0bd7fb5..86b7b99 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -59,6 +59,8 @@ export default defineAppConfig({ 'curHistory/curHistory', 'hourHistory/hourHistory', 'courType/courType', + 'videoFull/videoFull', // 资源id 视频全屏 + 'sort/sort', // 公共二级分类 ] }, { diff --git a/src/components/videoCover/videoCover.scss b/src/components/videoCover/videoCover.scss index b9e734b..df662ed 100644 --- a/src/components/videoCover/videoCover.scss +++ b/src/components/videoCover/videoCover.scss @@ -44,7 +44,7 @@ Image { width: 100%; - //height: 100%; + background: #eee; } } diff --git a/src/pages/business/sort/sort.config.ts b/src/pages/business/sort/sort.config.ts new file mode 100644 index 0000000..f54b62b --- /dev/null +++ b/src/pages/business/sort/sort.config.ts @@ -0,0 +1,3 @@ +export default definePageConfig({ + navigationBarTitleText: '分类' +}) diff --git a/src/pages/business/sort/sort.tsx b/src/pages/business/sort/sort.tsx new file mode 100644 index 0000000..f01c221 --- /dev/null +++ b/src/pages/business/sort/sort.tsx @@ -0,0 +1,21 @@ +import {FC} from "react"; +import {View} from "@tarojs/components"; +import {useRouter} from "@tarojs/taro"; + +type SortType = '' + +interface Params { + id: number + type: SortType + jumpUrl: () => void +} + +const Sort: FC = () => { + const params = useRouter().params as unknown as Params + + return ( + ds + ) +} + +export default Sort diff --git a/src/pages/business/videoFull/videoFull.config.ts b/src/pages/business/videoFull/videoFull.config.ts new file mode 100644 index 0000000..82334a5 --- /dev/null +++ b/src/pages/business/videoFull/videoFull.config.ts @@ -0,0 +1,6 @@ +export default definePageConfig({ + navigationBarTitleText: ' ', + backgroundColor:'#000000', + navigationBarTextStyle:'white', + navigationBarBackgroundColor:'#000000' +}) diff --git a/src/pages/business/videoFull/videoFull.tsx b/src/pages/business/videoFull/videoFull.tsx new file mode 100644 index 0000000..c88333b --- /dev/null +++ b/src/pages/business/videoFull/videoFull.tsx @@ -0,0 +1,27 @@ +import {Video} from "@tarojs/components"; +import {FC} from "react"; +import Taro from "@tarojs/taro"; + +interface Props { + url: string +} + +const VideoFull: FC = () => { + const {url} = Taro.useRouter().params + return ( +