统一文章样式

v2
king 2 years ago
parent 380b7be4fa
commit bc0682351e
  1. 4
      .env
  2. 2
      src/api/brand.ts
  3. 40
      src/components/articlesBox/articlesBox.module.scss
  4. 45
      src/components/articlesBox/articlesBox.tsx
  5. 2
      src/components/image/image.tsx
  6. 2
      src/components/videoCover/videoCover.tsx
  7. 15
      src/components/videoList/videoList.tsx
  8. 32
      src/pages/home/components/curRecommended.tsx
  9. 2
      src/pages/home/components/search.tsx
  10. 19
      src/pages/index/index.tsx
  11. 2
      src/pages/manage/depAdmin/depAdmin.scss
  12. 2
      src/pages/manage/depAdmin/depAdmin.tsx
  13. 1
      src/pages/manage/selectDep/selectDep.tsx
  14. 11
      src/pages/preview/brand/article/article.tsx
  15. 3
      src/pages/preview/brand/info/info.module.scss
  16. 33
      src/pages/preview/brand/info/info.tsx
  17. 31
      src/pages/preview/illness/list/list.tsx
  18. 11
      types/articles.d.ts

@ -1,5 +1,5 @@
#TARO_APP_API=https://yjx.dev.yaojiankang.top TARO_APP_API=https://yjx.dev.yaojiankang.top
TARO_APP_API=https://mooc.yaojiankang.top #TARO_APP_API=https://mooc.yaojiankang.top
#TARO_APP_API=https://shopfix.yaojiankang.top #TARO_APP_API=https://shopfix.yaojiankang.top
#TARO_APP_API=https://playedu.yaojiankang.top #TARO_APP_API=https://playedu.yaojiankang.top
TARO_APP_LGOIN=true TARO_APP_LGOIN=true

@ -40,7 +40,7 @@ export const brandApi = {
/** 文章列表 */ /** 文章列表 */
articleList(owner_id: number, page: number) { articleList(owner_id: number, page: number) {
return request<{ return request<{
list: ArticleRecord[], list: Articles[],
total: number total: number
}>(`/home/v1/article/list?owner_id=${owner_id}&page=${page}&page_size=10`, "GET") }>(`/home/v1/article/list?owner_id=${owner_id}&page=${page}&page_size=10`, "GET")
}, },

@ -0,0 +1,40 @@
.artcles {
padding: 30rpx 0;
border-bottom: 1px solid #F5F8F7;
}
.outside {
display: flex;
justify-content: space-between;
.title {
font-size: 28rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #323635;
}
.intro {
font-size: 24rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #909795;
margin-top: 10rpx;
}
}
.img {
overflow: hidden;
border-radius: 10rpx;
}
.pageView {
font-size: 22rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #909795;
margin-top: 20rpx;
}

@ -0,0 +1,45 @@
import {FC, useEffect, useState} from "react";
import {Text, View} from "@tarojs/components";
import Taro from "@tarojs/taro";
import styles from './articlesBox.module.scss'
import Img from "@/components/image/image";
import {beforeTime} from "@/utils/time";
interface Props {
data: Articles
}
const ArticlesBox: FC<Props> = (props) => {
const [data, setData] = useState(props.data)
useEffect(() => {
setData(props.data)
}, [props.data])
const toArticlePage = () => {
Taro.navigateTo({
url: `/pages/preview/brand/article/article?id=${data.id}`
})
}
return (
<View className={styles.artcles} onClick={toArticlePage}>
<View className={styles.outside}>
<View className='flex-1 mr-2'>
<View className={`${styles.title} text-ellipsis-1`}>{data.title}</View>
<View className={`${styles.intro} text-ellipsis-2`}>{data.intro}</View>
<View className={styles.pageView}>
<Text>{beforeTime(data.created_at)}</Text>·
<Text>{data.page_view || 0}</Text>
</View>
</View>
<Img src={data.cover || ''}
errorType={data.owner_type === 1 ? 'brand' : 'health'}
width={148}
height={116}
className={styles.img}/>
</View>
</View>
)
}
export default ArticlesBox

@ -81,7 +81,7 @@ const Img: FC<Props> = ({src, mode = 'aspectFill', width, fallback = shard, ...p
overflow: 'hidden', overflow: 'hidden',
width: width ? `${width}rpx` : "100%", width: width ? `${width}rpx` : "100%",
height: height ? `${height}rpx` : "100%", height: height ? `${height}rpx` : "100%",
backgroundColor: (isError || !loading) ? 'transparent' : '#F8F8F8' backgroundColor: (isError || !loading) ? 'transparent' : '#F8F8F8',
}}> }}>
{!isError && {!isError &&
<View animation={animationData} style={{height: '100%', width: '100%'}}> <View animation={animationData} style={{height: '100%', width: '100%'}}>

@ -29,7 +29,7 @@ const VideoCover: FC<VideoCoverProps> = (opt: VideoCoverProps) => {
<View className='videoBox'> <View className='videoBox'>
<View className='video' onClick={jump}> <View className='video' onClick={jump}>
<View className='upper'> <View className='upper'>
<Img height={180} src={opt.thumb} mode='widthFix'/> <Img height={180} src={opt.thumb} mode='widthFix' errorType='course'/>
{opt.marker && <View className='marker'>{opt.marker}</View>} {opt.marker && <View className='marker'>{opt.marker}</View>}
{opt.content && <View className='content'>{opt.content}</View>} {opt.content && <View className='content'>{opt.content}</View>}
</View> </View>

@ -1,4 +1,4 @@
import {FC, useState} from "react"; import {FC, useEffect, useState} from "react";
import styles from "@/pages/preview/health/health.module.scss"; import styles from "@/pages/preview/health/health.module.scss";
import {Image, Text, View} from "@tarojs/components"; import {Image, Text, View} from "@tarojs/components";
import Img from "@/components/image/image"; import Img from "@/components/image/image";
@ -11,25 +11,28 @@ interface Props {
errorType?: ImgErrType errorType?: ImgErrType
} }
const VideoList: FC<Props> = ({data, errorType}) => { const VideoList: FC<Props> = (props) => {
const [frequency, setFrequency] = useState(0) const [data, setData] = useState(props.data)
useEffect(() => {
setData(props.data)
}, [props.data])
function jump() { function jump() {
Taro.preload(data) Taro.preload(data)
setFrequency(frequency + 1)
Taro.navigateTo({url: `/pages/preview/videoFull/videoFull?id=${data.id}`}) Taro.navigateTo({url: `/pages/preview/videoFull/videoFull?id=${data.id}`})
} }
return ( return (
<View key={data.id} className={styles.health} onClick={jump}> <View key={data.id} className={styles.health} onClick={jump}>
<Img src={data.url_path} mode='widthFix' errorType={errorType} height={346} fit/> <Img src={data.url_path} mode='widthFix' errorType={props.errorType} height={346}/>
<Image src={play} className={styles.play} mode='aspectFit'/> <Image src={play} className={styles.play} mode='aspectFit'/>
<View className='p-1'> <View className='p-1'>
<View className='text-ellipsis-2 text-dark'>{data.title}</View> <View className='text-ellipsis-2 text-dark'>{data.title}</View>
<View className='text-ellipsis-2 mt-1 font-26 text-secondary'>{data.introduction}</View> <View className='text-ellipsis-2 mt-1 font-26 text-secondary'>{data.introduction}</View>
<View className='font-24 text-muted my-2 flex justify-between'> <View className='font-24 text-muted my-2 flex justify-between'>
<Text>{formatDate(new Date(data.publish_time), "YY-MM-dd")}</Text> <Text>{formatDate(new Date(data.publish_time), "YY-MM-dd")}</Text>
<Text>{(data.video_view || 1) + frequency}</Text> <Text>{(data.video_view || 0)}</Text>
</View> </View>
</View> </View>
</View>) </View>)

@ -1,24 +1,17 @@
import {FC, ReactNode, useEffect, useState} from "react"; import {FC, ReactNode, useEffect, useState} from "react";
import {Image, View} from "@tarojs/components"; import {Image, View} from "@tarojs/components";
import {HomeApi} from "@/api"; import {HomeApi} from "@/api";
import Taro, {useReachBottom} from "@tarojs/taro"; import {useReachBottom} from "@tarojs/taro";
import styles from "../home.module.scss"; import styles from "../home.module.scss";
import VideoCover from "@/components/videoCover/videoCover"; import VideoCover from "@/components/videoCover/videoCover";
import courseTag from '@/static/img/courseTag.png' import courseTag from '@/static/img/courseTag.png'
import Img from "@/components/image/image"; import ArticlesBox from "@/components/articlesBox/articlesBox";
import {beforeTime} from "@/utils/time";
const toArticlePage = (d: any) => {
Taro.navigateTo({
url: `/pages/preview/brand/article/article?id=${d.id}`
})
}
const CurRecommended: FC = () => { const CurRecommended: FC = () => {
const [page, setPage] = useState(1) const [page, setPage] = useState(1)
const [data, setData] = useState<Curriculum[]>([]) const [data, setData] = useState<Curriculum[]>([])
const [total, setTotal] = useState(0) const [total, setTotal] = useState(0)
const [articles, setArticles] = useState<any[]>([]) const [articles, setArticles] = useState<Articles[]>([])
async function getData() { async function getData() {
const res = await HomeApi.course(page, 4) const res = await HomeApi.course(page, 4)
@ -48,20 +41,11 @@ const CurRecommended: FC = () => {
if (articles.length > 0) { if (articles.length > 0) {
examines = ( examines = (
<View className="mb-5"> <View className="mb-5">
<View className='text-center my-2'></View> <View className='bg-white rounded-20 clip px-3'>
<View className='bg-white rounded-20 clip'> <View className='mt-3 mb-3 font-32 bold text-dark'></View>
{articles.map((d, i) => <View className='p-3 relative' onClick={() => toArticlePage(d)}> {
{i > 0 && <View className='absolute top left right divided ml-3 mr-3'/>} articles.map(d => <ArticlesBox data={d}/>)
<View className="font-34 text-black">{d.title}</View> }
{(d.intro || '').length > 40 && (<View className='flex mt-1'>
<View className="flex-1 font-24 lh1_5">{d.intro}</View>
{d.cover && <Img className='ml-l' width={140} height={100} src={d.cover} errorType="acquiesce"/>}
</View>)}
<View className="flex mt-3 justify-between font-24 text-muted">
<View>{beforeTime(d.created_at)}</View>
<View> {d.page_view || 0}</View>
</View>
</View>)}
</View> </View>
</View> </View>
) )

@ -13,7 +13,7 @@ export const Search: FC = () => {
return ( return (
<View className={styles.search} onClick={jump}> <View className={styles.search} onClick={jump}>
<Image src={search} mode='widthFix' style={{width: 16, height: 16, verticalAlign: 'middle',padding:'0 20rpx'}}/> <Image src={search} mode='widthFix' style={{width: 16, height: 16, verticalAlign: 'middle',paddingRight:'10rpx'}}/>
<View></View> <View></View>
</View> </View>
) )

@ -6,10 +6,8 @@ import Tabs, {OnChangOpt, TabList} from "@/components/tabs/tabs";
import {CoursesKey, publicApi} from "@/api/public"; import {CoursesKey, publicApi} from "@/api/public";
import NavigationBar from "@/components/navigationBar/navigationBar"; import NavigationBar from "@/components/navigationBar/navigationBar";
import Spin from "@/components/spinner"; import Spin from "@/components/spinner";
import Img from "@/components/image/image";
import {beforeTime} from "@/utils/time";
import {isBoolean} from "@tarojs/shared"; import {isBoolean} from "@tarojs/shared";
import Taro from "@tarojs/taro"; import ArticlesBox from "@/components/articlesBox/articlesBox";
const category: TabList[] = [ const category: TabList[] = [
{title: "企选课程", value: 'is_required'}, {title: "企选课程", value: 'is_required'},
@ -56,20 +54,9 @@ const AuditMode: FC = () => {
auditMode ? auditMode ?
<> <>
<NavigationBar text='文章列表' cancelBack/> <NavigationBar text='文章列表' cancelBack/>
<View className='bg-white rounded-20 clip'> <View className='bg-white rounded-20 clip m-3 px-3'>
{ {
articles.map((d, i) => <View className='p-3 relative' onClick={() => Taro.navigateTo({url: "/pages/preview/brand/article/article?id=" + d.id})}> articles.map(d => <ArticlesBox data={d}/>)
{i > 0 && <View className='absolute top left right divided ml-3 mr-3'/>}
<View className="font-34 text-black">{d.title}</View>
{(d.intro || '').length > 40 && (<View className='flex mt-1'>
<View className="flex-1 font-24 lh1_5">{d.intro}</View>
{d.cover && <Img className='ml-l' width={140} height={100} src={d.cover} errorType="acquiesce"/>}
</View>)}
<View className="flex mt-3 justify-between font-24 text-muted">
<View>{beforeTime(d.created_at)}</View>
<View> {d.page_view || 0}</View>
</View>
</View>)
} }
</View> </View>
<View className='text-center font-24 text-dark mt-2'></View> <View className='text-center font-24 text-dark mt-2'></View>

@ -1,7 +1,7 @@
.content { .content {
margin-top: 20rpx; margin-top: 20rpx;
background: white; background: white;
min-height: calc(100vh - 20rpx); min-height: calc(100vh - 20rpx - env(safe-area-inset-bottom));
box-sizing: border-box; box-sizing: border-box;
padding-bottom: calc(env(safe-area-inset-bottom) + 80rpx); padding-bottom: calc(env(safe-area-inset-bottom) + 80rpx);
} }

@ -160,8 +160,6 @@ const DepAdmin: FC = () => {
content={['学员', '管理员', '超级管理员'][d.role_type]} content={['学员', '管理员', '超级管理员'][d.role_type]}
/>) />)
} }
{manages.length > 0 || users.length > 0 && <View className='text-center font-24 text-dark mt-3'></View>}
{!manages.length && !users.length && <Empty name='暂无数据'/>} {!manages.length && !users.length && <Empty name='暂无数据'/>}
<View className='operation'> <View className='operation'>

@ -59,7 +59,6 @@ const SelectDep: FC = () => {
leftImage={folder}/> leftImage={folder}/>
</View> </View>
</View>)} </View>)}
<View className='text-center font-24 text-dark mt-3'></View>
<View className={'my-3'}> <View className={'my-3'}>
<MyButton onClick={ok}></MyButton> <MyButton onClick={ok}></MyButton>

@ -22,7 +22,6 @@ const article: FC = () => {
const [ultra, setUltra] = useState(true) const [ultra, setUltra] = useState(true)
const [show, setShow] = useState(false) const [show, setShow] = useState(false)
const globalData = Taro.getApp().globalData const globalData = Taro.getApp().globalData
const pageHeight = globalData.windowHeight - globalData.textBarHeight - globalData.statusBarHeight
const {children, headings} = useMemo(() => parse(articleInfo?.content || ''), [articleInfo]) const {children, headings} = useMemo(() => parse(articleInfo?.content || ''), [articleInfo])
const query = Taro.createSelectorQuery() const query = Taro.createSelectorQuery()
const [maoId, setMaoId] = useState('') const [maoId, setMaoId] = useState('')
@ -33,7 +32,7 @@ const article: FC = () => {
query.select('#childrenNode').boundingClientRect((res) => { query.select('#childrenNode').boundingClientRect((res) => {
if (!Array.isArray(res)) { if (!Array.isArray(res)) {
console.log({childrenNode: res}) console.log({childrenNode: res})
setUltra(pageHeight * .45 <= res.height) setUltra(globalData.pageHeight * .45 <= res.height)
} }
}).exec() }).exec()
}, 300) }, 300)
@ -51,7 +50,6 @@ const article: FC = () => {
Taro.nextTick(() => { Taro.nextTick(() => {
query.select(`#${id}`).boundingClientRect() query.select(`#${id}`).boundingClientRect()
query.exec((res) => { query.exec((res) => {
console.log({res})
if (res.length) { if (res.length) {
Taro.pageScrollTo({ Taro.pageScrollTo({
scrollTop: res[res.length - 1].top, scrollTop: res[res.length - 1].top,
@ -92,7 +90,7 @@ const article: FC = () => {
<View> <View>
<Collect <Collect
select={articleInfo?.collect} select={articleInfo?.collect}
styles={{flexDirection: 'column', justifyContent: 'center', padding: '20rpx'}} styles={{flexDirection: 'column', justifyContent: 'center'}}
stylesImage={{margin: '0 0 8rpx 0'}} stylesImage={{margin: '0 0 8rpx 0'}}
owner_id={Number(id)} owner_id={Number(id)}
owner_type={1} owner_type={1}
@ -110,8 +108,9 @@ const article: FC = () => {
<View <View
className={styles.articleBox} className={styles.articleBox}
style={{ style={{
height: !token ? Taro.getWindowInfo().windowHeight - 60 + 'px' : 'auto', height: !token ? globalData.pageHeight - 60 + 'px' : 'auto',
overflow: !token ? 'hidden' : 'auto' overflow: !token ? 'hidden' : 'auto',
boxSizing:'border-box'
}}> }}>
<View id="childrenNode"> <View id="childrenNode">
<View className={styles.articleTitle}>{articleInfo?.title}</View> <View className={styles.articleTitle}>{articleInfo?.title}</View>

@ -40,6 +40,9 @@ page{
background-color: #fff; background-color: #fff;
border-radius: 32rpx 32rpx 0 0; border-radius: 32rpx 32rpx 0 0;
width: 100%; width: 100%;
padding: 0 30rpx;
width: 100%;
box-sizing: border-box;
.box { .box {
display: flex; display: flex;
background-color: #fff; background-color: #fff;

@ -1,14 +1,14 @@
import {FC, useCallback, useEffect, useState} from "react"; import {FC, useCallback, useEffect, useState} from "react";
import {Swiper, SwiperItem, Text, Video, View} from "@tarojs/components"; import {Swiper, SwiperItem, Text, Video, View} from "@tarojs/components";
import {ArticleRecord, brandApi, BrandRecord} from "@/api"; import { brandApi, BrandRecord} from "@/api";
import styles from './info.module.scss' import styles from './info.module.scss'
import Taro, {useReachBottom, useRouter} from "@tarojs/taro"; import Taro, {useReachBottom, useRouter} from "@tarojs/taro";
import LineEllipsis from "@/components/textCollapse/collapse"; import LineEllipsis from "@/components/textCollapse/collapse";
import Empty from "@/components/empty/empty"; import Empty from "@/components/empty/empty";
import Img from "@/components/image/image"; import Img from "@/components/image/image";
import {rfc33392time} from "@/utils/day";
import Spin from "@/components/spinner"; import Spin from "@/components/spinner";
import Collect from "@/components/collect/collect"; import Collect from "@/components/collect/collect";
import ArticlesBox from "@/components/articlesBox/articlesBox";
type Params = { type Params = {
id: number id: number
@ -16,7 +16,7 @@ type Params = {
const BrandInfo: FC = () => { const BrandInfo: FC = () => {
const {id} = useRouter().params as unknown as Params const {id} = useRouter().params as unknown as Params
const [brandInfo, setBrandInfo] = useState<BrandRecord>() const [brandInfo, setBrandInfo] = useState<BrandRecord>()
const [articleList, setArticleList] = useState<ArticleRecord[]>([]) const [articleList, setArticleList] = useState<Articles[]>([])
const [curIndex, setCurIndex] = useState<number>(1) const [curIndex, setCurIndex] = useState<number>(1)
const [page, setPage] = useState(1) const [page, setPage] = useState(1)
const [total, setTotal] = useState(0) const [total, setTotal] = useState(0)
@ -64,15 +64,6 @@ const BrandInfo: FC = () => {
setCurIndex(+e.detail.current + 1) setCurIndex(+e.detail.current + 1)
} }
function jump(data: ArticleRecord, index: number) {
Taro.navigateTo({url: `/pages/preview/brand/article/article?id=${data.id}`})
const oldArticle: ArticleRecord[] = JSON.parse(JSON.stringify(articleList))
oldArticle.splice(index, 1, {
...data,
page_view: (data.page_view || 1) + 1
})
setArticleList(oldArticle)
}
return ( return (
<View className='flex flex-column' style={{display: 'flex'}}> <View className='flex flex-column' style={{display: 'flex'}}>
@ -106,7 +97,7 @@ const BrandInfo: FC = () => {
(brandInfo?.brand_album?.length || 0) > 0 (brandInfo?.brand_album?.length || 0) > 0
&& brandInfo?.brand_album?.split(',').map((d) => && brandInfo?.brand_album?.split(',').map((d) =>
<SwiperItem> <SwiperItem>
<Img mode={'aspectFill'} width={750} height={600} src={d}/> <Img mode={'aspectFill'} width={750} height={600} src={d} errorType='brand'/>
</SwiperItem>) </SwiperItem>)
} }
</Swiper> </Swiper>
@ -123,23 +114,13 @@ const BrandInfo: FC = () => {
<Text className={`${styles['title']} flex-1`}>{brandInfo?.name}</Text> <Text className={`${styles['title']} flex-1`}>{brandInfo?.name}</Text>
<Collect owner_type={4} owner_id={id} select={brandInfo?.collect}/> <Collect owner_type={4} owner_id={id} select={brandInfo?.collect}/>
</View> </View>
<LineEllipsis text={brandInfo?.graphic_introduction || '暂无简介'}></LineEllipsis> <LineEllipsis text={brandInfo?.graphic_introduction || '暂无简介'}/>
</View> </View>
<View className={styles['bottom']}> <View className={styles['bottom']}>
{ {
articleList?.length ? <>{ articleList?.length ? <>{
articleList.map((i, index) => <View className={styles.box} onClick={() => jump(i, index)}> articleList.map(d => <ArticlesBox data={d}/>)}
<View className={styles.inner}> <View className='text-center font-24 text-dark mt-3'></View>
<View className={styles.leftBox}>
<View className='font-weight mb-2 font-28 lh-40'>{i.title}</View>
<View className={styles.desc}>{rfc33392time(i.created_at)} {i.page_view || 1}</View>
</View>
<View className={styles.image}>
<Img width={172} height={128} src={i.cover} errorType='brand'/>
</View>
</View>
</View>)}
<View className='text-center font-24 text-dark'></View>
</> </>
: <Empty name='空空如也'/> : <Empty name='空空如也'/>
} }

@ -4,8 +4,7 @@ import Taro, {useReachBottom, useRouter} from "@tarojs/taro";
import {illnessApi} from "@/api/illness"; import {illnessApi} from "@/api/illness";
import Empty from "@/components/empty/empty"; import Empty from "@/components/empty/empty";
import Spin from "@/components/spinner"; import Spin from "@/components/spinner";
import Img from "@/components/image/image"; import ArticlesBox from "@/components/articlesBox/articlesBox";
import {beforeTime} from "@/utils/time";
const BrandList: FC = () => { const BrandList: FC = () => {
const params = useRouter().params as unknown as { id: number } const params = useRouter().params as unknown as { id: number }
@ -32,17 +31,6 @@ const BrandList: FC = () => {
Taro.hideLoading() Taro.hideLoading()
}, [page]) }, [page])
function jump(data: any, index: number) {
Taro.navigateTo({url: '/pages/preview/brand/article/article?id=' + data.id})
const oldArticles: any[] = JSON.parse(JSON.stringify(articles))
oldArticles.splice(index, 1, {
...data,
page_view: data.page_view + 1
})
setArticles(oldArticles)
}
useReachBottom(useCallback(() => { useReachBottom(useCallback(() => {
if (articles?.length < total) { if (articles?.length < total) {
setPage(page + 1) setPage(page + 1)
@ -51,25 +39,14 @@ const BrandList: FC = () => {
return ( return (
<View style={{display: fetchDone ? 'block' : 'none'}} className='px-2 mt-2'> <View style={{display: fetchDone ? 'block' : 'none'}} className='px-3 mt-3'>
<Spin enable={enable} overlay/> <Spin enable={enable} overlay/>
{ {
articles.length > 0 ? articles.length > 0 ?
<> <>
<View className='bg-white rounded-20 clip'> <View className='bg-white rounded-20 clip px-3'>
{ {
articles.map((d, i) => <View className='p-3 relative' onClick={() => jump(d, i)}> articles.map(d => <ArticlesBox data={d}/>)
{i > 0 && <View className='absolute top left right divided ml-3 mr-3'/>}
<View className="font-34 text-black">{d.title}</View>
{(d.intro || '').length > 40 && (<View className='flex mt-1'>
<View className="flex-1 font-24 lh1_5">{d.intro}</View>
{d.cover && <Img className='ml-l' width={140} height={100} src={d.cover} errorType="acquiesce"/>}
</View>)}
<View className="flex mt-3 justify-between font-24 text-muted">
<View>{beforeTime(d.created_at)}</View>
<View> {d.page_view || 0}</View>
</View>
</View>)
} }
</View> </View>
<View className='text-center font-24 text-dark mt-3'></View> <View className='text-center font-24 text-dark mt-3'></View>

@ -0,0 +1,11 @@
interface Articles {
id: number
title: string
/** 封面 */
cover?: string
created_at: string
page_view: number
/** 描述 */
intro: string
owner_type:number
}
Loading…
Cancel
Save