Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_hss
daiao 6 years ago
commit 355eddeaf4

Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 KiB

After

Width:  |  Height:  |  Size: 155 KiB

File diff suppressed because one or more lines are too long

@ -330,7 +330,8 @@ class App extends Component {
title: 'EduCoder',
desc: '创新源于实践',
link: currentUrl,
imgUrl: (currentUrl.endsWith('/') ? currentUrl : currentUrl + '/') + 'images/educoder/index/subject/subject15.jpg'
imgUrl: window.__testImageUrl
|| (currentUrl.endsWith('/') ? currentUrl : currentUrl + '/') + 'images/educoder/index/subject/subject15.jpg'
};
wx.onMenuShareAppMessage(shareData);//分享给好友
@ -428,7 +429,14 @@ class App extends Component {
return (<Topicbank {...this.props} {...props} {...this.state} />)
}
}></Route>
{/*题库*/}
<Route path="/topicbank/:topicstype"
render={
(props) => {
return (<Topicbank {...this.props} {...props} {...this.state} />)
}
}></Route>
{/*众包创新*/}
<Route path={"/crowdsourcing"} component={ProjectPackages}/>
{/*认证*/}

@ -59,7 +59,7 @@ class Cooperatives extends React.Component {
<List.Item>
<div className="cooperative-item-list-item">
<a href={obj.url || 'javascript:void(0)'} target={obj.url && '_blank'}>
<img className="" height="90" src={getImageUrl(obj.img)} />
<img className="" height="90" src={getImageUrl(obj.img.substr(1))} />
</a>
</div>
</List.Item>

@ -21,7 +21,14 @@ class Help extends React.Component {
super(props);
this.state = {
type: props.match.params.type
type: props.match.params.type || 'about_us'
}
}
componentDidUpdate(prevProps) {
console.log('update', prevProps, this.props);
if(prevProps.match.params.type !== this.props.match.params.type){
this.setState({ type: this.props.match.params.type });
}
}
@ -35,7 +42,7 @@ class Help extends React.Component {
<div className="help-menu">
<Menu
mode="inline"
defaultSelectedKeys={[this.state.type || 'about_us']}>
selectedKeys={[this.state.type]}>
<Menu.Item key="about_us"><Link to="/help/about_us">关于我们</Link></Menu.Item>
<Menu.Item key="contact_us"><Link to="/help/contact_us">联系我们</Link></Menu.Item>

@ -68,12 +68,16 @@
overflow: hidden;
display: block;
border-radius: 6px;
position: relative;
}
.squareCard .squareImg img{
transition: all 1s;
-webkit-transition: all 1s;
-o-transition: all 1s;
width: 100%;
position: absolute;
top: -50%;
margin-top: 67.5px;
}
.squareCard .squareImg img:hover{
transform: scale(1.05);

@ -35,6 +35,12 @@ class Topic_bank extends Component {
(props) => (<PackageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/topicbank/:topicstype"
render={
(props) => (<PackageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
</Switch>
</div>

@ -86,29 +86,34 @@ class InfosTopics extends Component{
if(user_id===undefined){
user_id=this.props.match.params&&this.props.match.params.username;
}
let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`;
axios.get(encodeURI(url),{params:{
type,
object_type:category,
course_list_id,
sort_by,
sort_direction,
page,
per_page
}
}).then((response) => {
this.setState({
data:response.data,
checkBoxValues:[],
isSpin:false
})
}).catch((error) => {
this.setState({
isSpin:false
})
});
if(user_id!=undefined){
let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`;
axios.get(encodeURI(url),{params:{
type,
object_type:category,
course_list_id,
sort_by,
sort_direction,
page,
per_page
}
}).then((response) => {
this.setState({
data:response.data,
checkBoxValues:[],
isSpin:false
})
}).catch((error) => {
this.setState({
isSpin:false
})
});
}
}
@ -332,6 +337,8 @@ class InfosTopics extends Component{
</Menu.Item>:""}
</Menu>
);
// console.log(this.props)
return(
<div className="educontent mb50 mt40">
{/*提示*/}
@ -431,7 +438,7 @@ class InfosTopics extends Component{
<div className={types==="personal"?"topicstopfont fl ":"topicstopfont fl topcsactive"}
>我的题库</div>
<a className={types==="publicly"?"topicstopfont fr ":"topicstopfont fr topcsactive"}
href={`/topicbank/${this.props.current_user&&this.props.current_user.login}/publicly`}
href={`/topicbank/publicly`}
>公共题库</a>
</div>}

Loading…
Cancel
Save