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

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

@ -21,7 +21,14 @@ class Help extends React.Component {
super(props); super(props);
this.state = { 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"> <div className="help-menu">
<Menu <Menu
mode="inline" 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="about_us"><Link to="/help/about_us">关于我们</Link></Menu.Item>
<Menu.Item key="contact_us"><Link to="/help/contact_us">联系我们</Link></Menu.Item> <Menu.Item key="contact_us"><Link to="/help/contact_us">联系我们</Link></Menu.Item>

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

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

@ -86,6 +86,9 @@ class InfosTopics extends Component{
if(user_id===undefined){ if(user_id===undefined){
user_id=this.props.match.params&&this.props.match.params.username; user_id=this.props.match.params&&this.props.match.params.username;
} }
if(user_id!=undefined){
let {per_page}=this.state; let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`; let url=`/users/${user_id}/question_banks.json`;
@ -109,6 +112,8 @@ class InfosTopics extends Component{
isSpin:false isSpin:false
}) })
}); });
}
} }
@ -332,6 +337,8 @@ class InfosTopics extends Component{
</Menu.Item>:""} </Menu.Item>:""}
</Menu> </Menu>
); );
// console.log(this.props)
return( return(
<div className="educontent mb50 mt40"> <div className="educontent mb50 mt40">
{/*提示*/} {/*提示*/}
@ -431,7 +438,7 @@ class InfosTopics extends Component{
<div className={types==="personal"?"topicstopfont fl ":"topicstopfont fl topcsactive"} <div className={types==="personal"?"topicstopfont fl ":"topicstopfont fl topcsactive"}
>我的题库</div> >我的题库</div>
<a className={types==="publicly"?"topicstopfont fr ":"topicstopfont fr topcsactive"} <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> >公共题库</a>
</div>} </div>}

Loading…
Cancel
Save