diff --git a/src/api/brand.ts b/src/api/brand.ts index 4848853..2ee9b29 100644 --- a/src/api/brand.ts +++ b/src/api/brand.ts @@ -11,7 +11,8 @@ export type BrandRecord = { introductory_video_resource: any article_count: number created_at: string - page_view:number + page_view: number + collect: boolean } export type ArticleRecord = { title: string @@ -19,6 +20,7 @@ export type ArticleRecord = { created_at: string content: string brands: BrandRecord[] + collect:boolean } export const brandApi = { diff --git a/src/app.config.ts b/src/app.config.ts index 8e40f9d..74d8a60 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -91,7 +91,6 @@ export default defineAppConfig({ 'videoFull/videoFull', // 资源id 视频全屏 'illness/sort/sort', 'illness/list/list', - 'illness/article/article', 'webView/webView', 'search/search/index', 'collect/collect', // 收藏列表 diff --git a/src/components/collect/collect.module.scss b/src/components/collect/collect.module.scss index 3262142..5ac8c34 100644 --- a/src/components/collect/collect.module.scss +++ b/src/components/collect/collect.module.scss @@ -3,11 +3,68 @@ align-items: center; color: #909795; font-size: 24rpx; + padding: 0 10rpx; +} + +.collectImage { + position: relative; + width: 32rpx; + height: 32rpx; + margin-right: 10rpx; Image { - width: 32rpx; - height: 32rpx; - margin-right: 10rpx; - //vertical-align: middle; + width: 100%; + height: 100%; + } +} + +.zoom { + top: 0; + left: 0; + position: absolute; + content: ''; + width: 32rpx; + height: 32rpx; + border-radius: 50%; + border: 1px solid #FF9E5F; + animation: Zooms 300ms ease forwards; + opacity: 1; + transform-origin: -100%, -100% 0; +} + +.pulse { + animation: Pulse 300ms; +} + +@keyframes Zooms { + 0% { + transform: scale(1); + } + 30% { + transform: scale(1.5); + left: -5%; + top: -5%; + opacity: 1; + } + 100% { + transform: scale(1.5); + left: -5%; + top: -5%; + opacity: 0; + } +} + +@keyframes Pulse { + 0% { + transform: scale(.2); + } + 60% { + transform: scale(1.2); + } + 80% { + transform: scale(.8); + } + 100% { + transform: scale(1); } } diff --git a/src/components/collect/collect.tsx b/src/components/collect/collect.tsx index 3c000a6..78c90fc 100644 --- a/src/components/collect/collect.tsx +++ b/src/components/collect/collect.tsx @@ -1,20 +1,57 @@ -import {FC} from "react"; +import {CSSProperties, FC, useCallback, useEffect, useState} from "react"; import star from '@/static/img/star.png' import starLine from '@/static/img/starLine.png' import {Image, View} from "@tarojs/components"; import styles from './collect.module.scss' +import {Profile} from "@/store" +import Taro from "@tarojs/taro"; +import {userApi} from "@/api"; interface Props { onClick?: () => void select?: boolean + stylesImage?: CSSProperties + styles?: CSSProperties + owner_id: number + owner_type: CreateOwnerType + textHidden?: boolean } /** 收藏 */ const Collect: FC = (props) => { + const {token} = Profile.useContainer() + const [loading, setLoading] = useState(false) + const [select, setSelect] = useState(props.select) + + useEffect(() => { + setSelect(props.select) + }, [props]) + + const change = useCallback(async () => { + if (!token) { + Taro.navigateTo({url: '/pages/login/login'}) + return + } + if (loading) return; + props.onClick?.() + console.log(select) + setSelect(!select) + setLoading(true) + await userApi.create({owner_id: props.owner_id, owner_type: props.owner_type}) + setTimeout(() => { + setLoading(false) + }, 300) + }, [loading, token, select]) + return ( - - - {props.select ? '已收藏' : '收藏'} + + + + + + {!props.textHidden && (select ? '已收藏' : '收藏')} ) } diff --git a/src/pages/business/videoInfo/components/catalogue.tsx b/src/pages/business/videoInfo/components/catalogue.tsx index 55a1a5b..fe66310 100644 --- a/src/pages/business/videoInfo/components/catalogue.tsx +++ b/src/pages/business/videoInfo/components/catalogue.tsx @@ -12,6 +12,8 @@ import hourRecord from "@/static/img/hourRecord.png" import CustomPageContainer from "@/components/custom-page-container/custom-page-container"; import {Profile} from "@/store"; import LoginView from "@/components/loginView"; +import Collect from "@/components/collect/collect"; +import omit from '@/static/img/omit.png' interface Props { data: CourseDepData | null @@ -45,11 +47,6 @@ const Catalogue: FC = ({data, setHors, id, playId}) => { } }) - - // function onPause() { - // videoEvents.setVideoState('pause') - // } - function jumCurHistory() { if (playId) { Taro.navigateTo({url: `/pages/business/hourHistory/hourHistory?courseId=${id}&hourId=${playId}`}) @@ -195,7 +192,15 @@ const Catalogue: FC = ({data, setHors, id, playId}) => { playing ? 播放中 : 立即学习 } - setShow(true)}>... + + setShow(true)}> + + 更多 + } diff --git a/src/pages/business/videoInfo/videoInfo.scss b/src/pages/business/videoInfo/videoInfo.scss index 1874753..ce38d75 100644 --- a/src/pages/business/videoInfo/videoInfo.scss +++ b/src/pages/business/videoInfo/videoInfo.scss @@ -76,6 +76,7 @@ } .Videobutton { + align-items: center; display: flex; background: #fff; position: fixed; @@ -84,6 +85,8 @@ bottom: env(safe-area-inset-bottom); box-sizing: border-box; padding: 10px 20px; + color: #909795; + font-size: 24rpx; } .more { diff --git a/src/pages/home/components/curRecommended.tsx b/src/pages/home/components/curRecommended.tsx index d80a496..700786d 100644 --- a/src/pages/home/components/curRecommended.tsx +++ b/src/pages/home/components/curRecommended.tsx @@ -9,19 +9,9 @@ import Img from "@/components/image/image"; import {beforeTime} from "@/utils/time"; const toArticlePage = (d: any) => { - console.log({d}) - switch (d.owner_type) { - case 1: - Taro.navigateTo({ - url: `/pages/preview/brand/article/article?id=${d.id}` - }) - return - case 2: - Taro.navigateTo({ - url: `/pages/preview/illness/article/article?id=${d.id}` - }) - return - } + Taro.navigateTo({ + url: `/pages/preview/brand/article/article?id=${d.id}` + }) } const CurRecommended: FC = () => { diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 91bbaad..65c7e62 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -8,6 +8,7 @@ import NavigationBar from "@/components/navigationBar/navigationBar"; import Spin from "@/components/spinner"; import Img from "@/components/image/image"; import {beforeTime} from "@/utils/time"; +import {isBoolean} from "@tarojs/shared"; const category: TabList[] = [ {title: "企选课程", value: 'is_required'}, @@ -42,7 +43,7 @@ const AuditMode: FC = () => { const [enable, setEnable] = useState(true) useEffect(() => { publicApi.course({page: 1, pageSize: 10}).then(res => { - setAuditMode(res.audit_mode) + setAuditMode(isBoolean(res.audit_mode) ? res.audit_mode : res.audit_mode === 'true') setArticles(res.articles) setEnable(false) }) diff --git a/src/pages/preview/brand/article/article.module.scss b/src/pages/preview/brand/article/article.module.scss index c6d9d5f..f88807c 100644 --- a/src/pages/preview/brand/article/article.module.scss +++ b/src/pages/preview/brand/article/article.module.scss @@ -38,6 +38,26 @@ } } +.botmBox { + z-index: 99; + position: fixed; + bottom: 0; + width: 690rpx; + height: 100rpx; + padding: 0 30rpx env(safe-area-inset-bottom); + display: flex; + justify-content: flex-end; + align-items: center; + background: #F5F8F7; + color: #909795; + + View { + font-size: 26rpx; + padding: 0 10px; + text-align: center; + } +} + .article { font-size: 30rpx; display: flex; @@ -52,3 +72,10 @@ font-size: 40rpx; margin-bottom: 50rpx; } + +.articleBox { + background: #fff; + min-height: calc(100vh - env(safe-area-inset-bottom) + 180rpx); + box-sizing: border-box; + padding: 30rpx 30rpx calc(env(safe-area-inset-bottom) + 150rpx) 30rpx; +} diff --git a/src/pages/preview/brand/article/article.tsx b/src/pages/preview/brand/article/article.tsx index f8b72a6..9b41257 100644 --- a/src/pages/preview/brand/article/article.tsx +++ b/src/pages/preview/brand/article/article.tsx @@ -1,5 +1,5 @@ import {FC, useCallback, useEffect, useMemo, useState} from "react"; -import {Image, Text, View} from "@tarojs/components"; +import {Image, PageContainer, Text, View} from "@tarojs/components"; import Taro, {useRouter} from "@tarojs/taro"; import {ArticleRecord, brandApi} from "@/api"; import styles from "./article.module.scss"; @@ -10,6 +10,8 @@ import Empty from "@/components/empty/empty"; import Spin from "@/components/spinner"; import {beforeTime} from "@/utils/time"; import Img from "@/components/image/image"; +import Collect from "@/components/collect/collect"; +import catalogue from "@/static/img/catalogue.png"; const article: FC = () => { @@ -18,9 +20,12 @@ const article: FC = () => { const {id} = useRouter().params as unknown as { id: number } const [articleInfo, setArticleInfo] = useState() const [ultra, setUltra] = useState(true) + const [show, setShow] = useState(false) const globalData = Taro.getApp().globalData const pageHeight = globalData.windowHeight - globalData.textBarHeight - globalData.statusBarHeight - const {children} = useMemo(() => parse(articleInfo?.content || ''), [articleInfo]) + const {children, headings} = useMemo(() => parse(articleInfo?.content || ''), [articleInfo]) + const query = Taro.createSelectorQuery() + useEffect(() => { setTimeout(() => { @@ -34,6 +39,22 @@ const article: FC = () => { }, 300) }, [children]) + function mao(id: string) { + setShow(false) + Taro.nextTick(() => { + query.select(`#${id}`).boundingClientRect() + query.exec((res) => { + if (res.length) { + Taro.pageScrollTo({ + scrollTop: res[res.length - 1].top, + duration: 300 + } + ) + } + }) + }) + } + Taro.useReady(() => { getData().then() }) @@ -54,12 +75,30 @@ const article: FC = () => { function helloWorld() { return ( <> + + + + + { + headings.length > 0 && setShow(true)}> + + 目录 + + } + + - + {articleInfo?.title} { @@ -67,7 +106,7 @@ const article: FC = () => { { articleInfo?.brands.map(d => - + {d?.name} @@ -97,9 +136,26 @@ const article: FC = () => { } + setShow(false)} + show={show} + round + overlay + overlayStyle={'background:rgba(0,0,0,0.3)'}> + + { + headings.length > 0 && headings.map((d) => mao(d.id)}> + {d.text} + + ) + } + + ) - } return helloWorld() diff --git a/src/pages/preview/brand/info/info.tsx b/src/pages/preview/brand/info/info.tsx index b824190..f8d2413 100644 --- a/src/pages/preview/brand/info/info.tsx +++ b/src/pages/preview/brand/info/info.tsx @@ -111,7 +111,7 @@ const BrandInfo: FC = () => { {brandInfo?.name} - + diff --git a/src/pages/preview/brand/list/list.tsx b/src/pages/preview/brand/list/list.tsx index 1ccaf2b..dc43706 100644 --- a/src/pages/preview/brand/list/list.tsx +++ b/src/pages/preview/brand/list/list.tsx @@ -19,40 +19,40 @@ const BrandItem: FC<{ data: BrandRecord; onClick: VoidFunction }> = ({data, onCl /> } else if (data.brand_album) { media = } return ( - - - - - {data.name} - {beforeTime(data.created_at)}·加入 + + + + + + {data.name} + {beforeTime(data.created_at)}·加入 + - - - {media} - + + {media} + - - {data.graphic_introduction} + + {data.graphic_introduction} + @@ -60,7 +60,7 @@ const BrandItem: FC<{ data: BrandRecord; onClick: VoidFunction }> = ({data, onCl {data.article_count || 0} - + @@ -78,9 +78,13 @@ const BrandList: FC = () => { getData() }, [page]) - const getData = useCallback(async () => { + Taro.useDidShow(() => { + brands.length && getData(true) + }) + + const getData = useCallback(async (replace = false) => { try { - const res = await brandApi.list(page, 10) + const res = await brandApi.list(replace ? 1 : page, replace ? 10 * page : 10) if (page === 1) { if (res.list.length < 10) { setText('暂无更多') @@ -89,10 +93,16 @@ const BrandList: FC = () => { } } setTotal(res.total) - setBrands([ - ...brands, - ...res.list - ]) + const data = res.list.reduce((pre, cur) => { + const index = pre.findIndex(d => d.id === cur.id) + if (index > -1) { + pre.splice(index, 1, cur) + } else { + pre.push(cur) + } + return pre + }, JSON.parse(JSON.stringify(brands))) + setBrands(data) } catch (e) { } setLoading(false) @@ -111,22 +121,18 @@ const BrandList: FC = () => { } }, [total, brands])) - let content: ReactNode - if (brands.length) { - content = ( - <> - {brands.map(d => jumpInfo(d.id)}/>)} - {text} - - ) - } else { - content = - } return ( - {content} + { + brands.length ? + <> + {brands.map(d => jumpInfo(d.id)}/>)} + {text} + + : + } ) } diff --git a/src/pages/preview/illness/article/article.config.ts b/src/pages/preview/illness/article/article.config.ts deleted file mode 100644 index 6901b40..0000000 --- a/src/pages/preview/illness/article/article.config.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default definePageConfig({ - navigationBarTitleText: '', - onReachBottomDistance: 50 -}) diff --git a/src/pages/preview/illness/article/article.module.scss b/src/pages/preview/illness/article/article.module.scss deleted file mode 100644 index 1fbc3f1..0000000 --- a/src/pages/preview/illness/article/article.module.scss +++ /dev/null @@ -1,81 +0,0 @@ -.botmBox { - z-index: 99; - position: fixed; - bottom: 0; - width: 750rpx; - box-sizing: border-box; - height: 180rpx; - padding-bottom: 60rpx; - display: flex; - justify-content: center; - align-items: center; - background: #F5F8F7; - - view { - width: 560rpx; - height: 76rpx; - background: #45D4A8; - border-radius: 38rpx 38rpx 38rpx 38rpx; - color: #fff; - font-weight: 500; - font-size: 40rpx; - text-align: center; - line-height: 76rpx; - } -} - -.fixedBox { - position: fixed; - z-index: 100; - top: 0; - width: 100vw; - height: 100vh; - background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 1)); - - &-inner { - position: absolute; - width: 100vw; - top: 45vh; - display: flex; - flex-direction: column; - align-items: center; - - &-icon { - image { - width: 32rpx; - height: 32rpx; - } - } - - &-box { - margin-top: 24rpx; - width: 680rpx; - left: 35rpx; - height: 76rpx; - background-color: #45D4A8; - color: #fff; - line-height: 76rpx; - text-align: center; - font-size: 32rpx; - font-weight: 500; - border-radius: 8rpx 8rpx 8rpx 8rpx; - } - - } -} - - -.article { - font-size: 30rpx; - display: flex; - margin-bottom: 40rpx; -} - -.articleImag { - border-radius: 100rpx; -} - -.articleTitle { - font-size: 40rpx; - margin-bottom: 50rpx; -} diff --git a/src/pages/preview/illness/article/article.tsx b/src/pages/preview/illness/article/article.tsx deleted file mode 100644 index 172a5c1..0000000 --- a/src/pages/preview/illness/article/article.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import {FC, useEffect, useMemo, useState} from "react"; -import {Image, PageContainer, Text, View} from "@tarojs/components"; -import Taro, {useRouter} from "@tarojs/taro"; -import {ArticleRecord, brandApi} from "@/api"; -import styles from './article.module.scss' -import down from '@/static/img/doubleDown.png' -import {Profile} from "@/store"; -import {parse} from "@/utils/marked/marked"; -import {beforeTime} from "@/utils/time"; -import Img from "@/components/image/image"; - -const article: FC = () => { - const {token} = Profile.useContainer() - const {id} = useRouter().params as unknown as { id: number } - const [show, setShow] = useState(false) - const [articleInfo, setArticleInfo] = useState() - const {children, headings} = useMemo(() => parse(articleInfo?.content || ''), [articleInfo]) - const query = Taro.createSelectorQuery() - - useEffect(() => { - getData() - }, [id]) - - const getData = async () => { - Taro.setNavigationBarTitle({title: '疾病文章详情'}) - try { - const data = await brandApi.articleInfo(id) - Taro.setNavigationBarTitle({title: data.title}) - setArticleInfo(data) - } catch (e) { - } - } - - function mao(id: string) { - console.log(id) - setShow(false) - Taro.nextTick(() => { - query.select(`#${id}`).boundingClientRect() - query.exec((res) => { - if (res.length) { - Taro.pageScrollTo({ - scrollTop: res[res.length - 1].top, - duration: 300 - } - ) - } - }) - }) - } - - function helloWorld() { - return ( - <> - setShow(true)}> - 文章导航 - - - - {articleInfo?.title} - { - articleInfo?.brands.map(d => - - - {d?.name} - - {beforeTime(articleInfo?.created_at)} . - 阅读 {articleInfo.page_view || 1} - - - ) - } - - - {children} - - { - !token && - - - - - - Taro.navigateTo({url: '/pages/login/login'})}> - 登录查看更多内容 - - - - } - - { - setShow(false) - }} show={show} round={true} overlay={true} overlayStyle={'background:rgba(0,0,0,0.3)'}> - - {headings.length > 0 && - headings.map((d) => - { - mao(d.id) - }}>{d.text} - ) - } - - - - ) - } - return helloWorld() -} -export default article diff --git a/src/pages/preview/illness/list/list.tsx b/src/pages/preview/illness/list/list.tsx index 877995b..7089638 100644 --- a/src/pages/preview/illness/list/list.tsx +++ b/src/pages/preview/illness/list/list.tsx @@ -34,7 +34,7 @@ const BrandList: FC = () => { }, [page]) function jump(id: number) { - Taro.navigateTo({url: '/pages/preview/illness/article/article?id=' + id}) + Taro.navigateTo({url: '/pages/preview/brand/article/article?id=' + id}) } diff --git a/src/pages/preview/search/search/index.module.scss b/src/pages/preview/search/search/index.module.scss index 88d34c3..3ead51e 100644 --- a/src/pages/preview/search/search/index.module.scss +++ b/src/pages/preview/search/search/index.module.scss @@ -1,46 +1,58 @@ -page{ - background-color:#F2F8F6; +page { + background-color: #F2F8F6; - .navBox{ - position: fixed; - width:750rpx; + .searchHeader { + margin-top: 10px; + padding: 0 20rpx; + display: flex; + align-items: center; + justify-content: space-between; + transition: all 200ms; + position: sticky; + z-index: 200 ; + overflow: hidden; } - .searchBox{ - width: 690rpx; + + .searchBox { + flex: 1; height: 68rpx; background: #FFFFFF; - border-radius: 32rpx 32rpx 32rpx 32rpx; + border-radius: 32rpx; box-sizing: border-box; display: flex; align-items: center; - padding:0 24rpx; - .input{ + padding: 0 24rpx; + + .input { font-size: 28rpx; - font-weight: 500; - margin-left: 24rpx; - flex:1; + margin-left: 20rpx; + flex: 1; } } - .titleBox{ - margin-top: 60rpx; + + .titleBox { + margin-top: 40rpx; width: 100%; display: flex; box-sizing: border-box; padding-right: 30rpx; justify-content: space-between; - .title{ - font-size: 28rpx; + + .title { + font-size: 30rpx; font-weight: bold; color: #323635; } } - .contentBox{ + + .contentBox { display: flex; flex-wrap: wrap; - .items{ + + .items { display: inline-block; background: #FFFFFF; - border-radius:32rpx; + border-radius: 32rpx; padding: 10rpx 24rpx; font-size: 24rpx; font-weight: 500; diff --git a/src/pages/preview/search/search/index.tsx b/src/pages/preview/search/search/index.tsx index 4641474..f68dbaa 100644 --- a/src/pages/preview/search/search/index.tsx +++ b/src/pages/preview/search/search/index.tsx @@ -1,110 +1,121 @@ -import {Input, View, Text, PageContainer} from "@tarojs/components"; -import {FC, useEffect, useState} from "react"; -import { AtIcon } from 'taro-ui' +import {Input, View, Text, PageContainer, Image} from "@tarojs/components"; +import {FC, useEffect, useMemo, useState} from "react"; import styles from './index.module.scss' import Taro from "@tarojs/taro"; -import { useReady, useDidShow } from '@tarojs/taro' +import {useDidShow} from '@tarojs/taro' import SearchList from './components/list' +import NavigationBar from "@/components/navigationBar/navigationBar"; +import search from '@/static/img/search.png' +import del from '@/static/img/del.png' -const Search:FC = () => { - const globalData = Taro.getApp().globalData +const Search: FC = () => { const [value, setValue] = useState('') const [recentSearch, setRecentSearch] = useState([]) - const [hotSearch,setHotSearch] = useState([]) + const [hotSearch] = useState([]) const [show, setShow] = useState(false) + const [focus, setFocus] = useState(false) - useReady(()=>{ - console.log('onReady') - }) - useDidShow(()=>{ - getRecentSearch() - }) - useEffect(()=>{ - if(!show){ - getRecentSearch() - } - },[show]) + useDidShow(getRecentSearch) - function inpFn(e){ + useEffect(() => { + !show && getRecentSearch() + }, [show]) + + function inpFn(e) { setValue(e.detail.value) } - function clearSearch(){ + function clearSearch() { Taro.removeStorageSync('recentSearch') getRecentSearch() + Taro.showToast({title: '删除成功'}) } - function getRecentSearch () { + function getRecentSearch() { setRecentSearch(Taro.getStorageSync('recentSearch')) } + function getSearchItem(value) { setValue(value) - // Taro.navigateTo({ - // url:`/pages/preview/search/list/index?name=${value}` - // }) setShow(true) } - function searchInput(){ - if (value === "") return; - getSearchItem(value) - //记录最近搜索 - let recentSearch = Taro.getStorageSync('recentSearch') || []; - recentSearch.unshift(value); - Taro.setStorageSync('recentSearch', [...new Set(recentSearch)]) - } + function searchInput() { + if (value === "") return; + getSearchItem(value) + //记录最近搜索 + let recentSearch = Taro.getStorageSync('recentSearch') || []; + recentSearch.unshift(value); + Taro.setStorageSync('recentSearch', [...new Set(recentSearch)]) + } - function navBack(){ - Taro.navigateBack() - } + function cancelSearch(){ + setValue('') + setShow(false) + setFocus(false) + } + + + const searchStyles = useMemo((): React.CSSProperties | undefined => { + if (focus || show) { + return { + transform: "translateY(-43px)", + width: "70%", + } + } + }, [focus, show]) return ( - - - - - - - 搜索 - - - - - + + - - { show ? - {value}: - - } + + setFocus(true)} + onBlur={() => setFocus(false)} + className={styles.input} + placeholder={(focus || show) ? '' : "输入关键字搜索"} + type='text' + value={value} + confirmType='search' + onInput={inpFn} + onConfirm={searchInput}/> + + {focus || show ? 取消 : null} + + { recentSearch.length >= 1 && !show && - <> - + + 最近搜索 - + - - { - recentSearch.length && - recentSearch?.map(d => - - {getSearchItem(d)}} className="font-28" >{d} - ) - } - - + + { + recentSearch.length > 0 && + recentSearch?.map(d => + + getSearchItem(d)} className="font-28">{d} + ) + } + + } { hotSearch.length >= 1 && !show && <> - + 热门搜索 @@ -114,7 +125,9 @@ const Search:FC = () => { hotSearch.length && hotSearch.map(d => - {getSearchItem(d)}} className="font-28" >{d} + { + getSearchItem(d) + }} className="font-28">{d} ) } @@ -122,11 +135,15 @@ const Search:FC = () => { } - {setShow(false)}} onClickOverlay={()=>{ setShow(false)}} show={show} round={true} overlay={true} overlayStyle={'background:rgba(0,0,0,0)'} > - + + - - ) } diff --git a/src/static/img/catalogue.png b/src/static/img/catalogue.png new file mode 100644 index 0000000..fe7be43 Binary files /dev/null and b/src/static/img/catalogue.png differ diff --git a/src/static/img/omit.png b/src/static/img/omit.png new file mode 100644 index 0000000..28e72c9 Binary files /dev/null and b/src/static/img/omit.png differ diff --git a/types/user.d.ts b/types/user.d.ts index cf2ba55..17120db 100644 --- a/types/user.d.ts +++ b/types/user.d.ts @@ -95,5 +95,19 @@ interface HourHistory extends Curriculum { } } +/** + * 收藏类型,收藏类型 1文章 2视频 3课程 4其他(品牌) + */ +type CreateOwnerType = 1 | 2 | 3 | 4 + +/** 收藏 */ +interface Create { + /** + * 收藏id + */ + owner_id: number + owner_type: CreateOwnerType +} +