This commit is contained in:
parent
37997ccf78
commit
b8010bdda0
|
@ -12,7 +12,8 @@ export default defineConfig({
|
|||
],
|
||||
npmClient: 'pnpm',
|
||||
alias: {
|
||||
img: '/public/image'
|
||||
img: '/public/image',
|
||||
http: '/src/utils/request'
|
||||
},
|
||||
proxy: {
|
||||
'/api': {
|
||||
|
@ -24,4 +25,6 @@ export default defineConfig({
|
|||
metas: [
|
||||
{ name: 'viewport', content: '' },
|
||||
],
|
||||
plugins: ['@umijs/plugins/dist/model'],
|
||||
model: {}
|
||||
});
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"devDependencies": {
|
||||
"@types/react": "^18.2.13",
|
||||
"@types/react-dom": "^18.2.6",
|
||||
"@umijs/plugins": "^4.0.72",
|
||||
"typescript": "^5.1.3"
|
||||
}
|
||||
}
|
||||
|
|
2737
pnpm-lock.yaml
2737
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -29,8 +29,8 @@ export const menu = [
|
|||
]
|
||||
|
||||
export const defaultPage = {
|
||||
'/register': 171,
|
||||
'/contact': 173
|
||||
'/register': 1410,
|
||||
'/contact': 1410
|
||||
}
|
||||
|
||||
export const information = {
|
||||
|
@ -41,19 +41,16 @@ export const information = {
|
|||
title: '大会论坛',
|
||||
eng: 'Conference Forum',
|
||||
anchor: 'forum',
|
||||
id: 1400
|
||||
},
|
||||
{
|
||||
title: '会议指南',
|
||||
eng: 'Conference Guide',
|
||||
anchor: 'guide',
|
||||
id: 1401
|
||||
},
|
||||
{
|
||||
title: '会议通知',
|
||||
eng: 'Meeting Notice',
|
||||
anchor: 'notice',
|
||||
id: 1402
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -80,10 +77,6 @@ export const homePage = [
|
|||
export const agendaDateList = ['10月21日', '10月22日']
|
||||
|
||||
export const meetingAgenda = {
|
||||
agendaIds: {
|
||||
[agendaDateList[0]]: [1376, 1378],
|
||||
[agendaDateList[1]]: [1380, 1382]
|
||||
},
|
||||
tencentMeeting: {
|
||||
[agendaDateList[0]]: 360451552,
|
||||
[agendaDateList[1]]: 360451553
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
import { useState, useEffect } from 'react';
|
||||
import { getDirList } from '../utils/request/api';
|
||||
|
||||
export default function Page() {
|
||||
const [dirList, setDirList] = useState({});
|
||||
|
||||
useEffect(() => {
|
||||
getDirList().then((res) => {
|
||||
if (res && res.rows.length > 0) {
|
||||
let idList = {}
|
||||
res.rows.map(e => {
|
||||
idList[e.name] = e.id
|
||||
})
|
||||
console.log(idList)
|
||||
setDirList(idList);
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
return {
|
||||
dirList,
|
||||
};
|
||||
};
|
|
@ -10,6 +10,7 @@ import { homePage } from '../../constants/info'
|
|||
import { getBaseInfo, getPartnerList } from '../../utils/request/api'
|
||||
import { useRef, useState, useEffect } from 'react';
|
||||
import { throttle } from '../../utils/util'
|
||||
import empty from 'img/empty.png'
|
||||
|
||||
|
||||
function HomePage(){
|
||||
|
@ -118,8 +119,10 @@ function HomePage(){
|
|||
<span>INTRODUCTION TO THE CONFERENCE</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="intro-content">
|
||||
{ mainInfo.introductionContent }
|
||||
<div className="intro-content" dangerouslySetInnerHTML={{
|
||||
__html: mainInfo.introductionContent
|
||||
}}>
|
||||
{/* { mainInfo.introductionContent } */}
|
||||
</div>
|
||||
<ul className="menu">
|
||||
{
|
||||
|
@ -150,7 +153,7 @@ function HomePage(){
|
|||
</div>
|
||||
</div>
|
||||
{
|
||||
partner && partner.length > 0 &&
|
||||
partner && partner.length > 0 ?
|
||||
<div className="partner-content">
|
||||
{
|
||||
partner.map((e, k) => {
|
||||
|
@ -176,7 +179,8 @@ function HomePage(){
|
|||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>:
|
||||
<img className="empty" src={ empty } alt="" />
|
||||
}
|
||||
{/* <div className="partner-type">
|
||||
<div className="type-title">
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
.fixed-menu {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 500px;
|
||||
top: 35%;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
.guide-line {
|
||||
|
@ -137,7 +137,7 @@
|
|||
align-self: center;
|
||||
.menu-item {
|
||||
padding: 0 15px;
|
||||
margin: 0 10px;
|
||||
margin: 0 15px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
@ -6,7 +6,7 @@ import titleIcon from 'img/homePage/title-icon.png'
|
|||
import empty from 'img/empty.png'
|
||||
|
||||
import RenderHtml from '../../components/renderHtml'
|
||||
import { useLocation } from 'umi';
|
||||
import { useLocation, useModel } from 'umi';
|
||||
import { Spin } from 'antd'
|
||||
import { Base64 } from 'js-base64';
|
||||
import { getDocList, getSubAgenda } from '../../utils/request/api'
|
||||
|
@ -21,17 +21,20 @@ function MeetingAgenda(){
|
|||
const [ mainList, setMainList ] = useState([])
|
||||
const [ subList, setSubList ] = useState([])
|
||||
const [ isSpin , setIsSpin ] = useState(false);
|
||||
const { dirList } = useModel('defaultConfig')
|
||||
|
||||
useEffect(()=>{
|
||||
getMeetingAgendas();
|
||||
},[activeTab])
|
||||
if ( JSON.stringify(dirList) !== '{}' ) {
|
||||
getMeetingAgendas();
|
||||
}
|
||||
},[activeTab, dirList])
|
||||
|
||||
const getMeetingAgendas = () => {
|
||||
getDocList(meetingAgenda.agendaIds[activeTab][0], ).then(res => {
|
||||
getDocList( dirList[`${activeTab}主会场`] ).then(res => {
|
||||
setMainList(res.rows)
|
||||
})
|
||||
setIsSpin(true)
|
||||
getSubAgenda(meetingAgenda.agendaIds[activeTab][1], ).then(res => {
|
||||
getSubAgenda( dirList[`${activeTab}分会场`] ).then(res => {
|
||||
let list = []
|
||||
res.rows.map(e => {
|
||||
e.content = Base64.decode(e.content)
|
||||
|
@ -71,8 +74,8 @@ function MeetingAgenda(){
|
|||
<div className="content-right">
|
||||
<div className="meeting">
|
||||
<span>腾讯会议号:{ meetingAgenda.tencentMeeting[activeTab] }</span>
|
||||
<a href={ meetingAgenda.bilibiliLive[activeTab] } target='_blank' >进入B站直播间</a>
|
||||
<a href={ meetingAgenda.live[activeTab] } target='_blank' >进入直播间</a>
|
||||
<a href={ meetingAgenda.bilibiliLive[activeTab] } target='_blank' >进入B站直播间</a>
|
||||
</div>
|
||||
<div className="agenda-detail">
|
||||
<div className="top-dot"></div>
|
||||
|
|
|
@ -27,7 +27,7 @@ function Member(props) {
|
|||
for(let i = 0; i< array.length;) {
|
||||
newArray.push(array.slice(i, i += 10));
|
||||
}
|
||||
setTopics([])
|
||||
setTopics(newArray)
|
||||
}
|
||||
|
||||
return <div className="member wrapper" id="member">
|
||||
|
|
|
@ -4,20 +4,24 @@ import { useState , useEffect } from 'react';
|
|||
import { information } from '../../constants/info';
|
||||
import { getDocList } from '../../utils/request/api'
|
||||
import empty from 'img/empty.png'
|
||||
import { useModel } from 'umi';
|
||||
|
||||
function Information() {
|
||||
const [ isSpin , setIsSpin ] = useState(false);
|
||||
const [ informationList , setInformationList ] = useState([]);
|
||||
const { dirList } = useModel('defaultConfig')
|
||||
|
||||
useEffect(()=>{
|
||||
getAllLists();
|
||||
},[])
|
||||
if ( JSON.stringify(dirList) !== '{}' ) {
|
||||
getAllLists();
|
||||
}
|
||||
},[dirList])
|
||||
|
||||
const getAllLists = () => {
|
||||
setIsSpin(true);
|
||||
const requestList = [];
|
||||
information.category.map(e => {
|
||||
requestList.push(getList(e.id, e.anchor))
|
||||
requestList.push(getList(dirList[e.title], e.anchor))
|
||||
})
|
||||
Promise.all(requestList).then(res => {
|
||||
let totalList = {}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
bottom: -3px;
|
||||
left: -10px;
|
||||
opacity: 9%;
|
||||
width: 154px;
|
||||
width: 100%;
|
||||
height: 11px;
|
||||
background-color: #0d41c5;
|
||||
}
|
||||
|
@ -56,6 +56,7 @@
|
|||
color: #252b3a;
|
||||
font-size: 15px;
|
||||
margin-bottom: 37px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
.module-content {
|
||||
display: flex;
|
||||
|
|
|
@ -98,4 +98,15 @@ export function getDocDetail(id){
|
|||
url:`/api/cms/doc/open/${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有栏目列表
|
||||
* @returns
|
||||
*/
|
||||
export function getDirList(){
|
||||
return http({
|
||||
url:`/api/cms/doc/open/zone/${config.zoneId}/dirList`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue