diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 1c14aece0..01dd135be 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -1,5 +1,5 @@ class WechatsController < ActionController::Base - layout 'wechat/layout' + layout 'base_wechat' wechat_responder @@ -179,9 +179,9 @@ class WechatsController < ActionController::Base uw = UserWechat.find_by_id(params[:state]) uw.user_id = user.id uw.save! - render :text => {status:0, msg: "绑定成功"} + render :text => {status:0, msg: "绑定成功"}.to_json rescue Exception=>e - render :text => {status: -1, msg: e.message} + render :text => {status: -1, msg: e.message}.to_json end end diff --git a/app/views/wechats/layout.html.erb b/app/views/layouts/base_wechat.html.erb similarity index 96% rename from app/views/wechats/layout.html.erb rename to app/views/layouts/base_wechat.html.erb index 8f93ac9a1..729f762ac 100644 --- a/app/views/wechats/layout.html.erb +++ b/app/views/layouts/base_wechat.html.erb @@ -7,6 +7,7 @@