| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 | <?phpnamespace App\Http\Controllers\V1;use App\Auth;use App\libs\google\Google;use App\libs\google\GoogleOauth;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);    }}
 |