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

dev_hjm
杨树林 6 years ago
commit f7f64031cf

@ -282,7 +282,7 @@ class SubjectsController < ApplicationController
# 删除实训
# DELETE: /api/subejcts/:id/delete_member
def delete_member
tip_exception(403, "没权限操作") unless current_user.creator_of_subject?(@subject)
tip_exception(403, "没权限操作") unless current_user.manager_of_subject?(@subject)
tip_exception('用户id不能为空') if params[:user_id].blank?
user = @subject.subject_members.where(:user_id => params[:user_id], :role => 2).first
tip_exception("管理员用户不允许删除,或用户不存在") if user.blank?

@ -252,6 +252,10 @@ class PathDetailIndex extends Component{
let param={user_id:user_id};
axios.delete(url,{data:param}).then((response) => {
if(response.data.status===1){
if (this.props.current_user.user_id == user_id) {
this.props.history.push('/paths')
return;
}
this.props.showNotification(response.data.message)
this.setState({
Modalstype:false,

Loading…
Cancel
Save