golive_jxw / governmentaffair
浙里办政务服务
v3.0.0
2022-08-26 06:39 UTC
Requires
- php: >=7.2
- guzzlehttp/guzzle: >=6.0
- laravel/framework: >=5.4
README
for Laravel
Installation
composer require golive_jxw/governmentaffair -vvv
Configuration
The defaults configuration settings are set in config/governmentaffair.php. Copy this file to your own config directory to modify the values. You can publish the config using this command:
php artisan vendor:publish --provider="Government\Affair\ServiceProvider"
Usage
SingleSignOn
use Government\Affair\Classes\User; //alipay-支付宝入口 //ZhejiangOffice-同源APP入口(含浙里办APP及其他同源适配APP容器环境) $user = new User(); $user->auth($goto,'ZhejiangOffice');
TicketAuthentication
//alipay-支付宝入口 //ZhejiangOffice-同源APP入口(含浙里办APP及其他同源适配APP容器环境) use Government\Affair\Classes\User; $user = new User(); $user->ticket($ticket); //wechat-微信小程序入口 use Government\Affair\Classes\Wechat; $user = new Wechat(); $user->ticket($ticket);
UserInfo
//alipay-支付宝入口 //ZhejiangOffice-同源APP入口(含浙里办APP及其他同源适配APP容器环境) use Government\Affair\Classes\User; $user = new User(); $user->info($token); //wechat-微信小程序入口 use Government\Affair\Classes\Wechat; $user = new Wechat(); $user->info($token);
License
MIT