xthk / offline-user
a
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 4 536
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- ext-json: *
- ucenter/test: ^0.3.0
README
a ucenter for offline sdk.
Installing
$ composer require ucenter/offline-user -vvv
Usage
TODO
- 追加配置文件 config/ucenter.php
<?php
return [
'config' => [
'domain' => env('USER_CENTER_HOST', ''), //请求的域名
'app_id' => env('UC_APP_ID', ''), //应用ID
'app_secret' => env('UC_APP_SECRET', ''), //应用秘钥
'source' => env('UC_SOURCE', ''), //来源
'app_name' => env('APP_NAME_USER_CENTER', '') //应用名称
],
'params' => [
'mobile' => 'phone',
'password' => 'password',
'password_confirmation' => 'password_confirmation',
'original_password' => 'original_password',
'sms_code' => 'sms_code',
'sms_type' => 'sms_type',
'register_ip' => 'register_ip',
'login_ip' => 'login_ip',
'push_id' => 'push_id',
'push_type' => 'push_type',
'open_id' => 'open_id',
'wechat_type' => 'wechat_type',
'status' => 'status',
'city_id' => 'city_id',
'real_name' => 'name',
'gender' => 'gender',
'birthday' => 'birthday',
'emergency_mobile' => 'emergency_phone',
'user_id' => 'uc_user_id',
'student_id' => 'uc_student_id'
],
'model' => [
'CityModel' => \App\Models\Base\CityModel::class,
'UserCenterLogModel' => \App\Models\Mongodb\UserCenterLogsModel::class,
'StudentModel' => \App\Models\Student\StudentModel::class,
],
//todo 暂时未使用异步方式
'nsq' => [
'topic' => '',
'student_update' => '',
]
];
- 同步调用
注入OfflineUser类,调用里面对应的方法
- 异步调用
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT