diff --git a/app/friendship/controller/FriendController.php b/app/friendship/controller/FriendController.php
index 14ae592..4e9642a 100644
--- a/app/friendship/controller/FriendController.php
+++ b/app/friendship/controller/FriendController.php
@@ -170,18 +170,55 @@ class FriendController extends HomeBaseController
     }
 
     //密码管理验证码页面
-    public function passwordManager() {
+    public function passwordManager()
+    {
         return $this->fetch(':password_manager');
     }
 
     //输入密码
-    public function enterPassword() {
+    public function enterPassword()
+    {
         return $this->fetch(':enter_password');
     }
 
     //确认密码
-    public function surePassword() {
+    public function surePassword()
+    {
         return $this->fetch(':sure_password');
     }
 
+    public function pwd()
+    {
+        $request = request();
+        if ($request->isAjax()) {
+            $integral_pwd = $request->param('integral_pwd');
+            $step = $request->param('step');
+            if ($step == 'enter') {
+                session('user.pwd', $integral_pwd);
+                if (session('user.pwd')) {
+                    $this->success('', url('friendship/Friend/surePassword'), true);
+                }
+            } elseif ($step == 'sure') {
+                if ($integral_pwd == session('user.pwd')) {
+                    $data = [
+                        'id' => session('user.id'),
+                        'integral_pwd' => md5($integral_pwd)
+                    ];
+                    if (Db::name('user')->update($data)) {
+                        session('user.pwd', null);
+                        $this->success('修改成功', url('user/center/myBalance'), true);
+                    }else {
+                        session('user.pwd', null);
+                        $this->success('您未作出任何修改', url('user/center/myBalance'), true);
+                    }
+                } else {
+                    $this->success('密码不一致', '', false);
+                }
+            } else {
+                $this->success('未知错误', '', false);
+            }
+
+        }
+    }
+
 }
\ No newline at end of file