zz пре 5 година
родитељ
комит
d9a0051e1d

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

@@ -1053,7 +1053,7 @@ class ChapterController extends BaseController
         if ($this->is_had_subscribe && in_array($this->distribution_channel_id, [2, 14, 211,4025,4147,691,123]) && $this->user) {//,4147,691,123,4025
             $this->chapter->is_show_share_button = 1;
         }
-        if($this->distribution_channel_id == 6985 && $this->domain == 'leyuee'){
+        /*if($this->distribution_channel_id == 6985 && $this->domain == 'leyuee'){
             $appid = 'wx126331d1732978b0';
             $appSecret = '76231c41c24d4363243866f5f9dee55f';
             $config = new ChapterShareWechatConfigService($appid,$appSecret);
@@ -1066,10 +1066,10 @@ class ChapterController extends BaseController
                 $this->en_bid,
                 $this->cid
             );
-            $url = url()->full();
-            $url = str_replace('http://','https://',$url);
+            //$url = url()->full();
+            //$url = str_replace('http://','https://',$url);
             $this->chapter->share_config = $config->getJssdkConfig($url);
-        }
+        }*/
     }
 
     /**

+ 3 - 3
app/Http/Controllers/Wap/Other/WeixinController.php

@@ -12,15 +12,15 @@ class WeixinController extends Controller
 
     public function jsSdkConfig(Request $request,$channel_id,$doamin)
     {
-        $base_url =   env('PROTOCOL').'://site'.$channel_id.'.'.$doamin.'.com/';
-        $path = $request->get('path');
+        //$base_url =   env('PROTOCOL').'://site'.$channel_id.'.'.$doamin.'.com/';
+        $url = $request->post('url');
         $appid = 'wx126331d1732978b0';
         $appSecret = '76231c41c24d4363243866f5f9dee55f';
         $config = new ChapterShareWechatConfigService($appid,$appSecret);
         //$config->setAccessToken('');
         $config->requestAccessToken();
         $config->requestJsApiTicket();
-        $url = $base_url.$path;
+        //$url = $base_url.$path;
         $data = $config->getJssdkConfig($url);
         return response()->success($data);
     }

+ 1 - 1
app/Http/Routes/Wap/WapRoutes.php

@@ -229,7 +229,7 @@ Route::group(['domain'=>env('WAP_DOMAIN'),'namespace'=>'App\Http\Controllers\Wap
 
         Route::post('activity/huaweiLottery','Web\ActivityController@huaweiLottery');
 
-        Route::get('weixin/jsSdkConfig','Other\WeixinController@jsSdkConfig');
+        Route::post('weixin/jsSdkConfig','Other\WeixinController@jsSdkConfig');
 
     });