This commit is contained in:
caishi 2021-02-03 18:41:01 +08:00
parent daa5cc212c
commit 26d2e0f541
4 changed files with 12 additions and 9 deletions

View File

@ -84,7 +84,7 @@ export default Form.create()(
<Radio.Group name="exposure">
<Radio style={radioStyle} value="common" key={1}>公开</Radio>
<Radio style={radioStyle} value="limited" key={2}>受限<span className="color-grey-8">仅对登录用户可见</span></Radio>
<Radio style={radioStyle} value="privacy" key={3}>公开<span className="color-grey-8">仅对组织成员可见</span></Radio>
<Radio style={radioStyle} value="privacy" key={3}>私有<span className="color-grey-8">仅对组织成员可见</span></Radio>
</Radio.Group>
)}
<p className="font-16">选择头像</p>

View File

@ -132,7 +132,7 @@ export default Form.create()(
<Radio.Group>
<Radio value="common" style={radioStyle}>公开</Radio>
<Radio value="limited" style={radioStyle}>受限<span>仅对登录用户可见</span></Radio>
<Radio value="privacy" style={radioStyle}>公开<span>仅对组织成员可见</span></Radio>
<Radio value="privacy" style={radioStyle}>私有<span>仅对组织成员可见</span></Radio>
</Radio.Group>
)}
{helper(

View File

@ -19,8 +19,8 @@ export default withRouter(
<Switch>
<Route
path="/users/:username"
render={() => (
<Infos {...props} />
render={(p) => (
<Infos {...props} {...p}/>
)}
></Route>
</Switch>

View File

@ -8,20 +8,23 @@ import Nodata from '../Nodata';
import axios from 'axios';
const limit = 15;
function Team(){
function Team(props){
const [ list ,setList ] = useState(undefined);
const [ page ,setPage ] = useState(1);
const [ total ,setTotal ] = useState(0);
const [ sort_direction , setSort_direction ] = useState("asc");
const [ sort_by ,setSort_by ] = useState("created_at");
const [ search ,setSearch ] = useState(undefined);
console.log(props);
const { username } = props.match.params;
useEffect(()=>{
if(username){
getList(search);
},[sort_by,page,sort_direction])
}
},[username,sort_by,page,sort_direction])
function getList(search){
const url = `/organizations.json`;
const url = `/users/${username}/organizations.json`;
axios.get(url,{
params:{
search,sort_by,sort_direction,page,limit