123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace App\Http\Controllers\V1;
- use App\Auth;
- use App\libs\google\Google;
- use App\libs\helpers\Curl;
- use App\libs\helpers\LogHelper;
- use App\libs\wechat\auth\WeChat;
- use App\Models\Help;
- use App\Models\Region;
- use Illuminate\Http\Request;
- use App\Models\Setting;
- use Illuminate\Support\Facades\Redis;
- use App\libs\helpers\Response;
- class IndexController extends Controller
- {
- private $code = '_Index';
- /**
- * 首页
- *
- * @return \Illuminate\Http\JsonResponse
- */
- public function index(){
- try {
- $google = Google::GoogleOauth()->appAuth();
- // $weChat = WeChat::General();
- // $userInfo = $weChat->auth('snsapi_userinfo');
- // $userInfo = $weChat->userDetailInfo($userInfo['openid']);
- var_dump($google);
- return Response::success();
- }catch (\Exception $exception){
- LogHelper::exceptionLog($exception,$this->code);
- return Response::fail($exception->getMessage());
- }
- }
- //隐私政策
- public function privacyPolice()
- {
- $info = Setting::where('key', 'privacy')->where('is_delete', 0)->select('title', 'key', 'value')->first();
- return $this->success($info);
- }
- //用户协议
- public function userAgreement()
- {
- $info = Setting::where('key', 'agreement')->where('is_delete', 0)->select('title', 'key', 'value')->first();
- return $this->success($info);
- }
- //关于我们
- public function aboutus()
- {
- $info = Setting::where('key', 'aboutus')->where('is_delete', 0)->select('title', 'key', 'value')->first();
- return $this->success($info);
- }
- }
|