xthk /offline-user
a
0.03
2020-05-07 07:07 UTC
Requires
- ext-json: *
- ucenter/test: ^0.3.0
README
离线SDK的ucenter。
安装
$ composer require ucenter/offline-user -vvv
用法
待办事项
- 追加配置文件 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类,调用里面对应的方法
- 异步调用
贡献
你可以通过以下三种方式之一进行贡献
代码贡献过程并不非常正式。你只需确保遵循PSR-0、PSR-1和PSR-2编码指南。任何新的代码贡献都必须附带适用的单元测试。
许可证
MIT