소스 검색

U邮件发送

541469799@qq.com 1 년 전
부모
커밋
efaa7d6ea2
2개의 변경된 파일9개의 추가작업 그리고 8개의 파일을 삭제
  1. 8 8
      app/index/controller/User.php
  2. 1 0
      app/index/view/passport/logIn.html

+ 8 - 8
app/index/controller/User.php

@@ -24,13 +24,13 @@ class User extends Controller
 {
     /**
      * 个人中心
-     * @return \think\response\View
+     * @return \think\response\Redirect | \think\response\view
      */
     public function personal()
     {
         $userId = Session::get('user_id');
         if (empty($userId)) {
-            return view('passport/logIn');
+            return redirect('/index/passport/login.html');
         }
         $goodsModel = new GoodsModel();
         //$goods['content'] = html_entity_decode($goods['content']);
@@ -39,14 +39,14 @@ class User extends Controller
 
     /**
      * 我的订单页面
-     * @return \think\response\View
+     * @return \think\response\Redirect | \think\response\view
      */
     public function order(string $orderType = 'received')
     {
         $userId = Session::get('user_id');
         if (empty($userId)) {
             Cache::set('returnuri', '/index/user/order.html', 300);
-            return view('passport/logIn');
+            return redirect('/index/passport/login.html');
         }
         return view('order');
     }
@@ -54,7 +54,7 @@ class User extends Controller
     /**
      * 订单详情
      * @param $orderId
-     * @return \think\response\View
+     * @return \think\response\Redirect | \think\response\view
      * @throws \cores\exception\BaseException
      * @throws \think\db\exception\DataNotFoundException
      * @throws \think\db\exception\DbException
@@ -66,7 +66,7 @@ class User extends Controller
         $userId = Session::get('user_id');
         if (empty($userId)) {
             Session::set('returnuri', '/index/user/orderDetails.html?orderId=' . $orderId);
-            return view('passport/logIn');
+            return redirect('/index/passport/login.html');
         }
         $model = OrderModel::getUserOrderDetail($orderId);
         $orderAddress = OrderAddress::get(['order_id' => $orderId]);
@@ -105,13 +105,13 @@ class User extends Controller
 
     /**
      * 我的积分页面
-     * @return \think\response\View
+     * @return \think\response\Redirect | \think\response\view
      */
     public function myScores()
     {
         $userId = Session::get('user_id');
         if (empty($userId)) {
-            return view('passport/logIn');
+            return redirect('/index/passport/login.html');
         }
         $model = new PointsLogModel;
         $list = $model->getList();

+ 1 - 0
app/index/view/passport/logIn.html

@@ -258,6 +258,7 @@
                     //return false;
                     //注册成功后进入
                     if (obj.status === 200 || obj.status === '200') {
+                        showToast('Code has been sent!Please check your new mails.')
                         const parentElement = $(this).parent();
                         //parentElement.hide(0)
                         //parentElement.siblings().hide(0)