5.6 高质量运营修改

This commit is contained in:
jl-zhoujl2
2023-05-06 10:58:36 +08:00
parent b2ec38ec08
commit bf41560559
3 changed files with 27 additions and 24 deletions

View File

@ -1,4 +1,4 @@
import React, { Fragment, useEffect, useRef, useState } from 'react'; import React, { Fragment, useEffect, useMemo, useRef, useState } from 'react';
import './style.less'; import './style.less';
import project_banner from '@/assets/highQuality/project_banner.jpg' import project_banner from '@/assets/highQuality/project_banner.jpg'
import news_banner from '@/assets/highQuality/news_banner.jpg' import news_banner from '@/assets/highQuality/news_banner.jpg'
@ -174,24 +174,26 @@ const Detail: React.FC<DetailLocationProps> = (props) => {
<div className='content-thumbs-up-expand' style={expand ? { maxHeight: "664px" } : { maxHeight: 0, margin: 0, padding: 0, border: 0 }}> <div className='content-thumbs-up-expand' style={expand ? { maxHeight: "664px" } : { maxHeight: 0, margin: 0, padding: 0, border: 0 }}>
<div className='content-thumbs-up'> <div className='content-thumbs-up'>
<div className="content-list" ref={listRef}> <div className="content-list" ref={listRef}>
<List {useMemo(() => (
itemLayout="horizontal" <List
dataSource={commentList} itemLayout="horizontal"
renderItem={(item, index) => ( dataSource={commentList}
<List.Item id={`item${index}`}> renderItem={(item, index) => (
<Skeleton loading={item.loading} active avatar title={false}> <List.Item id={`item${index}`}>
<List.Item.Meta <Skeleton loading={item.loading} active avatar title={false}>
avatar={<Avatar src={"https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png"} />} <List.Item.Meta
title={<span>{item.createrName}</span>} avatar={<Avatar src={"https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png"} />}
description={<span> title={<span>{item.createrName}</span>}
<span>{item.context}</span> description={<span>
<span style={{ display: "block", marginTop: "6px" }}>{formatCreateTime(item.createTime)}</span> <span>{item.context}</span>
</span>} <span style={{ display: "block", marginTop: "6px" }}>{formatCreateTime(item.createTime)}</span>
/> </span>}
</Skeleton> />
</List.Item> </Skeleton>
)} </List.Item>
/> )}
/>
), [commentList])}
</div> </div>
<div className={isNotEmpty(inputValue) ? 'content-send' : 'content-send content-send-noread'}> <div className={isNotEmpty(inputValue) ? 'content-send' : 'content-send content-send-noread'}>
<Search <Search

View File

@ -23,7 +23,7 @@ import topic_header_img from '@/assets/topic/topic_header_img.png'
import topic_banner_default from '@/assets/topic/topic_banner_default.jpg' import topic_banner_default from '@/assets/topic/topic_banner_default.jpg'
import topic_activity_default from '@/assets/topic/topic_activity_default.jpg' import topic_activity_default from '@/assets/topic/topic_activity_default.jpg'
import { downloadVideo, getClassroomList, getHomeBanner, getHomeContact, getHomeGraceful, getHomeProject, getHomeRight, submitAdvice } from './service'; import { downloadVideo, getClassroomList, getHomeBanner, getHomeContact, getHomeGraceful, getHomeProject, getHomeRight, submitAdvice } from './service';
import { chunk, formatTime, getImageUrl, managerAuthority } from '../utils'; import { chunk, formatTime, getImageUrl, isEmpty, isNotEmpty, managerAuthority } from '../utils';
import ExtendUpload from '@/utils/ExtendUpload'; import ExtendUpload from '@/utils/ExtendUpload';
import { getSessionUserData } from '@/utils/session'; import { getSessionUserData } from '@/utils/session';
import ReactPlayer from "react-player/file"; import ReactPlayer from "react-player/file";
@ -311,6 +311,7 @@ const Home: React.FC<{}> = () => {
const userData = getSessionUserData(); const userData = getSessionUserData();
//video Carousel //video Carousel
const [autoplay, setAutoplay] = useState<boolean>(true); const [autoplay, setAutoplay] = useState<boolean>(true);
const [videoPlayKey, setVideoPlayKey] = useState<string>("");
const { CheckableTag } = Tag; const { CheckableTag } = Tag;
const openModal = (item: any) => { const openModal = (item: any) => {
@ -479,13 +480,13 @@ const Home: React.FC<{}> = () => {
<ReactPlayer <ReactPlayer
url={downloadVideo + item.image} url={downloadVideo + item.image}
playing={false} playing={false}
controls={true} controls={isEmpty(videoPlayKey) || item.id === videoPlayKey}
muted={true} muted={true}
width="100%" width="100%"
height="100%" height="100%"
style={{}} style={{}}
onPlay={() => { setAutoplay(false) }} onPlay={() => { setAutoplay(false); setVideoPlayKey(item.id) }}
onPause={() => { setAutoplay(true) }} onPause={() => { setAutoplay(true); setVideoPlayKey("") }}
/> />
</div> </div>
<div className='left-classroom-textbg'> <div className='left-classroom-textbg'>

View File

@ -24,7 +24,7 @@ const Dashboard: React.FC<{}> = () => {
<> <>
<div className={styles.header}> <div className={styles.header}>
<div className={styles.headerAlign} style={{ position: "relative", top: "2px", fontSize: "16px", fontWeight: "600" }}> <div className={styles.headerAlign} style={{ position: "relative", top: "2px", fontSize: "16px", fontWeight: "600" }}>
<img src={logo} style={{ height: "30px", marginRight: "10px", position: 'relative', top: '-2px' }} /> <img src={logo} style={{ height: "30px", marginRight: "10px", position: 'relative', top: '-2px' }} />
</div> </div>
<ul className={styles.rightBtns}> <ul className={styles.rightBtns}>
<li><CarryOutOutlined />{moment().format("YYYY-MM-DD")}</li> <li><CarryOutOutlined />{moment().format("YYYY-MM-DD")}</li>