diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b7fa15a..2daa33f 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -69,9 +69,11 @@ class UsersController < ApplicationController end redirect_to login_path end - end + def changeprofile + render html: "等待完成" + end private @@ -84,7 +86,7 @@ class UsersController < ApplicationController verify_code = rand(999999).to_s result = UserMailer.send_verify_code(user.email, verify_code).deliver_now p result - user.update_attribute(:verify_code,verify_code) + user.update_attribute(:verify_code, verify_code) end def check_change_params(email, verify_code, password, password_confirmation) diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 23a14d4..4df86d6 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -6,29 +6,30 @@ <%= render 'layouts/nav' %> -
-
-
-
- 个人设置 + <%= form_tag("/changeprofile", method: "post", class: "form-horizontal", id: "profile") do %> + +
+
+
+ 个人设置 +
-
-
-
-
- 用户图像 -
-
-
-
- - -
-
-
-
+
+
+
+ 用户图像 +
+
+
+
+ + +
+
+
+
选择照片 @@ -37,72 +38,74 @@ class="fileupload-exists"> 重新选择 - + - 清除照片 - + 清除照片 + +
-
-
-
-
- 基本信息 -
-
-
- -
- -
+
+
+
+ 基本信息
- -
- -
- +
+
+ +
+ +
-
- -
- -
- +
+ +
+ +
-
-
- -
- + +
+ +
+ +
-
-
-
- - +
+ +
+ +
-
+
+
+ + +
+
+ +
-
+ <% end %> -
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 374c6e7..258daae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,6 +11,7 @@ Rails.application.routes.draw do get '/forgetpasswd', to: 'users#forgetpasswd' get '/changepasswd', to: 'users#changepasswd' post '/changepasswd', to: 'users#changepasswd' + post '/changeprofile', to: 'users#changeprofile' get '/main', to: 'main#show' get '/activity', to: 'main#activity'