Ver código fonte

Merge branch 'stabble' into yunqi

zz 6 anos atrás
pai
commit
aab9dc1413

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

@@ -1028,7 +1028,7 @@ class ChapterController extends BaseController
             //Log::info($price_rate);
             $fee = ceil($chapter->size * $price_rate);
             if($this->isRaisePrice()){
-                $fee = round($chapter->size * 0.0165);
+                $fee = round($chapter->size * 0.018);
             }
         }
         //首个计费章节书币价格以35书币为基准,低于35提升至35,原价高于35书币,维持原价

+ 35 - 0
app/Http/Controllers/Wap/Subscribe/SubscribeController.php

@@ -105,6 +105,32 @@ class SubscribeController extends BaseController
         return false;
     }
 
+    //只获取用户的强关二维码
+    protected function getSimpleRcodeInfo($appid)
+    {
+        $param_need = [
+            'gzh_app_id' => $appid,
+            'scene_id' => $this->uid,
+            'timestamp' => time(),
+        ];
+        $param_need['sign'] = $this->getSign($param_need);
+        $client = new Client(['timeout' => 3.0,]);
+        try {
+            $qrcode_url_res = $client->request('get', 'https://zsyauth.aizhuishu.com/api/get_qrcode_url?' . http_build_query($param_need))->getBody()->getContents();
+            if ($qrcode_url_res) {
+                $qrcode_url = json_decode($qrcode_url_res, true);
+                if ($qrcode_url['code'] == 1) {
+                    if (isset($qrcode_url['data']) && !empty($qrcode_url['data'])) {
+                        return $qrcode_url['data'];
+                    }
+                }
+            }
+        } catch (\Exception $e) {
+
+        }
+        return false;
+    }
+
     //获取用户的强关信息
     function getFromUser()
     {
@@ -125,6 +151,14 @@ class SubscribeController extends BaseController
             }
             $title = $official_account->nickname;
             $img = 'https://open.weixin.qq.com/qr/code?username='.$official_account->name;
+            if(isset($_GET['d']))
+            {
+                $qrcode_url = $this->getSimpleRcodeInfo($appid);dump($qrcode_url);
+            }
+            if($qrcode_url = $this->getSimpleRcodeInfo($appid))//用服务号强关二维码
+            {
+                $img = $qrcode_url;
+            }
         }else{
             return redirect()->to('/recent');
         }
@@ -139,4 +173,5 @@ class SubscribeController extends BaseController
 
         return view('wap.userSubInfo',compact('head_img','img','title'));
     }
+
 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 28 - 4
resources/views/wap/index.blade.php