forked from Gitlink/forgeplus-react
Merge pull request '开源夏令营修改' (#357) from durian/forgeplus-react:feature_GLCC into gitlink_server
This commit is contained in:
commit
5007377c57
|
@ -1,9 +1,10 @@
|
|||
import React , { useCallback, useEffect , useState } from 'react';
|
||||
import { Breadcrumb, Button, Form, Input, Select, Upload, Modal } from 'antd';
|
||||
import {getUploadActionUrl} from 'educoder';
|
||||
import {getUserApplyInfo, applyGlcc} from '../api';
|
||||
import axios from 'axios';
|
||||
import TextArea from 'antd/lib/input/TextArea';
|
||||
import { httpUrl } from '../fetch';
|
||||
import { main_site_url } from '../fetch';
|
||||
import banner from "../img/banner.png";
|
||||
import './index.scss';
|
||||
const Option = Select.Option;
|
||||
|
@ -80,7 +81,7 @@ function Apply(props) {
|
|||
onOk: ()=>{
|
||||
const params ={
|
||||
...values,
|
||||
projectLogoId: values.logo.file.response.data.id,
|
||||
projectLogoId: values.logo.file.response.id,
|
||||
userId: current_user.user_id,
|
||||
userName: current_user.username
|
||||
}
|
||||
|
@ -176,12 +177,12 @@ function Apply(props) {
|
|||
'logo格式为png、jpg、jpeg,限制上传大小2m,建议上传尺寸为382*228',
|
||||
'logo',
|
||||
[{ required: true, message: "请正确上传项目logo" }],
|
||||
userApplyInfo && userApplyInfo.projectLogoId ? <div className='projectLogo'><img src={`${httpUrl}/busiAttachments/download/${userApplyInfo.projectLogoId}`}/></div>
|
||||
userApplyInfo && userApplyInfo.projectLogoId ? <div className='projectLogo'><img src={`${main_site_url}/api/attachments/${userApplyInfo.projectLogoId}`}/></div>
|
||||
:<Upload
|
||||
listType="picture-card"
|
||||
className="avatar-uploader"
|
||||
showUploadList={false}
|
||||
action={`${httpUrl}/busiAttachments/upload`}
|
||||
action={getUploadActionUrl()}
|
||||
accept=".png,.jpg,.jpeg"
|
||||
beforeUpload={beforeUpload}
|
||||
onChange={handleChange}
|
||||
|
|
|
@ -22,11 +22,11 @@ function News() {
|
|||
<h3 className="glcc-tit">新闻中心</h3>
|
||||
<div className="news-content">
|
||||
|
||||
{list.length && <div className="main-news">
|
||||
{list.length ? <div className="main-news">
|
||||
<h3 className="news-tit ellipsis-2">{list[0].title}</h3>
|
||||
<div className="news-date">{list[0].created_time && list[0].created_time.split(' ')[0]}</div>
|
||||
<Button type="link" ><a target="_black" href={list[0].url}>查看详情</a></Button>
|
||||
</div>}
|
||||
</div> : ''}
|
||||
|
||||
<div className="news-box">
|
||||
{
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 479 KiB |
Loading…
Reference in New Issue