修改用户帐号显示,

This commit is contained in:
yuanke 2016-08-14 15:25:46 +08:00
parent f9ee56111f
commit 7e40c2447f
2 changed files with 7 additions and 7 deletions

View File

@ -47,7 +47,7 @@ module Mobile
end
ws = WechatService.new
ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台。", user.login+"("+user.show_name+")", Time.now.strftime("%Y-%m-%d"))
ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台。", user.show_name+"("+user.login+")", Time.now.strftime("%Y-%m-%d"))
present status: 0, message: '您已成功绑定Trustie平台'
end
@ -89,7 +89,7 @@ module Mobile
end
ws = WechatService.new
ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台。", user.login+"("+user.show_name+")", Time.now.strftime("%Y-%m-%d"))
ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台。", user.show_name+"("+user.login+")", Time.now.strftime("%Y-%m-%d"))
present :data, user, with: Mobile::Entities::User
present :status, 0
end

View File

@ -386,7 +386,7 @@ class WechatsController < ActionController::Base
user: user
)
ws = WechatService.new
ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台", user.login+"("+user.show_name+")", format_time(Time.now))
ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台", user.show_name+"("+user.login+")", format_time(Time.now))
render :json => {status:0, msg: "绑定成功"}
rescue Exception=>e
render :json => {status: -1, msg: e.message}
@ -416,9 +416,9 @@ class WechatsController < ActionController::Base
render 'wechats/open_wechat', layout: nil and return
end
# unless user_binded?(open_id)
# @path = '/login'
# else
unless user_binded?(open_id) && params[:state] != "invite_code" && params[:state] != "project_invite_code" && params[:state] != "blog_comment" && params[:state] != "course_notice" && params[:state] != "project_discussion" && params[:state] != "course_discussion" && params[:state] != "homework" && params[:state] != "issues" && params[:state] != "journal_for_message"
@path = '/login'
else
if params[:state] == 'myclass'
@course_id = params[:id];
elsif params[:state] == 'myproject'
@ -436,7 +436,7 @@ class WechatsController < ActionController::Base
end
# redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
end
# end
end
render 'wechats/user_activities', layout: nil
end