From c3c2516e6b39fa507b5b2f91c455edadb1b95784 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 31 Aug 2016 17:19:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E3=80=81=E9=A1=B9=E7=9B=AE=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=88=90=E5=91=98=E5=92=8C=E9=80=80=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/courses.rb | 3 +- app/api/mobile/apis/projects.rb | 13 +- app/services/projects_service.rb | 2 +- public/assets/wechat/class.html | 5 +- public/assets/wechat/edit_class_member.html | 7 +- public/assets/wechat/edit_project_member.html | 8 +- public/assets/wechat/project.html | 5 +- .../javascripts/wechat/controllers/class.js | 57 +++----- .../wechat/controllers/edit_class_member.js | 115 +++++++++++---- .../wechat/controllers/edit_project_member.js | 136 ++++++++++++++---- .../javascripts/wechat/controllers/project.js | 57 +++----- 11 files changed, 263 insertions(+), 145 deletions(-) diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index cd5d945e3..6a4175706 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -540,6 +540,7 @@ module Mobile present :status, 0 else present :status, -1 + present :message, "该用户已不在班级中" end end @@ -732,7 +733,7 @@ module Mobile end out = {status: status} message = case status - when 0; "退出成功" + when 0; "退出班级成功" when 1; "您不在课程中" when 2; "您还未登录" when 3; "管理员不能退出班级" diff --git a/app/api/mobile/apis/projects.rb b/app/api/mobile/apis/projects.rb index b66f6c25f..665d068ae 100644 --- a/app/api/mobile/apis/projects.rb +++ b/app/api/mobile/apis/projects.rb @@ -127,6 +127,7 @@ module Mobile present :status, 0 else present :status, -1 + present :message, "该用户已不在项目中" end end @@ -283,7 +284,7 @@ module Mobile if(current_user.id != params[:user_id].to_i) #权限 project = Project.find("#{params[:id]}") - if project.tea_id != params[:user_id].to_i + if project.user_id != params[:user_id].to_i my_member = project.member_principals.where("users.id=#{current_user.id}").first @@ -308,7 +309,7 @@ module Mobile out = {status: status} message = case status - when 0; "退出成功" + when 0; "删除成功" when 1; "该用户不在该项目中" when -1; "您还未登录" when -2; "您没有权限" @@ -327,13 +328,15 @@ module Mobile post ':id/quit' do authenticate! + project = Project.find("#{params[:id]}") + ps = ProjectsService.new - status = ps.exit_project(params[:id],current_user) + status = ps.exit_project(project,current_user) out = {status: status} message = case status - when 0; "退出成功" - when -3; "您不在课程中" + when 0; "退出项目成功" + when -3; "您不在项目中" when -1; "您还未登录" when -2; "项目创建者不能退出项目" else; "未知错误,请稍后再试" diff --git a/app/services/projects_service.rb b/app/services/projects_service.rb index 5d22244a9..ea2350495 100644 --- a/app/services/projects_service.rb +++ b/app/services/projects_service.rb @@ -357,7 +357,7 @@ class ProjectsService #删除项目成员 def project_delete_member project,user_id,current_user - if user.nil? + if current_user.nil? state = -1 return state end diff --git a/public/assets/wechat/class.html b/public/assets/wechat/class.html index 07e918336..8208c3883 100644 --- a/public/assets/wechat/class.html +++ b/public/assets/wechat/class.html @@ -259,8 +259,8 @@
-
- 退出班级 +
+ 退出班级
@@ -278,4 +278,5 @@ + diff --git a/public/assets/wechat/edit_class_member.html b/public/assets/wechat/edit_class_member.html index ec8965caa..decb31efb 100644 --- a/public/assets/wechat/edit_class_member.html +++ b/public/assets/wechat/edit_class_member.html @@ -3,21 +3,22 @@
成员管理
{{current_edit_member.user.realname == "" ? current_edit_member.user.name : current_edit_member.user.realname}}
-
角色变更
+
角色变更
-
删除成员
+
删除成员
取消 - 确定 + 确定
+ diff --git a/public/assets/wechat/edit_project_member.html b/public/assets/wechat/edit_project_member.html index 5b9ea8bb1..5500766d5 100644 --- a/public/assets/wechat/edit_project_member.html +++ b/public/assets/wechat/edit_project_member.html @@ -3,23 +3,23 @@
成员管理
{{current_edit_member.user.real_name == "" ? current_edit_member.user.name : current_edit_member.user.real_name}}
-
角色变更
+
角色变更
-
删除成员
+
删除成员
取消 - 确定 + 确定
- + diff --git a/public/assets/wechat/project.html b/public/assets/wechat/project.html index 18e85fea9..8dfba3619 100644 --- a/public/assets/wechat/project.html +++ b/public/assets/wechat/project.html @@ -138,10 +138,11 @@
-
- 退出项目 +
+ 退出项目
+ diff --git a/public/javascripts/wechat/controllers/class.js b/public/javascripts/wechat/controllers/class.js index 06e15f1d5..fdd5bcd71 100644 --- a/public/javascripts/wechat/controllers/class.js +++ b/public/javascripts/wechat/controllers/class.js @@ -177,6 +177,8 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location vm.myresource_sendIndex = rms.get('myresource_sendIndex') || 1; vm.alertService = alertService.create(); + //双弹框 + vm.alertService_2 = alertService.create(); vm.invite = function(){ rms.save('course_activities_page',vm.course_activities_page); @@ -327,44 +329,27 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location $location.path("/homework").search({id: id}); }; - vm.deleteMember = function(user_id){ - $http({ - method: 'POST', - url: apiUrl + "courses/deletemember?id=" + courseid, - data:{token:auth.token(),user_id:user_id} - }).then(function successCallback(response) { - console.log(response.data); - - if(response.data.status == 0){ - vm.alertService.showMessage('提示', response.data.message,function(){ - //确定 - - }); - } - else{ - vm.alertService.showMessage('提示', response.data.message); - } - - }); - }; - vm.quit = function(){ - $http({ - method: 'POST', - url: apiUrl + "courses/quit?id=" + courseid, - data:{token:auth.token()} - }).then(function successCallback(response) { - console.log(response.data); - if(response.data.status == 0){ - vm.alertService.showMessage('提示', response.data.message,function(){ - //确定 - - }); - } - else{ - vm.alertService.showMessage('提示', response.data.message); - } + vm.alertService_2.showMessage('提示', "是否确认退出班级",function(){ + $http({ + method: 'POST', + url: apiUrl + "courses/" + courseid+"/quit", + data:{token:auth.token()} + }).then(function successCallback(response) { + console.log(response.data); + if(response.data.status == 0){ + vm.alertService.showMessage('提示', response.data.message,function(){ + //确定 + rms.save('syllabuses',[]); + $location.path("/class_list"); + }); + } + else{ + vm.alertService.showMessage('提示', response.data.message); + } + }); }); + }; diff --git a/public/javascripts/wechat/controllers/edit_class_member.js b/public/javascripts/wechat/controllers/edit_class_member.js index e00e36f20..d872dac09 100644 --- a/public/javascripts/wechat/controllers/edit_class_member.js +++ b/public/javascripts/wechat/controllers/edit_class_member.js @@ -9,6 +9,8 @@ app.controller('EditClassMemberController', ['$scope', '$http', 'auth', 'config' vm.current_edit_member = null; vm.alertService = alertService.create(); + //双弹框 + vm.alertService_2 = alertService.create(); var course_id = $routeParams.id; var user_id = $routeParams.user_id; @@ -21,6 +23,8 @@ app.controller('EditClassMemberController', ['$scope', '$http', 'auth', 'config' vm.tmpassistant = false; //教辅 vm.tmpstudent = false; //学生 + vm.buttongrey = true; + if(!vm.current_edit_member){ $http.post(config.apiUrl+'courses/get_member_info', { @@ -29,7 +33,9 @@ app.controller('EditClassMemberController', ['$scope', '$http', 'auth', 'config' user_id:user_id }).then(function(response){ if(response.data.status!=0){ - vm.alertService.showMessage('提示', response.data.message); + vm.alertService.showMessage('提示', response.data.message,function(){ + $location.path("/class").search({id: course_id,tag:1}); + }); } else { console.log(response); course_id = response.data.course_id; @@ -62,36 +68,69 @@ app.controller('EditClassMemberController', ['$scope', '$http', 'auth', 'config' window.history.back(); }; - vm.edit_member_role = function(){ - if((vm.teacher == vm.tmpteacher)&& (vm.assistant == vm.tmpassistant)&&(vm.student == vm.tmpstudent)){ - vm.alertService.showMessage('提示', "该用户当前已是该角色"); - return; - } + vm.deleteMember = function(user_id){ + vm.alertService_2.showMessage('提示', "是否确认删除成员",function(){ + $http({ + method: 'POST', + url: apiUrl + "courses/" + course_id+"/deletemember", + data:{token:auth.token(),user_id:user_id} + }).then(function successCallback(response) { + console.log(response.data); - if((vm.teacher == false)&& (vm.assistant == false)&&(vm.student == false)){ - vm.alertService.showMessage('提示', "请至少选择一种角色"); - return; - } + if(response.data.status == 0){ + vm.alertService.showMessage('提示', response.data.message,function(){ + //确定 + $location.path("/class").search({id: course_id,tag:1}); + }); + } + else{ + vm.alertService.showMessage('提示', response.data.message); + } - $http.post(config.apiUrl+'courses/edit_member_role', { - token: auth.token(), - id: course_id, - user_id:vm.current_edit_member.user.id, - teacher_flag:vm.teacher, - assistant_flag:vm.assistant, - student_flag:vm.student - }).then(function(response){ - if(response.data.status!=0){ - vm.alertService.showMessage('提示', response.data.message); - } else { - vm.alertService.showMessage('提示', '修改角色成功', function(){ -// window.history.back(); - $location.path("/class").search({id: course_id,tag:1}); - }); - } + }); }); }; + vm.edit_member_role = function(){ + if(vm.buttongrey == true){ + return; + } + + if(vm.current_edit_member.show){ + //删除成员 + vm.deleteMember(vm.current_edit_member.user.id); + } + else{ + if((vm.teacher == vm.tmpteacher)&& (vm.assistant == vm.tmpassistant)&&(vm.student == vm.tmpstudent)){ + vm.alertService.showMessage('提示', "该用户当前已是该角色"); + return; + } + + if((vm.teacher == false)&& (vm.assistant == false)&&(vm.student == false)){ + vm.alertService.showMessage('提示', "请至少选择一种角色"); + return; + } + + $http.post(config.apiUrl+'courses/edit_member_role', { + token: auth.token(), + id: course_id, + user_id:vm.current_edit_member.user.id, + teacher_flag:vm.teacher, + assistant_flag:vm.assistant, + student_flag:vm.student + }).then(function(response){ + if(response.data.status!=0){ + vm.alertService.showMessage('提示', response.data.message); + } else { + vm.alertService.showMessage('提示', '修改角色成功', function(){ +// window.history.back(); + $location.path("/class").search({id: course_id,tag:1}); + }); + } + }); + } + }; + vm.selectRole = function(role_id){ if (role_id == 7){ if(!vm.teacher){ @@ -106,6 +145,28 @@ app.controller('EditClassMemberController', ['$scope', '$http', 'auth', 'config' else if (role_id == 10){ vm.student = !vm.student; } - } + + if((vm.teacher == vm.tmpteacher)&& (vm.assistant == vm.tmpassistant)&&(vm.student == vm.tmpstudent)){ + vm.buttongrey = true; + } + else{ + vm.buttongrey = false; + } + + if((vm.teacher == false)&& (vm.assistant == false)&&(vm.student == false)){ + vm.buttongrey = true; + } + + }; + + vm.clickChangeRole = function(){ + vm.current_edit_member.show = !vm.current_edit_member.show; + if((vm.teacher == vm.tmpteacher)&& (vm.assistant == vm.tmpassistant)&&(vm.student == vm.tmpstudent)){ + vm.buttongrey = true; + } + else{ + vm.buttongrey = false; + } + }; }] ); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/edit_project_member.js b/public/javascripts/wechat/controllers/edit_project_member.js index 511db35bb..b8ecb447d 100644 --- a/public/javascripts/wechat/controllers/edit_project_member.js +++ b/public/javascripts/wechat/controllers/edit_project_member.js @@ -10,9 +10,14 @@ app.controller('EditProjectMemberController', ['$scope', '$http', 'auth', 'confi vm.current_edit_member = null; vm.alertService = alertService.create(); + //双弹框 + vm.alertService_2 = alertService.create(); var project_id = $routeParams.id; var user_id = $routeParams.user_id; + + vm.buttongrey = true; + if(!vm.current_edit_member){ $http.post(config.apiUrl+'projects/get_member_info', { token: auth.token(), @@ -20,7 +25,20 @@ app.controller('EditProjectMemberController', ['$scope', '$http', 'auth', 'confi user_id:user_id }).then(function(response){ if(response.data.status!=0){ - vm.alertService.showMessage('提示', response.data.message); + vm.alertService.showMessage('提示', response.data.message,function(){ + rms.save('project_activities_page',0); + rms.save("project_activities",[]); + rms.save("project_has_more",false); + rms.save("project",null); + rms.save("project_master_members",[]); + rms.save("project_develop_members",[]); + rms.save("project_report_members",[]); + rms.save("review_master_members",[]); + rms.save("review_develop_members",[]); + rms.save('tab_num',null); +// window.history.back(); + $location.path("/project").search({id: project_id,tag:1}); + }); } else { project_id = response.data.project_id; user_id = response.data.user_id; @@ -40,42 +58,104 @@ app.controller('EditProjectMemberController', ['$scope', '$http', 'auth', 'confi window.history.back(); }; + vm.deleteMember = function(user_id){ + vm.alertService_2.showMessage('提示', "是否确认删除成员",function(){ + $http({ + method: 'POST', + url: apiUrl + "projects/" + project_id+"/deletemember", + data:{token:auth.token(),user_id:user_id} + }).then(function successCallback(response) { + console.log(response.data); + + if(response.data.status == 0){ + vm.alertService.showMessage('提示', response.data.message,function(){ + //确定 + rms.save('project_activities_page',0); + rms.save("project_activities",[]); + rms.save("project_has_more",false); + rms.save("project",null); + rms.save("project_master_members",[]); + rms.save("project_develop_members",[]); + rms.save("project_report_members",[]); + rms.save("review_master_members",[]); + rms.save("review_develop_members",[]); + rms.save('tab_num',null); +// window.history.back(); + $location.path("/project").search({id: project_id,tag:1}); + + }); + } + else{ + vm.alertService.showMessage('提示', response.data.message); + } + + }); + + }); + }; + vm.edit_member_role = function(){ - if(vm.current_roles_id == vm.current_edit_member.roles_id){ - vm.alertService.showMessage('提示', "该用户当前已是该角色"); + if(vm.buttongrey == true){ return; } - $http.post(config.apiUrl+'projects/edit_member_role', { - token: auth.token(), - id: project_id, - user_id:vm.current_edit_member.user.id, - role_id:vm.current_edit_member.roles_id - }).then(function(response){ - if(response.data.status!=0){ - vm.alertService.showMessage('提示', response.data.message); - } else { - vm.alertService.showMessage('提示', '修改角色成功', function(){ - rms.save('project_activities_page',0); - rms.save("project_activities",[]); - rms.save("project_has_more",false); - rms.save("project",null); - rms.save("project_master_members",[]); - rms.save("project_develop_members",[]); - rms.save("project_report_members",[]); - rms.save("review_master_members",[]); - rms.save("review_develop_members",[]); - rms.save('tab_num',null); -// window.history.back(); - $location.path("/project").search({id: project_id,tag:1}); - }); + if(vm.current_edit_member.show){ + //删除成员 + vm.deleteMember(vm.current_edit_member.user.id); + } + else{ + if(vm.current_roles_id == vm.current_edit_member.roles_id){ + vm.alertService.showMessage('提示', "该用户当前已是该角色"); + return; } - }); + $http.post(config.apiUrl+'projects/edit_member_role', { + token: auth.token(), + id: project_id, + user_id:vm.current_edit_member.user.id, + role_id:vm.current_edit_member.roles_id + }).then(function(response){ + if(response.data.status!=0){ + vm.alertService.showMessage('提示', response.data.message); + } else { + vm.alertService.showMessage('提示', '修改角色成功', function(){ + rms.save('project_activities_page',0); + rms.save("project_activities",[]); + rms.save("project_has_more",false); + rms.save("project",null); + rms.save("project_master_members",[]); + rms.save("project_develop_members",[]); + rms.save("project_report_members",[]); + rms.save("review_master_members",[]); + rms.save("review_develop_members",[]); + rms.save('tab_num',null); +// window.history.back(); + $location.path("/project").search({id: project_id,tag:1}); + }); + } + }); + } }; vm.selectRole = function(role_id){ vm.current_edit_member.roles_id = role_id; - } + + if(vm.current_roles_id == vm.current_edit_member.roles_id){ + vm.buttongrey = true; + } + else{ + vm.buttongrey = false; + } + }; + + vm.clickChangeRole = function(){ + vm.current_edit_member.show = !vm.current_edit_member.show; + if(vm.current_roles_id == vm.current_edit_member.roles_id){ + vm.buttongrey = true; + } + else{ + vm.buttongrey = false; + } + }; }] ); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/project.js b/public/javascripts/wechat/controllers/project.js index 298e9b96f..3f90917b4 100644 --- a/public/javascripts/wechat/controllers/project.js +++ b/public/javascripts/wechat/controllers/project.js @@ -30,6 +30,8 @@ app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'aut // vm.project_members_has_more = rms.get("project_members_has_more"); vm.alertService = alertService.create(); + //双弹框 + vm.alertService_2 = alertService.create(); //跳入邀请界面 vm.invite = function(){ @@ -253,44 +255,27 @@ app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'aut $location.path("/project_publishnote").search({id:projectid}); }; - vm.deleteMember = function(user_id){ - $http({ - method: 'POST', - url: apiUrl + "projects/deletemember?id=" + projectid, - data:{token:auth.token(),user_id:user_id} - }).then(function successCallback(response) { - console.log(response.data); - - if(response.data.status == 0){ - vm.alertService.showMessage('提示', response.data.message,function(){ - //确定 - - }); - } - else{ - vm.alertService.showMessage('提示', response.data.message); - } - - }); - }; - vm.quit = function(){ - $http({ - method: 'POST', - url: apiUrl + "projects/quit?id=" + projectid, - data:{token:auth.token()} - }).then(function successCallback(response) { - console.log(response.data); - if(response.data.status == 0){ - vm.alertService.showMessage('提示', response.data.message,function(){ - //确定 - - }); - } - else{ - vm.alertService.showMessage('提示', response.data.message); - } + vm.alertService_2.showMessage('提示', "是否确认退出项目",function(){ + $http({ + method: 'POST', + url: apiUrl + "projects/" + projectid+"/quit", + data:{token:auth.token()} + }).then(function successCallback(response) { + console.log(response.data); + if(response.data.status == 0){ + vm.alertService.showMessage('提示', response.data.message,function(){ + //确定 + rms.save('projects',[]); + $location.path("/project_list"); + }); + } + else{ + vm.alertService.showMessage('提示', response.data.message); + } + }); }); + }; }]); \ No newline at end of file From 8644ad178c6761c5376f6ce494c1f934f75af91e Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 1 Sep 2016 10:21:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=20=E5=88=A0=E9=99=A4=E6=88=90=E5=91=98?= =?UTF-8?q?=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/courses.rb | 2 +- app/services/courses_service.rb | 5 +++-- public/assets/wechat/class.html | 4 ++-- public/assets/wechat/project.html | 4 ++-- public/javascripts/wechat/controllers/class_publishissue.js | 2 +- public/javascripts/wechat/controllers/class_publishnotice.js | 2 +- public/javascripts/wechat/controllers/project_publishnote.js | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index 6a4175706..c8b67448e 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -734,7 +734,7 @@ module Mobile out = {status: status} message = case status when 0; "退出班级成功" - when 1; "您不在课程中" + when 1; "您不是该班级成员" when 2; "您还未登录" when 3; "管理员不能退出班级" else; "未知错误,请稍后再试" diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index c5084f228..f23b59dcb 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -79,7 +79,8 @@ class CoursesService else c = Course.find(course) end - if current_user.nil? || !(current_user.admin? || c.is_public == 1 || (c.is_public == 0 && current_user.member_of_course?(c))) + # if current_user.nil? || !(current_user.admin? || c.is_public == 1 || (c.is_public == 0 && current_user.member_of_course?(c))) + if current_user.nil? raise '403' end #@canShowCode = isCourseTeacher(User.current.id,course) && params[:role] != '1' @@ -458,8 +459,8 @@ class CoursesService joined = StudentsForCourse.where('student_id = ? and course_id = ?', user.id, params[:object_id]) joined.each do |join| join.delete - @state = 0 end + @state = 0 @state end diff --git a/public/assets/wechat/class.html b/public/assets/wechat/class.html index 8208c3883..706cf5206 100644 --- a/public/assets/wechat/class.html +++ b/public/assets/wechat/class.html @@ -217,7 +217,7 @@
更多
-
+
发布通知 发起讨论
@@ -259,7 +259,7 @@
-
+
退出班级
diff --git a/public/assets/wechat/project.html b/public/assets/wechat/project.html index 8dfba3619..89cbb1418 100644 --- a/public/assets/wechat/project.html +++ b/public/assets/wechat/project.html @@ -98,7 +98,7 @@
更多
-
+
发布新帖
@@ -138,7 +138,7 @@
-
+
退出项目
diff --git a/public/javascripts/wechat/controllers/class_publishissue.js b/public/javascripts/wechat/controllers/class_publishissue.js index 1cd7f1285..09b995bea 100644 --- a/public/javascripts/wechat/controllers/class_publishissue.js +++ b/public/javascripts/wechat/controllers/class_publishissue.js @@ -55,7 +55,7 @@ app.controller('ClassPublishIssueController', ['$scope', '$http', 'auth', 'confi ).then(function(response){ if(response.data.status == 0) { - vm.alertService.showMessage('提示', '您已成功发布问题',function(){ + vm.alertService.showMessage('提示', '发布成功',function(){ rms.save('course_activities_page',0); rms.save("course_activities",[]); rms.save("course_has_more",false); diff --git a/public/javascripts/wechat/controllers/class_publishnotice.js b/public/javascripts/wechat/controllers/class_publishnotice.js index a0b9ab676..b900305c1 100644 --- a/public/javascripts/wechat/controllers/class_publishnotice.js +++ b/public/javascripts/wechat/controllers/class_publishnotice.js @@ -55,7 +55,7 @@ app.controller('ClassPublishNoticeController', ['$scope', '$http', 'auth', 'conf ).then(function(response){ if(response.data.status == 0) { - vm.alertService.showMessage('提示', '您已成功发布通知',function(){ + vm.alertService.showMessage('提示', '发布成功',function(){ rms.save('course_activities_page',0); rms.save("course_activities",[]); rms.save("course_has_more",false); diff --git a/public/javascripts/wechat/controllers/project_publishnote.js b/public/javascripts/wechat/controllers/project_publishnote.js index 231faaea6..f39b32827 100644 --- a/public/javascripts/wechat/controllers/project_publishnote.js +++ b/public/javascripts/wechat/controllers/project_publishnote.js @@ -56,7 +56,7 @@ app.controller('ProjectPublishNoteController', ['$scope', '$http', 'auth', 'conf ).then(function(response){ if(response.data.status == 0) { - vm.alertService.showMessage('提示', '您已成功发布帖子',function(){ + vm.alertService.showMessage('提示', '发布成功',function(){ rms.save('project_activities_page',0); rms.save("project_activities",[]); rms.save("project_has_more",false);