diff --git a/public/css/gitlink.min.css b/public/css/gitlink.min.css index 40f3ec41..512b7ad8 100644 --- a/public/css/gitlink.min.css +++ b/public/css/gitlink.min.css @@ -16,6 +16,10 @@ font-family: "alibabaReg"; src: url("../fonts/ALIBABA-PUHUITI-REGULAR.TTF"); } +@font-face { + font-family: "alibabaBold"; + src: url("../fonts/ALIBABA-PUHUITI-BOLD.TTF"); +} @font-face { font-family: "ziyouwenyihei"; src: url("../fonts/ziyouwenyihei.ttf"); diff --git a/public/fonts/ALIBABA-PUHUITI-BOLD.TTF b/public/fonts/ALIBABA-PUHUITI-BOLD.TTF new file mode 100644 index 00000000..af57de0e Binary files /dev/null and b/public/fonts/ALIBABA-PUHUITI-BOLD.TTF differ diff --git a/src/constants/factory.js b/src/constants/factory.js index d41b87aa..f28d07ae 100644 --- a/src/constants/factory.js +++ b/src/constants/factory.js @@ -1,4 +1,7 @@ export const factoryZoneId = 2 export const dirId = 9 -export const versionId = 5 -export const lessonId = 6 \ No newline at end of file +export const versionId = '工厂版本' +export const lessonId = '学习资源' +export const toolId = '开发工具' +export const standardId = '标准规范' +export const manualId = '用户手册' \ No newline at end of file diff --git a/src/factory/common.scss b/src/factory/common.scss index 4d0bc038..5130bfcc 100644 --- a/src/factory/common.scss +++ b/src/factory/common.scss @@ -22,6 +22,8 @@ &:hover { animation: border-glint 2s linear; + border: 2px solid transparent !important; + background-image: linear-gradient(to bottom right, #0b0333, #091221), linear-gradient(125deg, hsla(0, 0%, 100%, 0) 45%, hsla(0, 0%, 100%, .6) 50%, hsla(0, 0%, 100%, 0) 53%) !important; } } diff --git a/src/factory/components/Feature/index.jsx b/src/factory/components/Feature/index.jsx index 2b4b2b09..3e589aa7 100644 --- a/src/factory/components/Feature/index.jsx +++ b/src/factory/components/Feature/index.jsx @@ -1,7 +1,7 @@ import React, { useEffect, useState, useRef } from 'react'; import './index.scss'; import featureLeft1 from '../../../images/factory/feature-left-1.webp'; -import featureright1 from '../../../images/factory/feature-right-1.webp'; +import featureright1 from '../../../images/factory/feature-right-1.png'; import featureBottom1 from '../../../images/factory/feature-bottom-1.webp'; import gif1 from '../../../images/factory/feature-gif-1.webp' import gif2 from '../../../images/factory/feature-gif-2.gif' @@ -51,7 +51,7 @@ function Feature(props) {

数字化纳管,掌控研发全链路

研发活动及制品全流程数字化纳管,支持精准决策和持续优化

- {/* */} +
diff --git a/src/factory/components/Feature/index.scss b/src/factory/components/Feature/index.scss index 3724a936..157c86d5 100644 --- a/src/factory/components/Feature/index.scss +++ b/src/factory/components/Feature/index.scss @@ -1,6 +1,13 @@ .factory-feature { margin: auto; - margin-top: 67px; + padding-top: 67px; + background-image: url('../../../images/factory/feature-bg.png'); + background-repeat: no-repeat; + background-size: 100% auto; + background-position: center -0px; + h1 { + color: #ffffff !important; + } .feature-content { width: 1600px; @@ -15,10 +22,12 @@ box-shadow: 0px 0px 18px rgba(0, 74, 168, 0.05); border-color: rgba(22, 76, 228, 0.2); display: flex; + background-repeat: no-repeat; + background-size: 100% 100%; h3 { line-height: 35px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 26px; @@ -65,6 +74,7 @@ height: 506px; margin-right: 25px; position: relative; + background-image: url('../../../images/factory/feature-left-bg.webp'); img { width: 614px; @@ -72,11 +82,11 @@ } &-gif { - width: 108px !important; - height: 111px !important; + width: 128px !important; + height: 128px !important; position: absolute; - left: 270px; - top: 260px + left: 265px; + top: 250px } } @@ -84,6 +94,7 @@ width: 787.5px; height: 502px; position: relative; + background-image: url('../../../images/factory/feature-right-bg.webp'); img { width: 770px; @@ -91,11 +102,11 @@ margin-top: 35px; } &-gif { - width: 160px !important; - height: 120px !important; + width: 72px !important; + height: 54px !important; position: absolute; - left: 180px; - top: 120px + left: 178px; + top: 263px } } } @@ -106,6 +117,7 @@ display: flex; align-items: center; position: relative; + background-image: url('../../../images/factory/feature-bottom-bg.webp'); h3 { margin-left: 50px; @@ -121,11 +133,11 @@ height: 315px; } &-gif { - width: 72px !important; - height: 57px !important; + width: 93px !important; + height: 70px !important; position: absolute; - left: 620px; - top: 130px + left: 608px; + top: 125px } } } diff --git a/src/factory/components/News/index.scss b/src/factory/components/News/index.scss index d84c88ba..31be3c58 100644 --- a/src/factory/components/News/index.scss +++ b/src/factory/components/News/index.scss @@ -97,7 +97,7 @@ border-radius: 50%; width: 5px; height: 5px; - background: rgba(9, 18, 33, 0.12); + background: rgba(9, 18, 33, 0.42); } } @@ -144,11 +144,16 @@ } h3 { + // width: 400px; line-height: 40px; font-family: alibaba; font-weight: 500; color: #091221; font-size: 24px; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; } p { @@ -250,7 +255,7 @@ } p { - margin-top: 19px; + margin-top: 10px; line-height: 35px; font-family: alibabareg; color: #091221; @@ -316,7 +321,7 @@ font-family: alibaba; font-weight: 500; color: #091221; - font-size: 24px; + font-size: 22px; max-width: 670px; white-space: nowrap; text-overflow: ellipsis; diff --git a/src/factory/components/Resource/index.jsx b/src/factory/components/Resource/index.jsx index 41789642..8d2266bf 100644 --- a/src/factory/components/Resource/index.jsx +++ b/src/factory/components/Resource/index.jsx @@ -5,8 +5,9 @@ import { ScrollTrigger } from 'gsap/ScrollTrigger'; import KFIcon from '../../../components/KFIcon'; import { Link } from 'react-router-dom'; import { getProjectsLists, getSourceList, httpUrl } from '../../api'; -import { factoryZoneId, lessonId , versionId } from '../../../constants/factory' +import { factoryZoneId, lessonId , versionId, toolId } from '../../../constants/factory' import { downloadFunc } from '../../../forge/Utils/utils' +import '../../common.scss' gsap.registerPlugin(ScrollTrigger); @@ -117,15 +118,15 @@ const Resource = forwardRef(({ zoneId }, ref) => { } const getVersionList = () => { - getSourceList({ id: factoryZoneId, domainId: versionId }).then(res => { + getSourceList({ id: factoryZoneId, keywords: versionId }).then(res => { setResourceList2(res.data.rows.slice(0, 4)); }); } const getToolsList = () => { - getSourceList({ id: factoryZoneId }).then(res => { + getSourceList({ id: factoryZoneId, keywords: toolId }).then(res => { if (res.data.rows) { - const rows = res.data.rows.filter(e => e.domainId !== lessonId && e.domainId !== versionId) + const rows = res.data.rows setResourceList3(rows.slice(0, 6)); } }); @@ -211,8 +212,8 @@ const Resource = forwardRef(({ zoneId }, ref) => {
{item.name}
{item.summary}
- - + +
}) diff --git a/src/factory/components/Resource/index.scss b/src/factory/components/Resource/index.scss index 776ded00..7b3678d9 100644 --- a/src/factory/components/Resource/index.scss +++ b/src/factory/components/Resource/index.scss @@ -17,7 +17,7 @@ .module-title { opacity: 0; - font-family: alibaba; + font-family: alibabaBold; color: #091221; font-size: 44px; line-height: 50px; @@ -55,7 +55,7 @@ .resource-1 { top: 0; height: 663px; - background: #f3f9fc; + background: #d3ecfc; z-index: 1; .panel-content .content-right { @@ -143,7 +143,7 @@ .resource-2 { top: 742px; height: 350px; - background: #f1f4ff; + background: #e6ecff; z-index: 2; .panel-content .content-right { @@ -167,6 +167,12 @@ margin-top: 21px; line-height: 26px; } + button { + &:hover { + border-color: #164ce4; + color: #164ce4; + } + } } } } @@ -174,7 +180,7 @@ .resource-3 { top: 1170px; height: 622px; - background: #ecf6ff; + background: #d5dfff; z-index: 3; .content-item3 { width: 385px; @@ -193,9 +199,18 @@ margin-top: auto; button { margin-right: 20px; + background-color: #ffffff; + color: #091221; &:nth-child(1) { - background: #091221; + background-color: #091221; color: #ffffff; + border: none; + } + &:nth-child(2) { + &:hover { + border-color: #164ce4; + color: #164ce4; + } } } } @@ -228,7 +243,7 @@ h3 { margin-top: 25px; line-height: 35px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 26px; @@ -249,6 +264,9 @@ color: #164ce4; font-size: 14px; width: fit-content; + &:hover { + opacity: 0.7; + } span { display: inline-block; diff --git a/src/factory/components/Resource2/index.jsx b/src/factory/components/Resource2/index.jsx index 38821f53..6ab57c02 100644 --- a/src/factory/components/Resource2/index.jsx +++ b/src/factory/components/Resource2/index.jsx @@ -6,9 +6,15 @@ import KFIcon from '../../../components/KFIcon'; import back1 from '../../../images/factory/back1.png' import back2 from '../../../images/factory/back2.png' import tagIcon from '../../../images/factory/lessons-tag-icon.webp' +import '../../common.scss' +import { getSourceList } from '../../api' +import { factoryZoneId, manualId, standardId } from '../../../constants/factory' +import { downloadFunc } from '../../../forge/Utils/utils' const Resource2 = forwardRef(({ zoneId }, ref) => { const [isVisible, setIsVisible] = useState(false); + const [standard, setStandard] = useState({}); + const [manualList, setManualList] = useState([]); useEffect(() => { const observer = new IntersectionObserver((entries) => { @@ -17,6 +23,9 @@ const Resource2 = forwardRef(({ zoneId }, ref) => { observer.disconnect(); } }, { threshold: 0.1 }); + getStandard() + getManualList() + if (ref.current) { observer.observe(ref.current); @@ -24,6 +33,34 @@ const Resource2 = forwardRef(({ zoneId }, ref) => { return () => observer.disconnect(); }, []); + const getStandard = () => { + getSourceList({ id: factoryZoneId, keywords: standardId }).then(res => { + const rows = [] + res.data.rows.forEach(e => { + let extendData = {} + if (e.extendData) { + extendData = JSON.parse(e.extendData) + } + rows.push({ ...e, extendDataUrl: extendData.url, extendDataHeadImg: extendData.headImg }) + }); + setStandard(rows[0]); + }); + } + + const getManualList = () => { + getSourceList({ id: factoryZoneId, keywords: manualId }).then(res => { + const rows = [] + res.data.rows.forEach(e => { + let extendData = {} + if (e.extendData) { + extendData = JSON.parse(e.extendData) + } + rows.push({ ...e, extendDataUrl: extendData.url, extendDataHeadImg: extendData.headImg }) + }); + setManualList(rows.slice(0, 2)); + }); + } + return (
{

Numpy科学计算

本AI核心通识课课程是一门全面且深入的入门课程,旨在为学生提供一个从基础到高级的全方位...

- +
@@ -48,7 +85,7 @@ const Resource2 = forwardRef(({ zoneId }, ref) => {

探索数据类型

本AI核心通识课课程是一门全面且深入的入门课程,旨在为学生提供一个从基础到高级的全方位...

- +
@@ -58,31 +95,34 @@ const Resource2 = forwardRef(({ zoneId }, ref) => {
- 最新规范 + 最新规范 自动合规 行业对齐
-

标准规范

-

我是文案我是文案占2行我是文案我是文案占2行我是文案我是文案占2行我是文案占2行

- + { + standard.name && <> +

{standard.name}

+

{standard.summary}

+ + + }
- 用户手册 + 用户手册

软件工厂用户手册

-
-

软件工厂白皮书

-

一站式操作指南,覆盖项目管理、三库管理、流水线配置等全环节

-
-
-

软件工厂用户手册

-

涵盖软件工厂需求、设计、开发、测试、运维全生命周期,助力构

- -
+ { + manualList.map((item, index) => { + return
+

{ item.name }

+

{ item.summary }

+
+ }) + }
diff --git a/src/factory/components/Resource2/index.scss b/src/factory/components/Resource2/index.scss index a7d35c4d..e5f0bf7f 100644 --- a/src/factory/components/Resource2/index.scss +++ b/src/factory/components/Resource2/index.scss @@ -9,7 +9,7 @@ h3 { line-height: 35px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 26px; @@ -71,7 +71,7 @@ h4 { line-height: 30px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 22px; @@ -99,6 +99,12 @@ font-size: 14px; text-align: center; margin-top: auto; + // background: #ffffff !important; + background-image: linear-gradient(#ffffff, #ffffff) ; + &:hover { + background-color: #091221 !important; + color: #ffffff; + } } } @@ -194,6 +200,12 @@ font-weight: 500; color: #091221; font-size: 14px; + background-color: transparent; + background-image: none; + &:hover { + background-color: #091221 !important; + color: #ffffff; + } } h3, @@ -226,20 +238,12 @@ h4 { line-height: 25px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 18px; } - p { - margin-top: 18px; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - overflow: hidden; - } - i { margin-left: auto; height: 25px; @@ -273,6 +277,14 @@ } + p { + margin-top: 18px; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + } + &:nth-child(1) { h4 { &::before { diff --git a/src/factory/components/Scene/index.scss b/src/factory/components/Scene/index.scss index 8e382fbc..2ca6190c 100644 --- a/src/factory/components/Scene/index.scss +++ b/src/factory/components/Scene/index.scss @@ -21,7 +21,7 @@ h3 { line-height: 35px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 26px; diff --git a/src/factory/components/Waves/index.scss b/src/factory/components/Waves/index.scss index 9f8f2189..779de060 100644 --- a/src/factory/components/Waves/index.scss +++ b/src/factory/components/Waves/index.scss @@ -4,9 +4,9 @@ --wave-height: 150px; --wave-height-sm: 50px; --wave-gradient: linear-gradient(360deg, - rgba(67, 97, 238, 0.2) 0%, - rgba(114, 9, 183, 0.3) 100%); - --wave-color: rgba(67, 97, 238, 0.25); + rgba(67, 97, 238, 0.3) 0%, + rgba(113, 9, 183, 0.6) 100%); + --wave-color: rgba(67, 98, 238, 0.534); } /* 基础波浪样式 */ diff --git a/src/factory/index.scss b/src/factory/index.scss index 4107f8ba..4846cf95 100644 --- a/src/factory/index.scss +++ b/src/factory/index.scss @@ -144,7 +144,7 @@ .module-title { opacity: 0; - font-family: alibaba; + font-family: alibabaBold; color: #091221; font-size: 44px; margin-bottom: 10px; diff --git a/src/factory/lessons/index.jsx b/src/factory/lessons/index.jsx index c9c79152..a60ab704 100644 --- a/src/factory/lessons/index.jsx +++ b/src/factory/lessons/index.jsx @@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react'; import './index.scss'; import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC"; import KFIcon from '../../components/KFIcon/index'; -import { factoryZoneId, lessonId } from '../../constants/factory' +import { factoryZoneId, lessonId, manualId, standardId } from '../../constants/factory' import { Carousel } from 'antd'; import back1 from '../../images/factory/back1.png' import back2 from '../../images/factory/back2.png' @@ -13,9 +13,11 @@ import '../common.scss' import { Link } from "react-router-dom"; import Waves from '../components/Waves/index' import moment from 'moment'; +import { getSourceList } from '../api' +import { downloadFunc } from '../../forge/Utils/utils' +import chapterBg from '../../images/factory/lessons/chapter-bg.webp' const backList = [back1, back2, back3] -import { getSourceList } from '../api' function Index(props) { const [nowTop, setNowTop] = useState({}) @@ -23,20 +25,61 @@ function Index(props) { const carouselEL = useRef(null); const [chapterList, setChapterList] = useState([]); + const [standardList, setStandardList] = useState([]); + const [manualList, setManualList] = useState([]); useEffect(() => { getFullList(); + getStandardList(); + getManualList(); }, []); const getFullList = () => { - getSourceList({ id: factoryZoneId, domainId: lessonId }).then(res => { - setChapterList(res.data.rows); + getSourceList({ id: factoryZoneId, keywords: lessonId }).then(res => { + const rows = [] + res.data.rows.forEach(e => { + let extendData = {} + if (e.extendData) { + extendData = JSON.parse(e.extendData) + } + rows.push({ ...e, extendDataUrl: extendData.url, extendDataHeadImg: extendData.headImg }) + }); + setChapterList(rows); }); }; + const getStandardList = () => { + getSourceList({ id: factoryZoneId, keywords: standardId }).then(res => { + const rows = [] + res.data.rows.forEach(e => { + let extendData = {} + if (e.extendData) { + extendData = JSON.parse(e.extendData) + } + rows.push({ ...e, extendDataUrl: extendData.url, extendDataHeadImg: extendData.headImg }) + }); + setStandardList(rows); + }); + } + + const getManualList = () => { + getSourceList({ id: factoryZoneId, keywords: manualId }).then(res => { + const rows = [] + res.data.rows.forEach(e => { + let extendData = {} + if (e.extendData) { + extendData = JSON.parse(e.extendData) + } + rows.push({ ...e, extendDataUrl: extendData.url, extendDataHeadImg: extendData.headImg }) + }); + setManualList(rows); + }); + } + return (
+

学习专区,多样资源服务工厂应用

我是学习专区文案我是学习专区文案我是学习专区文案我是学习专区文案我是学习专区文案我是学习专区文案XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

@@ -96,35 +139,35 @@ function Index(props) {
@@ -140,7 +183,7 @@ function Index(props) { { chapterList.slice(0, 3).map((item, index) => { return
- +

{item.name}

{item.summary}

@@ -148,7 +191,7 @@ function Index(props) { {item.domainName}
- +
@@ -160,14 +203,14 @@ function Index(props) { chapterList.slice(3).map((item, index) => { return
-

{item.name}

+

{ window.open(item.extendDataUrl) }}>{item.name}

{item.summary}

- { moment(item.createTime).format('YYYY/MM/DD')} + {moment(item.createTime).format('YYYY/MM/DD')}
}) @@ -178,17 +221,16 @@ function Index(props) {

标准规范

{ - [1, 2, 3].map((item, index) => { + standardList.slice(0, 3).map((item, index) => { return
-

XXXXXXX标准规范

- +

{item.name}

+
-

我是标准规范的副文案占一行我是标准规范的副文案占一行

+

{item.summary}

- +
-
}) } @@ -204,18 +246,17 @@ function Index(props) {

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

-
- -
软件工厂用户手册
-

一站式操作指南,覆盖项目管理、三库管理、流水线配置等全环节,辅以图文,助力用户快速上手。

- -
-
- -
软件工厂
白皮书
-

一站式操作指南,覆盖项目管理、三库管理、流水线配置等全环节,辅以图文,助力用户快速上手。

- -
+ { + manualList.slice(0, 3).map((item, index) => { + const nameList = item.name.split('软件工厂') + return
+ + { index === 0 ?
{item.name}
:
软件工厂
{ nameList[1] }
} +

{ item.summary }

+ +
+ }) + }
diff --git a/src/factory/lessons/index.scss b/src/factory/lessons/index.scss index 0cd71f95..f25bb0a4 100644 --- a/src/factory/lessons/index.scss +++ b/src/factory/lessons/index.scss @@ -3,6 +3,7 @@ display: flex; flex-direction: column; align-items: center; + position: relative; p { font-family: alibabareg; @@ -16,7 +17,7 @@ h2 { line-height: 55px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 40px; @@ -28,6 +29,12 @@ } } + &-bg { + position: absolute; + width: 100%; + top: 880px; + } + &-header { width: 100%; display: flex; @@ -39,6 +46,11 @@ background-size: 100% 100%; position: relative; + video { + width: 100%; + height: 400px; + } + p { margin-top: 35px; @@ -83,7 +95,7 @@ h3 { line-height: 35px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 26px; @@ -252,6 +264,7 @@ .chapter { width: 1600px; margin-top: 70px; + z-index: 1; &-chapter1 { display: flex; @@ -289,7 +302,7 @@ h4 { line-height: 30px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 22px; @@ -405,7 +418,7 @@ h4 { max-width: 340px; line-height: 30px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 22px; @@ -516,6 +529,7 @@ } .standard { + z-index: 1; width: 100%; margin-top: 70px; background-image: url('../../images/factory/lessons/standard-bg.webp'); @@ -556,7 +570,7 @@ display: flex; h4 { line-height: 33px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 24px; @@ -635,7 +649,7 @@ h4 { line-height: 30px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 22px; @@ -685,7 +699,7 @@ div { line-height: 41px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; font-size: 34px; display: flex; diff --git a/src/factory/news/detail/index.scss b/src/factory/news/detail/index.scss index e6717ede..1db091f4 100644 --- a/src/factory/news/detail/index.scss +++ b/src/factory/news/detail/index.scss @@ -11,6 +11,7 @@ height: 450px; width: 100%; position: absolute; + object-fit: cover; } .header-content { @@ -22,7 +23,7 @@ h3 { line-height: 47px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 34px; @@ -83,7 +84,7 @@ .ant-breadcrumb { line-height: 20px; font-family: alibaba; - font-size: 14px; + font-size: 16px; margin-bottom: 20px; a { color: #1b58df; @@ -99,7 +100,7 @@ padding-bottom: 60px; .news-detail-content-title { line-height: 33px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 24px; diff --git a/src/factory/news/index.jsx b/src/factory/news/index.jsx index fc7af285..2c31b939 100644 --- a/src/factory/news/index.jsx +++ b/src/factory/news/index.jsx @@ -9,6 +9,7 @@ import back1 from '../../images/factory/back1.png' import back2 from '../../images/factory/back2.png' import back3 from '../../images/factory/back3.png' import headerBottom from '../../images/factory/news/header-bottom.png' +import bodyBg from '../../images/factory/news/news-bg.webp' import '../common.scss' import { Link } from "react-router-dom"; import moment from "moment"; @@ -137,6 +138,7 @@ function Index(props) {
+

XXXXX全部新闻的标题

diff --git a/src/factory/news/index.scss b/src/factory/news/index.scss index b8b95fd0..e674d331 100644 --- a/src/factory/news/index.scss +++ b/src/factory/news/index.scss @@ -3,10 +3,10 @@ h2 { line-height: 55px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; - font-size: 40px; + font-size: 46px; text-align: center; margin-top: 67px; @@ -152,15 +152,23 @@ transform: scale(0.9); position: relative; width: 100%; - background: linear-gradient(180deg, #e7f0ff 0%, #ffffff 19.24%, #ffffff 46.02%, #ffffff 100%); + background-image: linear-gradient(180deg, #e7f0ff 0%, #ffffff 19.24%, #ffffff 46.02%, #ffffff 100%); border-radius: 80px 80px 0px 0px; padding-top: 44px; display: flex; flex-direction: column; align-items: center; + &-bg { + position: absolute; + width: 100%; + top: 350px; + z-index: -1; + } + h2 { margin-top: 0; + font-size: 40px; } &-top { @@ -338,15 +346,21 @@ .line-1 { height: 8px; + animation: wave1 1.2s ease-in-out infinite; + } .line-2 { height: 12px; + animation: wave2 1.2s ease-in-out infinite 0.1s; + } .line-3 { height: 6px; margin-right: 8px; + animation: wave3 1.2s ease-in-out infinite 0.2s; + } @keyframes wave1 { @@ -400,20 +414,6 @@ overflow: hidden; word-break: break-all; } - - &:hover { - .line-1 { - animation: wave1 1.2s ease-in-out infinite; - } - - .line-2 { - animation: wave2 1.2s ease-in-out infinite 0.1s; - } - - .line-3 { - animation: wave3 1.2s ease-in-out infinite 0.2s; - } - } } } } @@ -473,7 +473,7 @@ font-family: alibaba; font-weight: 500; color: #091221; - font-size: 24px; + font-size: 22px; max-width: 670px; white-space: nowrap; text-overflow: ellipsis; diff --git a/src/factory/resource/components/Search/index.jsx b/src/factory/resource/components/Search/index.jsx index 40c96aef..c911d667 100644 --- a/src/factory/resource/components/Search/index.jsx +++ b/src/factory/resource/components/Search/index.jsx @@ -1,13 +1,11 @@ -import React, { useEffect, useState, useRef } from 'react'; +import React, { useEffect, useState, useImperativeHandle, forwardRef } from 'react'; import { styles } from './index.scss'; import { getSourceList, getProjectsLists } from '../../../api' -import { factoryZoneId } from '../../../../constants/factory' +import { factoryZoneId, toolId, versionId } from '../../../../constants/factory' import ActionItem from '../ActionItem'; import emptyImg from '../../../../images/factory/resource/empty.webp' -function Index(props) { - const searchValue = props.searchValue - const searchType = props.searchType +function Index({searchValue, searchType},ref) { const [versionList, setVersionList] = useState([]); const [versionTotal, setVersionTotal] = useState(0); const [projectList, setProjectList] = useState([]); @@ -18,18 +16,37 @@ function Index(props) { const pageSize = 20 const totalSize = 6 // 聚合查询只查六个 - useEffect(() => { - if (searchValue) { - getProjectsList(1) - console.log(versionTotal === projectTotal === toolTotal === 0); + useImperativeHandle(ref, () => ({ + search: () => { + search() } - // getFullList(); - }, [searchValue]); + })) - const getFullList = () => { + const search = () => { + getVersionList(1) + getProjectsList(1) + getToolsList(1) + } - getSourceList({ id: factoryZoneId }).then(res => { + const getVersionList = () => { + getSourceList({ + pageNum: page, + pageSize: searchType ? pageSize : totalSize, + id: factoryZoneId, name: searchValue, keywords: versionId + }).then(res => { setVersionList(res.data.rows.slice(0, 4)); + setVersionTotal(res.data.total) + }); + }; + + const getToolsList = () => { + getSourceList({ + pageNum: page, + pageSize: searchType ? pageSize : totalSize, + id: factoryZoneId, name: searchValue, keywords: toolId + }).then(res => { + setToolList(res.data.rows.slice(0, 4)); + setToolTotal(res.data.total) }); }; @@ -40,8 +57,8 @@ function Index(props) { pageSize: searchType ? pageSize : totalSize, }).then(result => { if (result) { - // setProjectList(result.data.rows); - // setProjectTotal(result.data.total); + setProjectList(result.data.rows); + setProjectTotal(result.data.total); } }).catch(error => { }) } @@ -103,7 +120,7 @@ function Index(props) { toolList.length > 0 &&

开发工具

-
#工具 {projectTotal}个
+
#工具 {toolTotal}个
{ @@ -139,7 +156,7 @@ function Index(props) { versionList.length > 0 &&

工厂版本

-
#版本 {projectTotal}个
+
#版本 {versionTotal}个
{ @@ -165,4 +182,5 @@ function Index(props) {
) } -export default Index + +export default forwardRef(Index) diff --git a/src/factory/resource/components/Search/index.scss b/src/factory/resource/components/Search/index.scss index 900fe2f7..56b6272d 100644 --- a/src/factory/resource/components/Search/index.scss +++ b/src/factory/resource/components/Search/index.scss @@ -17,7 +17,7 @@ h3 { line-height: 38px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 28px; diff --git a/src/factory/resource/developmentTools/detail/index.scss b/src/factory/resource/developmentTools/detail/index.scss index 1312062c..98905988 100644 --- a/src/factory/resource/developmentTools/detail/index.scss +++ b/src/factory/resource/developmentTools/detail/index.scss @@ -16,6 +16,12 @@ align-self: flex-start; margin-top: 30px; margin-left: calc((100vw - 1600px) / 2); + a { + color: #1b58df; + } + span { + color: #091221; + } } .header-content { @@ -31,10 +37,14 @@ h3 { line-height: 47px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 34px; + max-width: 650px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; } p { @@ -44,6 +54,10 @@ font-family: alibabareg; color: #5d6a80; font-size: 16px; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; } .tools-info { @@ -58,7 +72,7 @@ span:nth-child(1) { line-height: 32px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #164ce4; font-size: 24px; @@ -105,7 +119,7 @@ h6 { margin-top: 34px; line-height: 22px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 16px; diff --git a/src/factory/resource/developmentTools/index.jsx b/src/factory/resource/developmentTools/index.jsx index e6b743e3..db566594 100644 --- a/src/factory/resource/developmentTools/index.jsx +++ b/src/factory/resource/developmentTools/index.jsx @@ -1,7 +1,7 @@ import React, { useEffect, useState, useRef } from 'react'; import './index.scss'; import { getSourceList, getSourceZoneList, httpUrl } from '../../api' -import { factoryZoneId, lessonId , versionId } from '../../../constants/factory' +import { factoryZoneId, lessonId , versionId, toolId } from '../../../constants/factory' import KFIcon from '../../../components/KFIcon'; import bg1 from '../../../images/factory/resource/tools-top-1.webp'; import bg2 from '../../../images/factory/resource/tools-top-2.webp'; @@ -43,9 +43,9 @@ function Index(props) { const getFullList = () => { - getSourceList({ id: factoryZoneId }).then(res => { + getSourceList({ id: factoryZoneId, keywords: toolId }).then(res => { if (res.data.rows) { - const rows = res.data.rows.filter(e => e.domainId !== lessonId && e.domainId !== versionId) + const rows = res.data.rows setTopList(rows.slice(0, 3)); setNewList(rows.slice(0, 2)); setContentList(rows.slice(3, 9)); @@ -146,7 +146,7 @@ function Index(props) {
- +
}) @@ -202,7 +202,7 @@ function Index(props) {
- +
diff --git a/src/factory/resource/developmentTools/index.scss b/src/factory/resource/developmentTools/index.scss index 31ac3ee5..9ff7dfbc 100644 --- a/src/factory/resource/developmentTools/index.scss +++ b/src/factory/resource/developmentTools/index.scss @@ -126,6 +126,14 @@ background: #ffffff; } + } + &:nth-child(3) { + + + .item-tag { + color: #564ec7; + background: gba(92, 65, 194, 0.09); + } } } } @@ -218,7 +226,6 @@ line-height: 36px; cursor: pointer; border-radius: 9px; - line-height: 20px; font-family: alibaba; font-weight: 500; color: #ffffff; @@ -233,6 +240,10 @@ background-color: #ffffff; background-image: none; border: 1px solid #091221; + &:hover { + border-color: #164ce4; + color: #164ce4; + } } } @@ -404,7 +415,9 @@ .content-bottom-wrapper { margin-bottom: 26px; - margin-right: 16px; + &:not(:nth-child(4n)) { + margin-right: 22px; + } } .content-bottom-item { diff --git a/src/factory/resource/factoryVersion/index.jsx b/src/factory/resource/factoryVersion/index.jsx index d8a21fda..338125e8 100644 --- a/src/factory/resource/factoryVersion/index.jsx +++ b/src/factory/resource/factoryVersion/index.jsx @@ -17,7 +17,7 @@ function Index(props) { const getFullList = () => { - getSourceList({ id: factoryZoneId, domainId: versionId }).then(res => { + getSourceList({ id: factoryZoneId, keywords: versionId }).then(res => { setVersionList(res.data.rows.slice(0, 4)); }); }; diff --git a/src/factory/resource/factoryVersion/index.scss b/src/factory/resource/factoryVersion/index.scss index b19f841a..493f50ea 100644 --- a/src/factory/resource/factoryVersion/index.scss +++ b/src/factory/resource/factoryVersion/index.scss @@ -70,7 +70,7 @@ width: 250px; h4 { line-height: 33px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 24px; diff --git a/src/factory/resource/index.jsx b/src/factory/resource/index.jsx index bdb0c16a..8476c7ca 100644 --- a/src/factory/resource/index.jsx +++ b/src/factory/resource/index.jsx @@ -39,6 +39,7 @@ function Index(props) { const [selectedType, setSelectedType] = useState() const [searchValue, setSearchValue] = useState('') + const searchRef = useRef(null) useEffect(() => { @@ -61,6 +62,9 @@ function Index(props) { const search = () => { setSelectedType(null) + setTimeout(() => { + searchRef.current && searchRef.current.search() + }, 0); } const cleanSearch = (e) => { @@ -72,6 +76,12 @@ function Index(props) { } } + const kewDown = (e) => { + if (e.key === 'Enter') { + search() + } + } + return (
@@ -84,7 +94,7 @@ function Index(props) {

资源中枢,共享复用释放生态力量

- + {/* */}
@@ -121,7 +131,7 @@ function Index(props) { )} /> { - !selectedType && + !selectedType && }
diff --git a/src/factory/resource/index.scss b/src/factory/resource/index.scss index 48b1554c..45f59280 100644 --- a/src/factory/resource/index.scss +++ b/src/factory/resource/index.scss @@ -83,7 +83,7 @@ h2 { line-height: 55px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 40px; diff --git a/src/factory/resource/softwareProject/index.scss b/src/factory/resource/softwareProject/index.scss index d9c7f87e..69fedfbb 100644 --- a/src/factory/resource/softwareProject/index.scss +++ b/src/factory/resource/softwareProject/index.scss @@ -38,6 +38,7 @@ height: 50px; border-radius: 50%; margin-right: 16px; + border: 2px solid #ffffff52; } .item-info { @@ -80,7 +81,7 @@ margin-right: 10px; padding: 0 8px; height: 32px; - background: rgba(255, 255, 255, 0.57); + background: rgba(255, 255, 255, 0.25); border-radius: 4px; } } @@ -99,7 +100,7 @@ h2 { line-height: 55px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 40px; @@ -204,6 +205,7 @@ p { position: relative; padding-left: 33px; + font-size: 16px; &::before { position: absolute; content: ""; @@ -235,6 +237,11 @@ display: flex; flex-direction: column; cursor: pointer; + div:nth-child(1) { + height: 100%; + display: flex; + flex-direction: column; + } .item-bg { position: absolute; @@ -293,10 +300,12 @@ width: 1600px; display: flex; flex-wrap: wrap; - justify-content: space-between; .content-bottom-wrapper { margin-bottom: 26px; + &:not(:nth-child(4n)) { + margin-right: 22px; + } } .content-bottom-item { diff --git a/src/factory/scene/index.scss b/src/factory/scene/index.scss index 3ae3ffe9..66593d2f 100644 --- a/src/factory/scene/index.scss +++ b/src/factory/scene/index.scss @@ -27,7 +27,7 @@ h3 { line-height: 47px; - font-family: alibaba; + font-family: alibabaBold; font-weight: 700; color: #091221; font-size: 34px; @@ -89,7 +89,7 @@ .ant-breadcrumb { line-height: 20px; font-family: alibaba; - font-size: 14px; + font-size: 16px; margin-bottom: 20px; a { color: #1b58df; diff --git a/src/images/factory/feature-bg.png b/src/images/factory/feature-bg.png new file mode 100644 index 00000000..2db00dec Binary files /dev/null and b/src/images/factory/feature-bg.png differ diff --git a/src/images/factory/feature-right-1.png b/src/images/factory/feature-right-1.png new file mode 100644 index 00000000..6c6f671a Binary files /dev/null and b/src/images/factory/feature-right-1.png differ diff --git a/src/images/factory/feature-right-1.webp b/src/images/factory/feature-right-1.webp deleted file mode 100644 index 1a37b4b0..00000000 Binary files a/src/images/factory/feature-right-1.webp and /dev/null differ diff --git a/src/images/factory/lessons/chapter-bg.webp b/src/images/factory/lessons/chapter-bg.webp new file mode 100644 index 00000000..873493bd Binary files /dev/null and b/src/images/factory/lessons/chapter-bg.webp differ diff --git a/src/images/factory/lessons/header-bg.png b/src/images/factory/lessons/header-bg.png new file mode 100644 index 00000000..41a1b0e9 Binary files /dev/null and b/src/images/factory/lessons/header-bg.png differ diff --git a/src/images/factory/news/news-bg.webp b/src/images/factory/news/news-bg.webp new file mode 100644 index 00000000..f9f8c608 Binary files /dev/null and b/src/images/factory/news/news-bg.webp differ