forked from Gitlink/forgeplus-react
修改首页调用创客接口
This commit is contained in:
parent
7567cb2040
commit
0f26429b7d
|
@ -101,7 +101,7 @@ class IndexItem extends Component {
|
|||
</Tooltip>:""
|
||||
}
|
||||
</AlignCenter> */}
|
||||
<a onClick={() => this.projectHref(`/${item.author.login}/${item.identifier}`, item.user_apply_signatures, item.id, item.is_secret, item.author.login, item.is_member)} className="hide-1 color-grey-3 font-18 task-hide fwt-500 " style={{ whiteSpace: "wrap", display: 'flex', width: 400 }}>
|
||||
<a onClick={() => this.projectHref(`/${item.author.login}/${item.identifier}`, item.user_apply_signatures, item.id, item.is_secret, item.author.login, item.is_member)} className="hide-1 color-grey-3 font-18 task-hide fwt-500 " style={{ whiteSpace: "wrap", width: 400 }}>
|
||||
{item.author.name}/{item.name}
|
||||
{
|
||||
item.forked_from_project_id ?
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { memo, useState, useEffect } from 'react';
|
|||
import { Collapse, Button } from 'antd';
|
||||
import moment from 'moment';
|
||||
import Line from '../Line';
|
||||
import { getTaskCategory, getTaskList } from '../../military/task/api';
|
||||
import { getTaskCategory, getRecommendTasks } from '../../military/task/api';
|
||||
import { taskModeIdArr } from '../../military/task/static';
|
||||
|
||||
import './index.scss';
|
||||
|
@ -61,10 +61,9 @@ function FifthSection({ fifth, history }) {
|
|||
curPage: 1,
|
||||
pageSize: 3,
|
||||
orderBy: 'visitsDesc',
|
||||
isDelete: '0',
|
||||
recommend: '1',
|
||||
};
|
||||
getTaskList(params).then(data => {
|
||||
getRecommendTasks(params).then(data => {
|
||||
if (data) {
|
||||
serTaskArr(data.rows);
|
||||
}
|
||||
|
|
|
@ -58,6 +58,23 @@ export async function getTaskList(params) {
|
|||
}
|
||||
}
|
||||
|
||||
// 首页推荐任务列表查询
|
||||
export async function getRecommendTasks(params) {
|
||||
let res = await fetch({
|
||||
url: '/api/tasks/getRecommendTasks',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
if (res.data) {
|
||||
return res.data;
|
||||
} else {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.message || '请求错误',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 管理员任务列表查询
|
||||
export async function getTaskAdminList(params) {
|
||||
let res = await fetch({
|
||||
|
|
|
@ -4,6 +4,7 @@ import { Link } from "react-router-dom";
|
|||
import { paperCheckStatusArr } from '../static';
|
||||
import { readyCheckPapers, checkPaper, } from '../api';
|
||||
import '../index.scss';
|
||||
import './index.scss';
|
||||
const format = "YYYY-MM-DD HH:mm:ss";
|
||||
const Option = Select.Option;
|
||||
const TextArea = Input.TextArea;
|
||||
|
@ -207,8 +208,8 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="task-manage">
|
||||
<div className="center-screen" >
|
||||
<div className="task-manage paper-manage">
|
||||
<div className="center-screen clearfix" >
|
||||
<div className="center-left-but">
|
||||
{helper(
|
||||
"审核状态",
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
.paper-manage{
|
||||
.center-screen{
|
||||
display: block;
|
||||
|
||||
.center-left-but,.center-right-but{
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue