模版消息标题加上句号,审核模版消息再次点击显示修改

This commit is contained in:
yuanke 2016-08-04 15:32:25 +08:00
parent ee019cd364
commit 55afb84aef
6 changed files with 39 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class AppliedProject < ActiveRecord::Base
count = ShieldWechatMessage.where("container_type='User' and container_id=#{member.user_id} and shield_type='Project' and shield_id=#{self.project_id}").count
if count == 0
ws = WechatService.new
ws.project_review_notice member.user_id, "review_project_member", self.project_id, "项目成员审批通知", self.project.name, self.user.show_name, format_time(Time.now),"点击查看申请详情。",self.user.id
ws.project_review_notice member.user_id, "review_project_member", self.project_id, "项目成员审批通知", self.project.name, self.user.show_name, format_time(Time.now),"点击查看申请详情。",self.user.id
end
#--------------------------------------------
end

View File

@ -615,7 +615,7 @@ class CoursesService
rolename = role_ids.include?("7") ? "助教" : "教师"
content = current_user.show_name + "申请以"+rolename+"身份加入班级,等待您的审批。"
ws = WechatService.new
ws.class_notice tea_user.id, "review_class_member", course.id, "班级成员审批通知", course.name, tea_user.show_name, format_time(Time.now), content, "点击查看申请详情。",current_user.id
ws.class_notice tea_user.id, "review_class_member", course.id, "班级成员审批通知", course.name, tea_user.show_name, format_time(Time.now), content, "点击查看申请详情。",current_user.id
end
end
#--------------------------------------------

View File

@ -14,5 +14,13 @@
</div>
</div>
<div ng-show="current_course && !current_review_member ">
<div class="blue-title">{{current_course.name}}</div>
<div class="tac sn-font-grey2" style="margin-top:50px;">{{tip_2}}</div>
</div>
<div ng-show="!current_course" class="blue-title">{{tip_1}}</div>
<my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>
</div>

View File

@ -1,7 +1,7 @@
<div class="post-container">
<div loading-spinner></div>
<div ng-show="current_review_member" class="post-container" style="padding-bottom:50px;">
<div class="blue-title">{{project.name}}</div>
<div ng-show="current_project && current_review_member" class="post-container" style="padding-bottom:50px;">
<div class="blue-title">{{current_project.name}}</div>
<div class="class-detail-row f13 c-grey3"><img ng-src="/images/wechat/{{current_review_member.gender==0 ? 'male' : 'female'}}.jpg" width="30" class="fl ml10 img-circle mt4" /><span class="fl mt10 ml10">{{current_review_member.realname == "" ? current_review_member.name : current_review_member.realname}}</span><img ng-src="/images/wechat/{{current_review_member.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt10" /><div class="cl"></div> </div>
<div class="course-list-row f13 c-grey3 mt10"><span class="fl ml10">角色</span></div>
<ul class="class-list f13 c-grey3">
@ -14,6 +14,12 @@
</div>
</div>
<div ng-show="current_project && !current_review_member ">
<div class="blue-title">{{current_project.name}}</div>
<div class="tac sn-font-grey2" style="margin-top:50px;">{{tip_2}}</div>
</div>
<div ng-show="!current_project" class="blue-title">{{tip_1}}</div>
<my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>
</div>

View File

@ -10,6 +10,9 @@ app.controller('ReviewClassMemberController', ['$scope', '$http', 'auth', 'confi
vm.alertService = alertService.create();
vm.tip_1 = "";
vm.tip_2 = "";
var course_id = $routeParams.id;
var user_id = $routeParams.user_id;
@ -25,6 +28,9 @@ app.controller('ReviewClassMemberController', ['$scope', '$http', 'auth', 'confi
else{
vm.alertService.showMessage('提示', response.data.message);
}
if(!vm.current_course){
vm.tip_1 = "该班级不存在或已被删除";
}
}
);
@ -43,6 +49,10 @@ app.controller('ReviewClassMemberController', ['$scope', '$http', 'auth', 'confi
console.log("review_member_info");
console.log(response.data.data);
}
if(!vm.current_review_member){
vm.tip_2 = "该申请不存在或已被处理";
}
});

View File

@ -10,6 +10,9 @@ app.controller('ReviewProjectMemberController', ['$scope', '$http', 'auth', 'con
vm.alertService = alertService.create();
vm.tip_1 = "";
vm.tip_2 = "";
var project_id = $routeParams.id;
var user_id = $routeParams.user_id;
@ -26,6 +29,10 @@ app.controller('ReviewProjectMemberController', ['$scope', '$http', 'auth', 'con
vm.alertService.showMessage('提示', response.data.message);
}
if(!vm.current_project){
vm.tip_1 = "该项目不存在或已被删除";
}
}
);
}
@ -43,6 +50,10 @@ app.controller('ReviewProjectMemberController', ['$scope', '$http', 'auth', 'con
console.log("review_member_info");
console.log(response.data.data);
}
if(!vm.current_review_member){
vm.tip_2 = "该申请不存在或已被处理";
}
});
}