readme.text 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. 1.params.php 配置
  2. //开放登录接口配置
  3. 'openAuth'=>array(
  4. 'wbAkey'=>'1269090619',
  5. 'wbSkey'=>'2eaf3d5abc07fc86a21267d169b3f9d3',
  6. 'qqAkey'=>'101202502',
  7. 'qqSkey'=>'f9cda49e67331e03ccd2453c63e57733',
  8. 'qqcallbackUrl'=>'',
  9. 'wbcallbackUrl'=>'',
  10. ),
  11. 2.components.php 配置
  12. //第三方登录
  13. 'openauth' => array(
  14. 'class' => 'application.extensions.OpenAuth.OpenAuth',
  15. ),
  16. 3.main.php 配置
  17. 'import'=>array(
  18. ...
  19. 'ext.OpenAuth.OpenAuth',
  20. ...
  21. ),
  22. 4.将 OpenAuthController.php(控制器示例代码) 放置在正确位置,并配置正确的回调地址
  23. 5.绑定记录表
  24. CREATE TABLE `wz_user_open_auth` (
  25. `id` int(10) unsigned NOT NULL auto_increment COMMENT 'ID',
  26. `user_id` int(10) unsigned NOT NULL COMMENT '本地用户ID',
  27. `app` char(15) NOT NULL COMMENT '第三方应用',
  28. `app_uid` varchar(50) NOT NULL COMMENT '第三方应用的标识符',
  29. `user_info` text COMMENT '第三方应用公布的信息',
  30. `bind_time` int(10) unsigned NOT NULL COMMENT '绑定时间',
  31. PRIMARY KEY (`id`)
  32. ) ENGINE=MyISAM DEFAULT CHARSET=utf8
  33. 6.用户表
  34. CREATE TABLE `wz_user` (
  35. `user_id` int(10) unsigned NOT NULL auto_increment COMMENT 'ID',
  36. `user_name` varchar(50) NOT NULL COMMENT '用户名',
  37. `user_pwd` varchar(32) NOT NULL default '' COMMENT '密码',
  38. `group_id` tinyint(3) unsigned NOT NULL default '1' COMMENT '用户组ID',
  39. `encrypt` varchar(20) NOT NULL default '' COMMENT '加密因子',
  40. `email` varchar(40) NOT NULL default '' COMMENT '电子邮箱',
  41. `mobile` char(11) NOT NULL default '' COMMENT '手机号码',
  42. `nick_name` varchar(20) NOT NULL default '' COMMENT '昵称',
  43. `register_ip` int(10) NOT NULL default '0' COMMENT '注册IP',
  44. `last_login_ip` int(10) NOT NULL default '0' COMMENT '最后登录IP',
  45. `register_time` int(10) unsigned NOT NULL default '0' COMMENT '注册时间',
  46. `last_login_time` int(10) unsigned NOT NULL default '0' COMMENT '最后登录时间',
  47. `login_num` int(11) unsigned NOT NULL default '0' COMMENT '登录次数',
  48. `region_id` int(11) unsigned NOT NULL default '0' COMMENT '地区',
  49. `amount` int(11) unsigned NOT NULL default '0' COMMENT '账户金额',
  50. `point` int(11) unsigned NOT NULL default '0' COMMENT '积分',
  51. `model_id` smallint(5) unsigned NOT NULL default '0' COMMENT '模型',
  52. `have_message` tinyint(3) unsigned NOT NULL default '0' COMMENT '是否有短消息',
  53. `is_lock` tinyint(1) unsigned NOT NULL default '0' COMMENT '状态:1,锁定',
  54. `vip` tinyint(1) unsigned NOT NULL default '0' COMMENT '是否VIP',
  55. `overdue_date` int(11) unsigned NOT NULL default '0' COMMENT 'vip过期时间',
  56. `site_id` smallint(6) unsigned NOT NULL default '0' COMMENT '所属站点',
  57. `registered_from` smallint(5) unsigned NOT NULL default '0' COMMENT '注册来源',
  58. `disable_form_login` tinyint(1) unsigned NOT NULL default '0' COMMENT '禁止表单登录(如第三方登录的用户)',
  59. PRIMARY KEY (`user_id`)
  60. ) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='会员表'