Commit f1529c89 by xuzhenghua

test

parent aa3624c9
...@@ -3,5 +3,6 @@ var API = { ...@@ -3,5 +3,6 @@ var API = {
'search-api': 'https://search.julyedu.com', 'search-api': 'https://search.julyedu.com',
'passport-api': 'http://passport-test.julyedu.com', 'passport-api': 'http://passport-test.julyedu.com',
'base-api': 'http://api-test.julyedu.com', 'base-api': 'http://api-test.julyedu.com',
'record': 'record.julyedu.com:8001' 'record': 'record.julyedu.com:8001',
'process-api': 'ws:process-test.julyedu.com:9502'
} }
...@@ -98,8 +98,9 @@ const formikConfig = { ...@@ -98,8 +98,9 @@ const formikConfig = {
function forgotPasswordReset(values, props) { function forgotPasswordReset(values, props) {
let key = sessionStorage.getItem('r_type') === 'email' ? 'email' : 'tel' let key = sessionStorage.getItem('r_type') === 'email' ? 'email' : 'tel'
http.post(`${API['passport-api']}/account/up_pass_by_${key === 'email' ? 'email' : 'phone'}`, { let requestKey = key === 'email' ? 'email' : 'phone'
[key]: sessionStorage.getItem(key), http.post(`${API['passport-api']}/account/up_pass_by_${requestKey}`, {
[requestKey]: sessionStorage.getItem(key),
password: encrypt(values.password) password: encrypt(values.password)
}) })
.then(res => { .then(res => {
......
...@@ -36,7 +36,7 @@ class Recommendation extends PureComponent { ...@@ -36,7 +36,7 @@ class Recommendation extends PureComponent {
if(data.code === 200){ if(data.code === 200){
this.setState({ this.setState({
list: data.data list: Array.isArray(data.data) ? data.data : []
}) })
}else { }else {
...@@ -52,6 +52,8 @@ class Recommendation extends PureComponent { ...@@ -52,6 +52,8 @@ class Recommendation extends PureComponent {
render() { render() {
return ( return (
this.state.list.length
?
<div className='recommendation'> <div className='recommendation'>
<div className={'title'}>相关推荐</div> <div className={'title'}>相关推荐</div>
<ul> <ul>
...@@ -80,6 +82,7 @@ class Recommendation extends PureComponent { ...@@ -80,6 +82,7 @@ class Recommendation extends PureComponent {
} }
</ul> </ul>
</div> </div>
: null
); );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment