Commit e12bdae3 authored by mxm-web-develop's avatar mxm-web-develop

finished

parent 73a65255
src/assets/img/33logo.png

4.19 KB | W: | H:

src/assets/img/33logo.png

4.62 KB | W: | H:

src/assets/img/33logo.png
src/assets/img/33logo.png
src/assets/img/33logo.png
src/assets/img/33logo.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -38,7 +38,7 @@ const HoverLink = (props: HoverLinkType) => { ...@@ -38,7 +38,7 @@ const HoverLink = (props: HoverLinkType) => {
onPointerEnter={() => setOnHover(true)} onPointerEnter={() => setOnHover(true)}
onPointerLeave={() => setOnHover(false)} onPointerLeave={() => setOnHover(false)}
> >
<div className="cursor-pointer opacity-70">合作生态</div> <div className={`cursor-pointer ${ props.theme === "light" ? "text-[#061E3B]" : " opacity-70 text-white "}`}>合作生态</div>
{onHover ? ( {onHover ? (
<div <div
className={`w-[185%] className={`w-[185%]
...@@ -95,9 +95,9 @@ export default function Navbar(props: IAppProps) { ...@@ -95,9 +95,9 @@ export default function Navbar(props: IAppProps) {
if (pathname.includes("/news/")) { if (pathname.includes("/news/")) {
return true; return true;
} }
// else if(pathname.includes("/details/")){ if(pathname.includes("/docs/")){
// return true; return true;
// } }
return false; return false;
}, [pathname]); }, [pathname]);
...@@ -112,7 +112,7 @@ export default function Navbar(props: IAppProps) { ...@@ -112,7 +112,7 @@ export default function Navbar(props: IAppProps) {
(theme: string, active: boolean) => { (theme: string, active: boolean) => {
if (theme === "light") { if (theme === "light") {
if (active) { if (active) {
return "text-theme-dark content-sub2-title-cn py-0 hover:text-theme-blue cursor-pointer"; return "text-theme-blue content-sub2-title-cn py-0 hover:text-theme-blue cursor-pointer";
} }
return "text-[#061E3B] font-normal hover:text-theme-blue cursor-pointer"; return "text-[#061E3B] font-normal hover:text-theme-blue cursor-pointer";
} else { } else {
......
...@@ -140,7 +140,7 @@ export const aboutBalls=[ ...@@ -140,7 +140,7 @@ export const aboutBalls=[
{ {
size: "25%", size: "25%",
align: "right", align: "right",
position: ["-85px", "10%"], position: ["-85px", "20%"],
zIndex: "-999", zIndex: "-999",
color: "blue", color: "blue",
} }
...@@ -159,7 +159,7 @@ export const aboutBalls=[ ...@@ -159,7 +159,7 @@ export const aboutBalls=[
{ {
size: "25%", size: "25%",
align: "right", align: "right",
position: ["-85px", "10%"], position: ["-85px", "20%"],
zIndex: "-999", zIndex: "-999",
color: "blue", color: "blue",
} }
...@@ -178,7 +178,7 @@ export const aboutBalls=[ ...@@ -178,7 +178,7 @@ export const aboutBalls=[
{ {
size: "25%", size: "25%",
align: "right", align: "right",
position: ["-85px", "10%"], position: ["-85px", "20%"],
zIndex: "-999", zIndex: "-999",
color: "blue", color: "blue",
} }
......
import { AxiosRequestConfig, AxiosResponse } from "axios"; import { AxiosRequestConfig, AxiosResponse } from "axios";
import { count, from, map, Observable,reduce,tap } from "rxjs"; import { count, from, map, Observable,reduce,tap } from "rxjs";
import { initialization } from "./axios"; import { initialization } from "./axios";
import dayjs from "dayjs";
import {chunk as _chunk} from 'lodash'; import {chunk as _chunk} from 'lodash';
export const baseURL = import.meta.env.VITE_FETCH_URL export const baseURL = import.meta.env.VITE_FETCH_URL
export const axiosRequestConfiguration: AxiosRequestConfig = { export const axiosRequestConfiguration: AxiosRequestConfig = {
...@@ -36,13 +37,21 @@ export const getJobs = async(department?: string)=>{ ...@@ -36,13 +37,21 @@ export const getJobs = async(department?: string)=>{
} }
} }
function compare(a:any,b:any) {
if ( dayjs(a.date ,'YYYY-MM-DD').unix() < dayjs(b.date ,'YYYY-MM-DD').unix()){
return 1;
}
if ( dayjs(a.date ,'YYYY-MM-DD').unix() > dayjs(b.date ,'YYYY-MM-DD').unix() ){
return -1;
}
return 0;
}
export const getEvents = (index:number)=>{ export const getEvents = (index:number)=>{
// const res = await req.get('/events') // const res = await req.get('/events')
const observable = from(req.get('/events')).pipe(map(res =>res.data),map((v,i) =>{ const observable = from(req.get('/events')).pipe(map(res =>res.data),map((v,i) =>{
const l = v.length const newarr = v.sort(compare)
// const group = Math.ceil(l/index) const output= _chunk(newarr,index)
const output= _chunk(v,index)
return output return output
})); }));
return observable return observable
......
...@@ -2,6 +2,7 @@ import {service , newsService} from "."; ...@@ -2,6 +2,7 @@ import {service , newsService} from ".";
import { Job } from "./types"; import { Job } from "./types";
import {filter, from, map} from "rxjs" import {filter, from, map} from "rxjs"
import { AxiosResponse } from "axios"; import { AxiosResponse } from "axios";
import dayjs from "dayjs";
export const getJobsByDept = async (department: string) => { export const getJobsByDept = async (department: string) => {
return service.get<unknown, Job[]>( return service.get<unknown, Job[]>(
'/jobs', '/jobs',
...@@ -18,10 +19,21 @@ export const getJobsById = async (id: string) => { ...@@ -18,10 +19,21 @@ export const getJobsById = async (id: string) => {
`/jobs/${id}`, `/jobs/${id}`,
) )
} }
function compare(a:any,b:any) {
if ( a.time_stamp < b.time_stamp ){
return 1;
}
if (a.time_stamp >b.time_stamp ){
return -1;
}
return 0;
}
export const getNews = () => { export const getNews = () => {
const res = newsService.get(`news/newsList`) const res = newsService.get(`news/newsList`)
const observable = from(res).pipe(filter(r=>r.data)) const observable = from(res).pipe(map(r=>r.data.list),map(k=>{
const newarr = k.sort(compare)
return newarr
}))
return observable return observable
} }
......
...@@ -31,7 +31,10 @@ export const Contact = () => { ...@@ -31,7 +31,10 @@ export const Contact = () => {
<div> <div>
<div className="pb-[60px]"> <div className="pb-[60px]">
<div className="hero-title">Contact us</div> <div className="hero-title">Contact us</div>
<div className="subTitle-1-cn">联系我们</div> <div className="subTitle-1-cn py-3 flex items-center gap-x-5">
<div className=" w-[80px] h-[2px] bg-theme-dark rounded"></div>
<div>联系我们</div>
</div>
</div> </div>
<div className="grid grid-cols-2 gap-x-[100px] gap-y-[30px] pb-12"> <div className="grid grid-cols-2 gap-x-[100px] gap-y-[30px] pb-12">
......
...@@ -23,13 +23,13 @@ interface DtailContainerType extends IProps { ...@@ -23,13 +23,13 @@ interface DtailContainerType extends IProps {
const DataGrid = (props: DataGridType) => { const DataGrid = (props: DataGridType) => {
const { data, doSetSelecteItem,className } = props; const { data, doSetSelecteItem,className } = props;
return ( return (
<div className={`grid grid-cols-3 gap-y-[15px] ${className}`}> <div className={`grid grid-cols-3 ${className}`}>
{data?.map((i, index) => ( {data?.map((i, index) => (
<div onClick={()=>doSetSelecteItem(i.id)} key={index}> <div onClick={()=>doSetSelecteItem(i.id)} key={index}>
<HoverBox className='w-[270px] cursor-pointer flex items-center justify-between px-[20px] py-2'> <HoverBox className='w-[270px] cursor-pointer flex items-center py-[15px] justify-between px-[20px] '>
<> <>
<div> <div>
<div className="content-title-cn h-[48px] w-[100%] line-clamp-1 ">{i.title}</div> <div className="content-title-cn h-[36px] pt-0 pb-[5px] w-[100%] line-clamp-1 ">{i.title}</div>
<div className='normal-content'>{i.diploma}</div> <div className='normal-content'>{i.diploma}</div>
<div className='normal-content'>{i.location}</div> <div className='normal-content'>{i.location}</div>
</div> </div>
...@@ -119,9 +119,8 @@ export const JoinUs = () => { ...@@ -119,9 +119,8 @@ export const JoinUs = () => {
return ( return (
<AppContianer> <AppContianer>
<div className="flex items-center h-full w-full relative py-[30px] "> <div className="flex items-center h-full w-full relative py-[30px] ">
<div className=" w-full"> <div className="w-full">
<div className="h-full min-h-[520px] w-full labtop:w-10/12 mx-auto flex gap-x-[160px]">
<div className="h-full min-h-[520px] w-full labtop:w-10/12 mx-auto flex gap-x-[100px]">
<div className='left translate-y-[130px] min-w-[100px]'> <div className='left translate-y-[130px] min-w-[100px]'>
<div className="flex-col justify-start items-center"> <div className="flex-col justify-start items-center">
{departments.map((i: string) => ( {departments.map((i: string) => (
...@@ -131,7 +130,7 @@ export const JoinUs = () => { ...@@ -131,7 +130,7 @@ export const JoinUs = () => {
selecteItem ? cancelAndSelect(i): setActivedDepartment(i); selecteItem ? cancelAndSelect(i): setActivedDepartment(i);
}} }}
className={`item cursor-pointer content-sub2-title-cn my-5 ${ className={`item cursor-pointer content-sub2-title-cn my-5 ${
activedDepartment !== i ? "text-gray-500" : "text-black" activedDepartment !== i ? "text-gray-500 font-[400]" : "text-black"
}`} }`}
> >
{i} {i}
...@@ -139,20 +138,23 @@ export const JoinUs = () => { ...@@ -139,20 +138,23 @@ export const JoinUs = () => {
))} ))}
</div> </div>
</div> </div>
<div className="flex-col w-full"> <div className="right flex-col w-full">
<div className="w-full pb-[40px]"> <div className="w-full pb-[40px]">
<div className="hero-title">Join us</div> <div className="hero-title">Join us</div>
<div className="subTitle-1-cn">加入我们</div> <div className="subTitle-1-cn py-3 flex items-center gap-x-5">
<div className=" w-[80px] h-[2px] bg-theme-dark rounded"></div>
<div>加入我们</div>
</div>
</div> </div>
{selecteItem ? ( {selecteItem ? (
<DtailContainer <DtailContainer
className="w-7/12" className="w-9/12"
doCancelSelecteItem={setSelecteItem} doCancelSelecteItem={setSelecteItem}
data={selectedItem} data={selectedItem}
></DtailContainer> ></DtailContainer>
) : ( ) : (
<DataGrid <DataGrid
className='w-10/12 -translate-x-[18px] ' className='w-10/12 -translate-x-[20px] -translate-y-[20px] '
data={selecteData ? selecteData : []} data={selecteData ? selecteData : []}
doSetSelecteItem={setSelecteItem} doSetSelecteItem={setSelecteItem}
></DataGrid> ></DataGrid>
......
import { IProps } from "@/common/Iprops.interface"; import { IProps } from "@/common/Iprops.interface";
import { useEffect, useMemo, useState } from "react"; import { useCallback, useEffect, useMemo, useState } from "react";
import { chunk as _chunk } from "lodash"; import { chunk as _chunk } from "lodash";
import { offset, flip, shift, arrow } from "@floating-ui/react-dom"; import { offset, flip, shift, arrow } from "@floating-ui/react-dom";
import { import {
...@@ -34,8 +34,11 @@ export const EventItem = (props: EventItemType) => { ...@@ -34,8 +34,11 @@ export const EventItem = (props: EventItemType) => {
// props // props
}), }),
]); ]);
const shortTitlte = useCallback((title: string)=>{
return title.slice(0,60)+'...'
},[data])
const move = useMemo(() => { const move = useMemo(() => {
return itmeIndex * 85 + "px"; return itmeIndex * 75 + "px";
}, [itmeIndex]); }, [itmeIndex]);
const dates = useMemo(() => { const dates = useMemo(() => {
let date; let date;
...@@ -49,7 +52,7 @@ export const EventItem = (props: EventItemType) => { ...@@ -49,7 +52,7 @@ export const EventItem = (props: EventItemType) => {
return ( return (
<> <>
<div <div
className={`max-w-[15.5rem] h-fit cursor-pointer`} className={`w-[225px] h-fit cursor-pointer`}
ref={reference} ref={reference}
style={{ style={{
transform: `translateY(${move})`, transform: `translateY(${move})`,
...@@ -59,20 +62,28 @@ export const EventItem = (props: EventItemType) => { ...@@ -59,20 +62,28 @@ export const EventItem = (props: EventItemType) => {
<div className="int-font-sub text-theme-dark"> <div className="int-font-sub text-theme-dark">
{dates && dates[0]}/ {dates && dates[0]}/
</div> </div>
<div className=" flex flex-col int-font-hero backdrop-opacity-30 text-theme-dark"> <div className=" flex flex-col int-font-hero backdrop-opacity-30 translate-x-[8px] text-theme-dark">
<div>{dates && dates[1]}</div> <div>{dates && dates[1]}</div>
<div className=" w-[80px] h-[2px] bg-theme-dark rounded"></div> <div className="w-[80px] h-[2px] bg-theme-dark rounded"></div>
</div> </div>
</div> </div>
<div className="py-2 normal-content line-clamp-3 h-[70px] text-justify overflow-y-hidden "> {/* <div className="py-2 normal-content text-right overflow-y-hidden "> */}
{data ? data.title : ""} <div className="h-[90px] overflow-y-hidden line-clamp-4">
</div>
<div
dangerouslySetInnerHTML={{ __html: data && data.title }}
className="pt-[10px] h-full text-right"
></div>
</div>
{/* {data && data.title.length>100?shortTitlte(data.title):data.title} */}
{/* </div> */}
</div> </div>
{open && data && data.title.length > 50 && ( {open && data && data.details && (
<div <div
ref={floating} ref={floating}
className="bg-theme-dark className="bg-theme-dark
normal-content z-[9999] text-white py-5 px-3 w-[270px] text-right rounded-md " normal-content z-[9999] text-white py-5 px-3 w-[270px] rounded-md "
style={{ style={{
position: strategy, position: strategy,
top: y ?? 0, top: y ?? 0,
...@@ -89,7 +100,7 @@ export const EventItem = (props: EventItemType) => { ...@@ -89,7 +100,7 @@ export const EventItem = (props: EventItemType) => {
export const EventCols = (props: EventColsType) => { export const EventCols = (props: EventColsType) => {
const { data } = props; const { data } = props;
return ( return (
<div className="grid grid-cols-4 pb-[3rem]"> <div className="grid grid-cols-4 gap-x-[] pb-[3rem]">
{data && {data &&
data.length > 0 && data.length > 0 &&
data.map((i: any, index: number) => ( data.map((i: any, index: number) => (
......
...@@ -54,7 +54,7 @@ export const Memorabilia = () => { ...@@ -54,7 +54,7 @@ export const Memorabilia = () => {
<div>大事记</div> <div>大事记</div>
</div> </div>
</div> </div>
<div className='w-10/12 relative '> <div className='w-[86%] labtop:w-10/12 relative '>
{ {
data? data?
<div className="relative flex"> <div className="relative flex">
......
...@@ -41,7 +41,7 @@ export const Partners = () => { ...@@ -41,7 +41,7 @@ export const Partners = () => {
</div> </div>
</div> </div>
<div className="flex w-2/12 pl-[50px] pt-[46px] z-[2000]"> <div className="flex gap-x-[20px] w-2/12 pl-[50px] pt-[46px] z-[2000]">
<div className="verticalText-cn">合作伙伴</div> <div className="verticalText-cn">合作伙伴</div>
<div className="hero-title verticalText">Partners</div> <div className="hero-title verticalText">Partners</div>
......
...@@ -60,7 +60,6 @@ const ServiceList = () => { ...@@ -60,7 +60,6 @@ const ServiceList = () => {
<ul className="py-5 content-sub-title-cn "> <ul className="py-5 content-sub-title-cn ">
{i.features.map((k, x) => ( {i.features.map((k, x) => (
<div className="mb-[10px] flex normal-content items-start" key={"child" + x}> <div className="mb-[10px] flex normal-content items-start" key={"child" + x}>
<img src={selectImg} /> <img src={selectImg} />
<div className="pl-3 -translate-y-[3px] font-bold">{k}</div> <div className="pl-3 -translate-y-[3px] font-bold">{k}</div>
</div> </div>
...@@ -92,7 +91,7 @@ export const Service = (props: ServiceType) => { ...@@ -92,7 +91,7 @@ export const Service = (props: ServiceType) => {
<div className=" w-10/12 flex items-center h-full"> <div className=" w-10/12 flex items-center h-full">
<ServiceList /> <ServiceList />
</div> </div>
<div className="flex w-2/12 pt-[46px] pl-[20px]"> <div className="flex gap-x-[20px] w-2/12 pt-[46px] pl-[20px]">
<div className="verticalText-cn">服务版本</div> <div className="verticalText-cn">服务版本</div>
<div className="hero-title verticalText">Service</div> <div className="hero-title verticalText">Service</div>
</div> </div>
......
...@@ -48,7 +48,6 @@ export const DocViewer = (props:DocViewerType)=>{ ...@@ -48,7 +48,6 @@ export const DocViewer = (props:DocViewerType)=>{
{ {
show?'':<div className='text-center'>Loading...</div> show?'':<div className='text-center'>Loading...</div>
} }
</div> </div>
</PageLayout> </PageLayout>
) )
......
...@@ -23,7 +23,7 @@ export const NewsDetails = (props: NewsDetailsType) => { ...@@ -23,7 +23,7 @@ export const NewsDetails = (props: NewsDetailsType) => {
}, [params]); }, [params]);
useEffect(() => { useEffect(() => {
getNews() getNews()
.pipe(map((v) => v.data.list)) .pipe(map((v) => v))
.subscribe((v) => { .subscribe((v) => {
const d = v.sort((a: any, b: any) => { const d = v.sort((a: any, b: any) => {
return b.time_stamp - a.time_stamp; return b.time_stamp - a.time_stamp;
......
...@@ -22,9 +22,9 @@ export default function News(props: IAppProps) { ...@@ -22,9 +22,9 @@ export default function News(props: IAppProps) {
useEffect(() => { useEffect(() => {
setLoading(true); setLoading(true);
(async () => { (async () => {
(await getNews()).pipe<any[]>(map((v) => v.data.list)).subscribe( (await getNews()).pipe<any[]>(map((v) => v)).subscribe(
(v) => { (v) => {
const result = v.filter((v, i) => i < 10); // const result = v.filter((v, i) => i < 10);
setNews(v); setNews(v);
setLoading(false); setLoading(false);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment