zz 6 years ago
parent
commit
b310555084
1 changed files with 9 additions and 0 deletions
  1. 9 0
      app/Http/Controllers/Wap/Web/WelcomeController.php

+ 9 - 0
app/Http/Controllers/Wap/Web/WelcomeController.php

@@ -376,6 +376,15 @@ class WelcomeController extends BaseController
         $title = "追书云";
         $title = "追书云";
         $get_force_subscribe_name = false;
         $get_force_subscribe_name = false;
         $subscribe = $request->cookie('force_subscribe_name');
         $subscribe = $request->cookie('force_subscribe_name');
+        $appid = $request->get('appid');
+        //用户进来携带的公众号信息
+        if($appid){
+            $force_subscribe_official = DB::table('official_accounts')->where('appid',$appid)->select('nickname')->first();
+            if ($force_subscribe_official) {
+                $title = $force_subscribe_official->nickname;
+                if($title) return $title;
+            }
+        }
         if ($subscribe) return $subscribe;
         if ($subscribe) return $subscribe;
         //强关公众号名称
         //强关公众号名称
         $force_subscribe = ForceSubscribeService::forceSubscribeUsersByUid(['uid' => $this->uid]);
         $force_subscribe = ForceSubscribeService::forceSubscribeUsersByUid(['uid' => $this->uid]);