浏览代码

force send order id

zz 6 年之前
父节点
当前提交
9d7286f193
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      app/Http/Middleware/ReadOauth.php

+ 6 - 6
app/Http/Middleware/ReadOauth.php

@@ -63,9 +63,9 @@ class ReadOauth
                 return response($this->notAccessPage())->header('Content-Type', 'text/html');
             }
         }
+        $uri = $request->input('_url');
         if (!$uid_cookie && $test == 0) {
             //$url = str_replace('http://','https://',url()->current())."?".http_build_query($params);
-            $uri = $request->input('_url');
 
             if (strpos($uri, '/yun/') !== false) {
                 $uri_send_order_id = (int)str_ireplace('/yun/', '', $uri);
@@ -102,6 +102,11 @@ class ReadOauth
             return redirect()->to($redirect);
         }
 
+        if (strpos($uri, '/yun/') !== false) {
+            $uri_send_order_id = (int)str_ireplace('/yun/', '', $uri);
+            Redis::hset('book_read:' . $uid_cookie, 'send_order_id', $uri_send_order_id);
+        }
+
         //禁止明文访问
         if ($this->isForbidPrimaryNumberChannleID($origin_distribution_channel_id, $uid_cookie)) {
             return response('<html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><title>该网站地址暂停访问</title></head><body style="padding:0;margin:0;font-size:0"><div style="width:300px;height:100px;margin: 20px auto"><p style="font-size:20px;color:red;text-align:center">该网站地址暂停访问,请联系客服微信获取新地址:wuxinchao12</p></body></html>');
@@ -373,11 +378,6 @@ class ReadOauth
         return true;
     }
 
-    private function forceSubscribeSendOrderId($uid,$appid,$send_order_id){
-        try{
-            Redis::hset('force_subscribe_from_send_order_id', $appid . '_' . $uid, $send_order_id);
-        }catch (\Exception $e){}
-    }
     private function getYqChannleIdByAppid($appid)
     {
         $client = new Client(['timeout' => 3.0]);