Przeglądaj źródła

分享积分fix

541469799@qq.com 1 rok temu
rodzic
commit
449a9f1694

+ 2 - 2
app/index/controller/Cart.php

@@ -36,7 +36,7 @@ class Cart extends Controller
     {
         $userId = Session::get('user_id');
         if (empty($userId)) {
-            Cache::set('returnuri', '/index/cart/shoppingCart.html', 300);
+            Session::set('returnuri', '/index/cart/shoppingCart.html');
             return redirect('/index/passport/login.html');
             //return view('passport/logIn');
         }
@@ -143,7 +143,7 @@ class Cart extends Controller
         $key = $this->request->param('key', '');
         $userId = Session::get('user_id');
         if (empty($userId)) {
-            Cache::set('returnuri', '/index/index/productDetails.html?goodsId=' . $goodsId . '&key=' . $key, 300);
+            Session::set('returnuri', '/index/index/productDetails.html?goodsId=' . $goodsId . '&key=' . $key, 300);
             return $this->renderJson(config('status.not_logged'), 'Log in please!');
         }
         if (!empty($key)) {

+ 1 - 1
app/index/controller/Passport.php

@@ -49,7 +49,7 @@ class Passport extends Controller
         Session::set('access_token', $token);
         Session::set('user_id', $userInfo['user_id']);
 
-       $returnUri = Cache::pull('returnuri');
+       $returnUri = Session::pull('returnuri');
         return $this->renderSuccess([
             'userId' => (int)$userInfo['user_id'],
             'token' => $LoginService->getToken((int)$userInfo['user_id']),

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

@@ -65,7 +65,7 @@ class User extends Controller
         $orderId = intval($orderId);
         $userId = Session::get('user_id');
         if (empty($userId)) {
-            Cache::set('returnuri', '/index/user/orderDetails.html?orderId=' . $orderId, 300);
+            Session::set('returnuri', '/index/user/orderDetails.html?orderId=' . $orderId);
             return view('passport/logIn');
         }
         $model = OrderModel::getUserOrderDetail($orderId);