From 70af7dae5f4e55fe89b24e3344afa76594f0edbf Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 14 May 2021 14:37:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E6=8C=89=E9=92=AE-=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E5=92=8C=E8=BF=94=E5=9B=9E=E9=A1=B6=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 2 +- src/AppConfig.js | 2 +- src/forge/Component/Component.scss | 34 +++++++++++++++--- src/forge/Component/SiderBar.js | 56 ++++++++++++++++++++++-------- 4 files changed, 73 insertions(+), 21 deletions(-) diff --git a/src/App.js b/src/App.js index ab58a80b..65a22353 100644 --- a/src/App.js +++ b/src/App.js @@ -205,7 +205,7 @@ class App extends Component { this.Modifyloginvalue()}> - {/* */} + {/*项目*/} diff --git a/src/AppConfig.js b/src/AppConfig.js index 034612ec..d674d6ca 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -32,7 +32,7 @@ export function initAxiosInterceptors(props) { // 判断网络是否连接 initOnlineOfflineListener(); - var proxy = "https://testforgeplus.trustie.net"; + var proxy = "http://192.168.1.37:3000"; //响应前的设置 axios.interceptors.request.use( config => { diff --git a/src/forge/Component/Component.scss b/src/forge/Component/Component.scss index a17c62c6..ef2bd2b5 100644 --- a/src/forge/Component/Component.scss +++ b/src/forge/Component/Component.scss @@ -198,9 +198,8 @@ li.ant-menu-item{ .-task-sidebar { position: fixed; width: 40px; - height: 180px; right: 0; - bottom: 20px !important; + bottom: 80px; z-index: 10; } @@ -246,18 +245,43 @@ li.ant-menu-item{ } .helpBox{ width: 260px; + z-index: 103; .ant-popover-inner-content{ - padding:15px 20px; + padding:0px; } - &>p.title{ + p.titlecontent{ font-size: 18px; color: #333; line-height: 20px; - margin-bottom: 15px; + padding:15px 20px; + } + .faqUl{ + padding:0px 20px 10px; + max-height: 220px; + overflow-y: auto; + li{ + background: #F5F5F5; + border-radius: 20px; + padding:0px 20px; + color: #333; + height: 34px; + line-height: 34px; + margin-bottom: 10px; + a{ + display: block; + } + &:hover{ + background-color: #D1E9FF; + a{ + color: #333!important; + } + } + } } } + .-task-desc { background: #494949; width: 90px; diff --git a/src/forge/Component/SiderBar.js b/src/forge/Component/SiderBar.js index 0e9310e9..c70191ee 100644 --- a/src/forge/Component/SiderBar.js +++ b/src/forge/Component/SiderBar.js @@ -1,6 +1,7 @@ -import React from 'react'; -import { Popover } from 'antd'; +import React, { useEffect, useState } from 'react'; +import { Popover , Tooltip } from 'antd'; import './Component.scss'; +import axios from 'axios'; const $ = window.$; @@ -19,18 +20,45 @@ $(window).scroll(function () { }); function SiderBar() { - const content = ( -
-

帮助

+ const [ data , setData ] = useState([]); + + useEffect(()=>{ + getFAQ(); + },[]) + + function getFAQ(){ + const url = `/faqs.json`; + axios.get(url).then(result=>{ + if(result && result.data){ + setData(result.data); + } + }).catch(error=>{}) + } + function content(list){ + return
+

帮助

+
    + { + list && list.map((i,k)=>{ + return( +
  • {i.question}
  • + ) + }) + } +
- ) + } return (
-
- - + { + data && data.length > 0 && (data[0] && data[0].question) ? + +
+ +
-
+ :"" + } {/*
@@ -39,10 +67,10 @@ function SiderBar() {
*/} -
- - - +
+ + +
)