Browse Source

修复cookiebug

songdb 6 years ago
parent
commit
673d3f32e9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/Http/Controllers/Wap/Book/ChapterController.php

+ 3 - 1
app/Http/Controllers/Wap/Book/ChapterController.php

@@ -301,6 +301,8 @@ class ChapterController extends BaseController
         $inter_not_need_sub = $request->has('inter_not_need_sub') ? true : false;
 
         $ad_status = $request->get('ad_status');
+        $has_force_show_qrcode_cookie = Cookie::get('force_show_qrcode');
+        Cookie::queue('force_show_qrcode', 1, -1);
 
         if (!$this->checkUid()) {
             return response()->error('WAP_NOT_LOGIN');
@@ -352,7 +354,7 @@ class ChapterController extends BaseController
             'cid' => $cid, 'chapter_name' => $chapter->name]);
 
         //判断当前是否有强制显示服务号信息的cookie、已经关注 跳转到服务号信息引导页
-        if(Cookie::get('force_show_qrcode') && $is_had_subscribe)
+        if($has_force_show_qrcode_cookie && $is_had_subscribe)
         {
             $force_read_url = '/subscribe/getFromUser';//服务号信息引导页
             $force_read_data = ['src' => $force_read_url];