541469799@qq.com 1 рік тому
батько
коміт
d85922c895
2 змінених файлів з 13 додано та 2 видалено
  1. 3 2
      app/index/controller/Passport.php
  2. 10 0
      app/index/view/base.html

+ 3 - 2
app/index/controller/Passport.php

@@ -67,12 +67,13 @@ class Passport extends Controller
 
     /**
      * 退出登录
-     * @return \think\response\View
+     * @return \think\response\Redirect
      */
     public function logout()
     {
         Session::clear();
-        return view('logIn');
+        return redirect('/index/passport/login');
+        //return view('logIn');
     }
 
 

+ 10 - 0
app/index/view/base.html

@@ -80,6 +80,11 @@
                             <h2 class="menuItemTitle">Return & Warranty</h2>
                         </a>
                     </div>
+                    <div class="pcMenuItem">
+                        <a href="/index/passport/logOut.html">
+                            <h2 class="menuItemTitle">Log Out</h2>
+                        </a>
+                    </div>
                 </section>
             </div>
             <!-- 购物车 -->
@@ -173,6 +178,11 @@
                     <h2 class="menuItemTitle userIcon">Return & Warranty</h2>
                 </a>
             </div>
+            <div class="mobileMenuItem">
+                <a href="/index/passport/logOut.html">
+                    <h2 class="menuItemTitle userIcon">Log Out</h2>
+                </a>
+            </div>
         </section>
     </div>
 </header>