Commit f1529c89 by xuzhenghua

test

parent aa3624c9
......@@ -3,5 +3,6 @@ var API = {
'search-api': 'https://search.julyedu.com',
'passport-api': 'http://passport-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 = {
function forgotPasswordReset(values, props) {
let key = sessionStorage.getItem('r_type') === 'email' ? 'email' : 'tel'
http.post(`${API['passport-api']}/account/up_pass_by_${key === 'email' ? 'email' : 'phone'}`, {
[key]: sessionStorage.getItem(key),
let requestKey = key === 'email' ? 'email' : 'phone'
http.post(`${API['passport-api']}/account/up_pass_by_${requestKey}`, {
[requestKey]: sessionStorage.getItem(key),
password: encrypt(values.password)
})
.then(res => {
......
......@@ -36,7 +36,7 @@ class Recommendation extends PureComponent {
if(data.code === 200){
this.setState({
list: data.data
list: Array.isArray(data.data) ? data.data : []
})
}else {
......@@ -52,6 +52,8 @@ class Recommendation extends PureComponent {
render() {
return (
this.state.list.length
?
<div className='recommendation'>
<div className={'title'}>相关推荐</div>
<ul>
......@@ -80,6 +82,7 @@ class Recommendation extends PureComponent {
}
</ul>
</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