微信项目及班级邀请码相关BUG修改
This commit is contained in:
parent
3c2ab32121
commit
12a9c95c01
|
@ -306,7 +306,7 @@ class WechatsController < ActionController::Base
|
|||
role = 5
|
||||
|
||||
ps = ProjectsService.new
|
||||
status = ps.join_project({invite_code: project.invite_code}, user)
|
||||
status = ps.join_project({role:5, invite_code: project.invite_code}, user)
|
||||
if status != 0
|
||||
raise ProjectsService::JoinProjectError.message(status)
|
||||
end
|
||||
|
|
|
@ -226,7 +226,7 @@ class CoursesService
|
|||
end
|
||||
else
|
||||
CourseMessage.create(:user_id => apply_user.id, :course_id => c.id, :viewed => false,:content=> messages.content,:course_message_id=>current_user.id,:course_message_type=>'CourseRequestDealResult',:status=>2)
|
||||
message.update_attributes(:status=>2,:viewed=>1)
|
||||
messages.update_attributes(:status=>2,:viewed=>1)
|
||||
if integer_ids.include?(9)
|
||||
message = "您已拒绝教师"+apply_user.show_name+",加入班级"
|
||||
else
|
||||
|
|
|
@ -150,7 +150,7 @@ class ProjectsService
|
|||
if !AppliedProject.where(:project_id => project.id, :user_id => current_user.id).first.nil?
|
||||
status = 8
|
||||
else
|
||||
AppliedProject.create(:user_id => current_user.id, :project_id => project.id, :role => params[:role_id])
|
||||
AppliedProject.create(:user_id => current_user.id, :project_id => project.id, :role => params[:role])
|
||||
|
||||
status = 7
|
||||
end
|
||||
|
|
|
@ -142,7 +142,7 @@ class WechatService
|
|||
def three_keys_template(openid, template_id, type, id, first, key1, key2, key3, remark="",uid)
|
||||
tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}/#{id}"
|
||||
if uid && uid != 0
|
||||
tmpurl = tmpurl + "&user_id="+uid.to_s
|
||||
tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"+ "&user_id="+uid.to_s
|
||||
end
|
||||
|
||||
data = {
|
||||
|
@ -179,7 +179,7 @@ class WechatService
|
|||
def four_keys_template(openid, template_id, type, id, first, key1, key2, key3, key4, remark="",uid)
|
||||
tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}/#{id}"
|
||||
if uid && uid != 0
|
||||
tmpurl = tmpurl + "&user_id="+uid.to_s
|
||||
tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"+ "&user_id="+uid.to_s
|
||||
end
|
||||
|
||||
data = {
|
||||
|
|
|
@ -221,6 +221,7 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx', func
|
|||
imgUrl = window.g_localhost+response.data.data.author.img_url;
|
||||
}
|
||||
|
||||
var desc = ""
|
||||
if(response.data.data.content){
|
||||
desc = response.data.data.content.replace(/<[^>]+>/g,"").replace(/\s*/g,"").replace(/ /g,"");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue