修改用户帐号显示,
This commit is contained in:
parent
f9ee56111f
commit
7e40c2447f
|
@ -47,7 +47,7 @@ module Mobile
|
||||||
end
|
end
|
||||||
|
|
||||||
ws = WechatService.new
|
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平台'
|
present status: 0, message: '您已成功绑定Trustie平台'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ module Mobile
|
||||||
end
|
end
|
||||||
|
|
||||||
ws = WechatService.new
|
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 :data, user, with: Mobile::Entities::User
|
||||||
present :status, 0
|
present :status, 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -386,7 +386,7 @@ class WechatsController < ActionController::Base
|
||||||
user: user
|
user: user
|
||||||
)
|
)
|
||||||
ws = WechatService.new
|
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: "绑定成功"}
|
render :json => {status:0, msg: "绑定成功"}
|
||||||
rescue Exception=>e
|
rescue Exception=>e
|
||||||
render :json => {status: -1, msg: e.message}
|
render :json => {status: -1, msg: e.message}
|
||||||
|
@ -416,9 +416,9 @@ class WechatsController < ActionController::Base
|
||||||
render 'wechats/open_wechat', layout: nil and return
|
render 'wechats/open_wechat', layout: nil and return
|
||||||
end
|
end
|
||||||
|
|
||||||
# unless user_binded?(open_id)
|
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'
|
@path = '/login'
|
||||||
# else
|
else
|
||||||
if params[:state] == 'myclass'
|
if params[:state] == 'myclass'
|
||||||
@course_id = params[:id];
|
@course_id = params[:id];
|
||||||
elsif params[:state] == 'myproject'
|
elsif params[:state] == 'myproject'
|
||||||
|
@ -436,7 +436,7 @@ class WechatsController < ActionController::Base
|
||||||
end
|
end
|
||||||
# redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
|
# redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
|
||||||
end
|
end
|
||||||
# end
|
end
|
||||||
render 'wechats/user_activities', layout: nil
|
render 'wechats/user_activities', layout: nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue