🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
| 标题 | 名称 | 钩子描述 | | --- | --- | --- | | 会员添加 | member_add | 当添加会员时 | | 会员编辑 | member_edit | 当编辑会员时 | | 会员删除 | member_del | 当删除会员时 | | 会员登录 | member_login | 当会员登录 | >添加会员,编辑,删除,登录回到函数统一 ``` function functionName($userId) ``` >userId:会员id,开发者可通过$userInfo=getUserInfo($userId)获取会员信息,$userInfo变量参数说明 >[danger] 注意会员删除(member_del)的钩子无法获取会员信息,因为当调用删除钩子的时候,会员已经删除 | 变量名 | 描述 | | --- | --- | | id | 会员id | | username | 会员名 | | group_id | 会员组id,会员级别最大的会员组id | | status | 会员状态 1:正常 ,0:锁定 | | auth | 会员权限 | | mobile | 会员手机号 | | email | 会员邮箱 | | addtime | 会员注册时间 | | logintime | 会员最后登录时间 | | headpath | 会员头像地址| | nickname | 会员昵称 | | istest | 会员是否为测试号 | | birthday | 会员生日 | | Loginip | 会员最后登录IP | | recommendid | 会员推荐id | | login_type | 会员注册类型 WX:微信注册, Alipay:支付宝注册 | | info | 会员详细信息,如openid等 | | groupInfo| 会员所在的会员组的信息,按照会员级别降序排列,一个会员可能有多个会员组 | | group_id_s| 多个会员组的id | >login_type为空的示例数据 ``` array(22) { ["id"] => int(22) ["username"] => string(11) "wx_qkxv89xT" ["password"] => string(32) "da7ebbc62eee7238ac860140030ba24a" ["pass_prefix"] => string(6) "E1wb8e" ["group_id"] => int(4) ["status"] => int(0) ["auth"] => NULL ["isdel"] => int(0) ["mobile"] => string(0) "" ["email"] => string(0) "" ["addtime"] => int(1565257981) ["logintime"] => int(1565257981) ["headpath"] => string(122) "http://thirdwx.qlogo.cn/mmopen/ajNVdqHZLLCetqDChWKAC0mRPpjBzUGrjOVF0VPfJWgzfUdcv6dAqwt2ic0krhJz1pfkfyjrTcevZCzFeXRgyeQ/132" ["nickname"] => string(20) "小程序13293813023" ["birthday"] => int(-28800) ["Loginip"] => NULL ["recommendid"] => int(14) ["login_type"] => string(2) "WX" ["groupInfo"] => array(3) { [0] => array(11) { ["id"] => int(4) ["groupname"] => string(11) "SVIP2会员" ["status"] => int(1) ["auth"] => NULL ["isreg"] => int(1) ["isdel"] => int(0) ["level"] => int(3) ["maxnum"] => int(0) ["price"] => string(30) "{"day_1":"0.1","month_1":"30"}" ["point_type"] => string(5) "money" ["group_text"] => string(74) "<img src="/Upload/admin/1/5d560ffa9c56f.png" alt="undefined">saggbva&nbsp;" } [1] => array(11) { ["id"] => int(1) ["groupname"] => string(12) "普通会员" ["status"] => int(1) ["auth"] => NULL ["isreg"] => int(1) ["isdel"] => int(0) ["level"] => int(0) ["maxnum"] => int(0) ["price"] => string(2) "[]" ["point_type"] => string(5) "money" ["group_text"] => string(0) "" } } ["group_id_s"] => array(3) { [0] => int(4) [1] => int(1) } } ``` >login_type 为WX Alipay的示例数据 ``` array(22) { ["id"] => int(22) ["username"] => string(11) "wx_qkxv89xT" ["password"] => string(32) "da7ebbc62eee7238ac860140030ba24a" ["pass_prefix"] => string(6) "E1wb8e" ["group_id"] => int(4) ["status"] => int(0) ["auth"] => NULL ["isdel"] => int(0) ["mobile"] => string(0) "" ["email"] => string(0) "" ["addtime"] => int(1565257981) ["logintime"] => int(1565257981) ["headpath"] => string(122) "http://thirdwx.qlogo.cn/mmopen/ajNVdqHZLLCetqDChWKAC0mRPpjBzUGrjOVF0VPfJWgzfUdcv6dAqwt2ic0krhJz1pfkfyjrTcevZCzFeXRgyeQ/132" ["nickname"] => string(20) "小程序13293813023" ["istest"] => int(0) ["birthday"] => int(-28800) ["Loginip"] => NULL ["recommendid"] => int(14) ["login_type"] => string(2) "WX" ["info"] => array(10) { ["id"] => int(24) ["userid"] => int(22) ["nickname"] => string(20) "小程序13293813023" ["openid"] => string(28) "owMXksuIhiW2-DnvIkSRFRGNAu1w" ["unionid"] => string(0) "" ["sex"] => int(1) ["country"] => string(6) "中国" ["province"] => string(6) "山西" ["city"] => string(6) "太原" ["headimgurl"] => string(122) "http://thirdwx.qlogo.cn/mmopen/ajNVdqHZLLCetqDChWKAC0mRPpjBzUGrjOVF0VPfJWgzfUdcv6dAqwt2ic0krhJz1pfkfyjrTcevZCzFeXRgyeQ/132" } ["groupInfo"] => array(3) { [0] => array(11) { ["id"] => int(4) ["groupname"] => string(11) "SVIP2会员" ["status"] => int(1) ["auth"] => NULL ["isreg"] => int(1) ["isdel"] => int(0) ["level"] => int(3) ["maxnum"] => int(0) ["price"] => string(30) "{"day_1":"0.1","month_1":"30"}" ["point_type"] => string(5) "money" ["group_text"] => string(74) "<img src="/Upload/admin/1/5d560ffa9c56f.png" alt="undefined">saggbva&nbsp;" } [1] => array(11) { ["id"] => int(1) ["groupname"] => string(12) "普通会员" ["status"] => int(1) ["auth"] => NULL ["isreg"] => int(1) ["isdel"] => int(0) ["level"] => int(0) ["maxnum"] => int(0) ["price"] => string(2) "[]" ["point_type"] => string(5) "money" ["group_text"] => string(0) "" } } ["group_id_s"] => array(3) { [0] => int(4) [1] => int(1) } } ```