Merge branches 'dev_Ysl' and 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysl

dev_cs_new
杨树明 6 years ago
commit e492481ceb

@ -1 +1,2 @@
json.course_id @course.id json.course_id @course.id
json.first_category_url module_url(@course.none_hidden_course_modules.first, @course)

@ -4,7 +4,7 @@ json.courses @courses do |course|
json.avatar_url url_to_avatar(course.teacher) json.avatar_url url_to_avatar(course.teacher)
json.creator course.teacher.real_name json.creator course.teacher.real_name
json.school course.school&.name json.school course.school&.name
json.technical_title course.teacher.identity json.technical_title "" # course.teacher.identity
json.course_members_count course.course_members_count json.course_members_count course.course_members_count
json.tasks_count get_tasks_count course json.tasks_count get_tasks_count course
json.visits course.visits json.visits course.visits

@ -11,6 +11,11 @@ json.libraries do
json.published_at library.display_published_at json.published_at library.display_published_at
json.created_at library.display_created_at json.created_at library.display_created_at
json.tags library.library_tags.map(&:name) # 标签
json.tags do
json.array! library.library_tags.each do |tag|
json.extract! tag, :id, :name
end
end
end end
end end

@ -1,6 +1,9 @@
json.extract! tiding, :id, :status, :viewed, :user_id, :tiding_type, :container_id, :container_type, :parent_container_id, :parent_container_type json.extract! tiding, :id, :status, :viewed, :user_id, :tiding_type, :container_id, :container_type, :parent_container_id, :parent_container_type
json.content tiding.content json.content tiding.content
json.identifier tiding.identifier json.identifier tiding.identifier
json.auth_type tiding.container_type == 'ApplyUserAuthentication' ? tiding.container.auth_type : nil
json.time tiding.how_long_time json.time tiding.how_long_time
json.new_tiding tiding.unread?(@onclick_time) json.new_tiding tiding.unread?(@onclick_time)

@ -171,7 +171,8 @@ class Testpapersettinghomepage extends Component{
} }
console.log("170"); console.log("170");
console.log(params); console.log(params);
axios.get(url+`?${queryString.stringify(params)}`+ '&export=true').then((response) => { const urll=url+`?${queryString.stringify(params)}`;
axios.get(urll+ '&export=true').then((response) => {
if(response===undefined){ if(response===undefined){
return return
} }
@ -195,13 +196,13 @@ class Testpapersettinghomepage extends Component{
}else { }else {
this.setState({ donwloading: true }) this.setState({ donwloading: true })
downloadFile({ downloadFile({
url: url+`?${queryString.stringify(params)}`, url: urll,
successCallback: (url) => { successCallback: (url) => {
this.setState({ donwloading: false }); this.setState({ donwloading: false })
console.log('successCallback') console.log('successCallback')
}, },
failCallback: (responseHtml, url) => { failCallback: (responseHtml, url) => {
this.setState({ donwloading: false }); this.setState({ donwloading: false })
console.log('failCallback') console.log('failCallback')
} }
}) })

@ -93,8 +93,8 @@ class Messagerouting extends Component{
// console.log("64"); // console.log("64");
// console.log(data); // console.log(data);
this.setState({ this.setState({
unread_message_count:data.unread_message_count, unread_message_count:parseInt(data.unread_message_count),
unread_tiding_count:data.unread_tiding_count, unread_tiding_count:parseInt(data.unread_tiding_count),
}) })
}; };
@ -172,11 +172,11 @@ class Messagerouting extends Component{
<ul className="edu-back-white"> <ul className="edu-back-white">
<li className={routing ===1?"nav pr active":"nav pr"}> <li className={routing ===1?"nav pr active":"nav pr"}>
<a onClick={(value)=>this.SwitchonClick(1)}>消息</a> <a onClick={(value)=>this.SwitchonClick(1)}>消息</a>
{parseInt(unread_tiding_count)>0?<span className="new-info">{unread_message_count}</span>:""} {unread_tiding_count>0?<span className="new-info">{unread_message_count}</span>:""}
</li> </li>
<li className={routing ===2?"nav pr active":routing ===3?"nav pr active":"nav pr"}> <li className={routing ===2?"nav pr active":routing ===3?"nav pr active":"nav pr"}>
<a onClick={(value)=>this.SwitchonClick(2)}>私信</a> <a onClick={(value)=>this.SwitchonClick(2)}>私信</a>
{parseInt(unread_tiding_count)>0?<span className="new-info">{unread_tiding_count}</span>:""} {unread_tiding_count>0?<span className="new-info">{unread_tiding_count}</span>:""}
</li> </li>
</ul> </ul>
</div> </div>

Loading…
Cancel
Save