diff --git a/public/css/iconfont.css b/public/css/iconfont.css index 607250fc3..af04c62b8 100644 --- a/public/css/iconfont.css +++ b/public/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2340181 */ - src: url('iconfont.woff2?t=1652687271594') format('woff2'), - url('iconfont.woff?t=1652687271594') format('woff'), - url('iconfont.ttf?t=1652687271594') format('truetype'); + src: url('iconfont.woff2?t=1652870557319') format('woff2'), + url('iconfont.woff?t=1652870557319') format('woff'), + url('iconfont.ttf?t=1652870557319') format('truetype'); } .iconfont { @@ -13,6 +13,10 @@ -moz-osx-font-smoothing: grayscale; } +.icon-bangzhuzhongxinicon1:before { + content: "\e935"; +} + .icon-ketixiangqingicon:before { content: "\e92b"; } diff --git a/public/css/iconfont.js b/public/css/iconfont.js index 62120a1f1..818422324 100644 --- a/public/css/iconfont.js +++ b/public/css/iconfont.js @@ -1 +1 @@ -!function(a){var l,c,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(a,l){l.parentNode.insertBefore(a,l)};if(t&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}l=function(){var a,l=document.createElement("div");l.innerHTML=z,z=null,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(c=function(){document.removeEventListener("DOMContentLoaded",c,!1),l()},document.addEventListener("DOMContentLoaded",c,!1)):document.attachEvent&&(h=l,i=a.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); \ No newline at end of file +!function(a){var l,c,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(a,l){l.parentNode.insertBefore(a,l)};if(t&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}l=function(){var a,l=document.createElement("div");l.innerHTML=z,z=null,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(c=function(){document.removeEventListener("DOMContentLoaded",c,!1),l()},document.addEventListener("DOMContentLoaded",c,!1)):document.attachEvent&&(h=l,i=a.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); \ No newline at end of file diff --git a/public/css/iconfont.json b/public/css/iconfont.json index c560203df..8292425fe 100644 --- a/public/css/iconfont.json +++ b/public/css/iconfont.json @@ -5,6 +5,13 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "29811507", + "name": "帮助中心icon", + "font_class": "bangzhuzhongxinicon1", + "unicode": "e935", + "unicode_decimal": 59701 + }, { "icon_id": "29701613", "name": "课题详情icon", diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index e63b224e0..50b785fcb 100644 Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff index 16909e675..af3a98f61 100644 Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2 index 79be068f8..c8ead9b96 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/src/glcc/home/index.scss b/src/glcc/home/index.scss index bd26ee595..5805d848d 100644 --- a/src/glcc/home/index.scss +++ b/src/glcc/home/index.scss @@ -130,7 +130,7 @@ min-width: 62.5vw; max-width: 98vw; margin: 0 auto; - padding-top: 45px; + padding-top: 65px; } // 1行省略号 diff --git a/src/glcc/home/partner/index.jsx b/src/glcc/home/partner/index.jsx index 97f131115..364ed825a 100644 --- a/src/glcc/home/partner/index.jsx +++ b/src/glcc/home/partner/index.jsx @@ -25,6 +25,8 @@ import log65 from '../../img/65@2x.png'; import log67 from '../../img/67@2x.png'; import log69 from '../../img/69@2x.png'; import log70 from '../../img/浙江大学.png'; +import logo1 from '../../img/logo1.png'; +import logo2 from '../../img/logo2.png'; function Partner() { return ( @@ -149,6 +151,8 @@ function Partner() {
{window.open("https://www.ecnu.edu.cn/")}}>华东师范大学
{window.open("http://www.csust.edu.cn/")}}>长沙理工大学
{window.open("https://www.jnu.edu.cn/")}}>暨南大学
+
{window.open("https://www.shu.edu.cn/")}}>上海大学
+
{window.open("https://www.bnu.edu.cn/")}}>北京师范大学
diff --git a/src/glcc/img/logo1.png b/src/glcc/img/logo1.png new file mode 100644 index 000000000..590e95645 Binary files /dev/null and b/src/glcc/img/logo1.png differ diff --git a/src/glcc/img/logo2.png b/src/glcc/img/logo2.png new file mode 100644 index 000000000..e69c4f1e4 Binary files /dev/null and b/src/glcc/img/logo2.png differ diff --git a/src/glcc/img/qqChat.png b/src/glcc/img/qqChat.png new file mode 100644 index 000000000..4e2d7d667 Binary files /dev/null and b/src/glcc/img/qqChat.png differ diff --git a/src/glcc/img/studentProject.png b/src/glcc/img/studentProject.png new file mode 100644 index 000000000..f72cd4a54 Binary files /dev/null and b/src/glcc/img/studentProject.png differ diff --git a/src/glcc/index.scss b/src/glcc/index.scss index b7f82c6c6..4bcee4139 100644 --- a/src/glcc/index.scss +++ b/src/glcc/index.scss @@ -1,4 +1,5 @@ -.glccHelp{ +.-task-sidebar .glccHelp{ + height: auto; width: 48px; padding: 6px 16px; text-align: center; @@ -7,13 +8,39 @@ border-radius:2px; box-shadow:0px 0px 8px rgba(55, 148, 255, 0.16); color:#1e1e1e; + font-size: 14px; + line-height: 35px; + word-break: break-word; cursor: pointer; - .icon-bangzhuzhongxinicon{ + .icon-bangzhuzhongxinicon, .icon-bangzhuzhongxinicon1{ color: #0654D6; margin-left: -3px;} &:hover{ color:#ffffff; background-color:#466aff; - .icon-bangzhuzhongxinicon{color:#ffffff} + .icon-bangzhuzhongxinicon, .icon-bangzhuzhongxinicon1{color:#ffffff} + } +} +.qqChatBox .ant-popover-arrow{display: none;} +.qqChat{ + margin: -12px -16px; + background-image:linear-gradient(180deg,#f8faff 0%,#dee7ff 100%); + border:1px solid #ffffff; + border-radius:4px; + box-shadow:0px 0px 6px rgba(121, 154, 245, 0.27); + padding: 25px 40px; + text-align: center; + .qqMa{ + padding: 8px; + margin-bottom: 15px; + text-align: center; + background-image:radial-gradient(ellipse 50% 50% at 50% 50% ,rgba(255, 255, 255, 0) 0%,rgba(239, 243, 251, 0) 100%); + box-shadow:0px 0px 6px #aecaff inset; + img{width: 120px;} + } + .qqTip{ + color:#5769a5; + font-size:14px; + line-height:24px; } } \ No newline at end of file diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index cc5017602..7d43ec636 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -19,6 +19,7 @@ export default ({ detail, projectId, applyTaskId }) => { },[detail]) // detail && (detail.registrationTaskList = [{ + // id: 1, // taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊', // tutorName: 'daoshi', // tutorMail: 'email', @@ -26,6 +27,7 @@ export default ({ detail, projectId, applyTaskId }) => { // taskUrl: 'url', // taskReward: '9000' // },{ + // id: 2, // taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊', // tutorName: 'daoshi', // tutorMail: 'email', @@ -51,7 +53,7 @@ export default ({ detail, projectId, applyTaskId }) => {
{item.taskDesc}
课题链接:   {item.taskUrl}
-
{applyTaskId && applyTaskId.includes(item.id) ? : }
+
{applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : }
¥ {item.taskReward}
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index fedade07d..de9e6a845 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -1,7 +1,7 @@ import React , { useEffect , useState } from 'react'; import { Spin } from 'antd'; import { Route, Switch } from "react-router-dom"; -import banner from "../img/banner.png"; +import banner from "../img/studentProject.png"; import './index.scss'; import Loadable from "react-loadable"; import Loading from "../../Loading"; @@ -24,7 +24,7 @@ function Project(propsF) { const {pathname} = location; // 用户已报名课题id数组 - const [applyTaskId, setApplyTaskId] = useState([]); + const [applyTaskId, setApplyTaskId] = useState({}); // 刷新用户课题报名信息 const [studentInfoReset, setStudentInfoReset] = useState(undefined); @@ -33,15 +33,14 @@ function Project(propsF) { getStudentApplyInfo({userId: current_user && current_user.user_id}).then(response=>{ if(response && response.message === "success"){ // setData(response.data.rows); - const data = new Set(); + const data = {}; response.data && response.data.registrationStudentTaskList.map(item=>{ - data.add(item.taskId); + data[item.taskId] = item.id; }) - setApplyTaskId(Array.from(data)); + setApplyTaskId(data); } }) },[studentInfoReset]) - return(
diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss index b5228abaa..e925c8a6e 100644 --- a/src/glcc/project/index.scss +++ b/src/glcc/project/index.scss @@ -60,7 +60,7 @@ .center{ width: 60%; } - .right{padding-right: 0px;} + .right{padding-right: 10px;} } } &.nodata{width: 200px;} diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx index c92bbb47e..067873adf 100644 --- a/src/glcc/project/projectList/index.jsx +++ b/src/glcc/project/projectList/index.jsx @@ -32,7 +32,7 @@ function ProjectList({applyTaskId}) {
{data && data.map((item, index)=>{ return } trigger='click' overlayClassName='projectItemPopover'> -
+
{item.projectName}
diff --git a/src/glcc/project/projectList/index.scss b/src/glcc/project/projectList/index.scss index a786afa79..511b1f8b6 100644 --- a/src/glcc/project/projectList/index.scss +++ b/src/glcc/project/projectList/index.scss @@ -13,7 +13,7 @@ .projectListBox{ display: flex; flex-wrap: wrap; - justify-content: space-between; + // justify-content: space-between; .projectItem{ width: 30%; background-image: linear-gradient(180deg,rgba(232, 237, 255, 0.85) 0%,rgba(255, 255, 255, 0.85) 100%); @@ -25,6 +25,10 @@ margin-bottom: 50px; background-image: url('../../img/projectBg.png'); background-size: 100% 100%; + margin-left: 5%; + &.firstBox{ + margin-left: 0; + } &:hover{ cursor: pointer; background-image: none; diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index d6d8b82cb..95cbb20a0 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -12,21 +12,25 @@ function TaskList({applyTaskId, setStudentInfoReset}) { // 输入搜索框 const [keyword, setKeyword] = useState(undefined); const [data, setData] = useState([]); + // table + const [current, setCurrent] = useState(1); + const [total, setTotal] = useState(0); + const [pageSize, setPageSize] = useState(20); const columns = [ - { title: '序号', dataIndex: 'index', align: 'center', render: (text, item, index) => index + 1 }, - { title: '课题名称', dataIndex: 'taskName', width: '28%', render: (text) => {text} }, - { title: '项目名称', dataIndex: 'tutorName', width: '28%', render: (text) => {text} }, - { title: '课题奖金', dataIndex: 'taskReward', render: (text) => ¥ {text} }, + { title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", render: (text, item, index) => index + 1 }, + { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns", width: '28%', render: (text) => {text} }, + { title: '项目名称', dataIndex: 'tutorName', className:"taskTableColumns", width: '28%', render: (text) => {text} }, + { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", render: (text) => ¥ {text} }, { - title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns", render: ((text, item, index) => { + title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns taskTableColumns", render: ((text, item, index) => { return (
- {applyTaskId && applyTaskId.includes(item.id) ? - {window.location.href=`/glcc/student/apply`}}>报名详情 - {setDeleteTaskId(item.id);setVisible(true)}}> + {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) ? + {window.location.href=`/glcc/student/apply/${item.id}`}}>报名详情 + {setDeleteTaskId(item.id);setVisible(true)}}> : - {window.location.href=`/glcc/student/apply/${item.id}`}}>{applyTask(item.id)}}>申请课题} + {window.location.href=`/glcc/student/apply/${item.id}`}}>{applyTask(item.id)}}>申请课题}
) }) @@ -37,29 +41,16 @@ function TaskList({applyTaskId, setStudentInfoReset}) { if (props.expanded) { return { props.onExpand(props.record, e); - }}>课题详情 + }}>项目详情 } else { return { props.onExpand(props.record, e); - }}>课题详情 + }}>项目详情 } - // if(props.record.members && props.record.members.length > 0){ - // if (props.expanded) { - // return { - // props.onExpand(props.record, e); - // }}>查看成员 - // } else { - // return { - // props.onExpand(props.record, e); - // }}>查看成员 - // } - // }else{ - // return 查看成员 - // } } const expandRow = (record) => { - return + return } // 申请课题按钮点击函数 @@ -75,7 +66,12 @@ function TaskList({applyTaskId, setStudentInfoReset}) { // 取消课题按钮点击函数 function cancelApply(){ - cancelTaskApply({ids: Array.from(deleteTaskId.toString())}).then(response=>{ + const id = []; + id.push(applyTaskId[deleteTaskId]); + const params = { + ids: id + } + cancelTaskApply(params).then(response=>{ if(response && response.message === "success"){ setVisible(false); setStudentInfoReset(Math.random()); @@ -84,18 +80,29 @@ function TaskList({applyTaskId, setStudentInfoReset}) { }) } + // 改变pagesize + function onShowSizeChange(current, pageSize){ + setPageSize(pageSize); + } + + // 切换页数 + function changePage(page, pageSize){ + setCurrent(page); + } + useEffect(() => { const params = { - curPage: 1, + curPage: current, keyword, - pageSize: 20 + pageSize } taskList(params).then(response => { if (response && response.message === "success") { setData(response.data.rows); + setTotal(response.data.total) } }) - }, [keyword]) + }, [keyword, current, pageSize]) return (
@@ -108,6 +115,7 @@ function TaskList({applyTaskId, setStudentInfoReset}) { expandIconColumnIndex={4} expandIconAsCell={false} expandIcon={customExpandIcon} + pagination={{pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}} />
tr > .taskTableColumns, .ant-table-tbody > tr > .taskTableColumns{ + background-color:#F1F6FF; +} +.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > .taskTableColumns{ + background-color:#fbfbfc; +} .ant-table-tbody .actionColumns{ display: flex; } diff --git a/src/glcc/siderBarHelp.js b/src/glcc/siderBarHelp.js index c59fbafc7..7079133c7 100644 --- a/src/glcc/siderBarHelp.js +++ b/src/glcc/siderBarHelp.js @@ -1,12 +1,30 @@ import React from 'react'; +import { Popover } from 'antd'; +import qqChat from "./img/qqChat.png"; import './index.scss'; function SiderBar() { + const content = ( +
+
+

扫码进入QQ交流群

+

把握最新活动资讯

+
+ ) + return ( // 开源夏令营定制帮助中心调整按钮 -
window.open("/glcc/help")}> - - 帮助中心 +
+ +
+ + QQ交流 +
+
+
window.open("/glcc/help")}> + + 帮助中心 +
) } diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index 408462d6d..51948a58f 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -272,7 +272,7 @@ function Apply(props) { resove(); return taskListNew }); - }).then(res => setFieldsValue({ 'taskId0': taskId })) + }).then(res => setFieldsValue({ 'taskId1': taskId })) } else { taskListNew.push({ ...initTask, taskId: '' }); setMyTaskList(taskListNew);