界面优化

This commit is contained in:
guange 2016-01-19 15:06:40 +08:00
parent 349f511c12
commit babf30af0a
3 changed files with 31 additions and 3 deletions

View File

@ -142,8 +142,9 @@ class WechatsController < ActionController::Base
raise "用户名或密码错误,请重新登录" unless user
#补全用户信息
user.user_wechat = UserWechat.find_by_id(params[:openid])
user.save!
uw = UserWechat.find_by_id(params[:openid])
uw.user = user
uw.save!
rescue Exception=>e
@wechat_bind_errors = e.message
render :login

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>Ruby China</title>
<meta charset='utf-8' />
<meta name="apple-mobile-web-app-capable" content="no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
</head>
<body>
<p>恭喜! 绑定成功.</p>
</body>
</html>

View File

@ -1,3 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>Ruby China</title>
<meta charset='utf-8' />
<meta name="apple-mobile-web-app-capable" content="no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
</head>
<body>
<div class="loginIn">
<div>
<p class="wechat-error">
@ -30,3 +40,6 @@
<% end %>
</div>
</body>
</html>