User.php 700 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Author: luzheng.liu
  4. * Time: 2020/12/5 17:15
  5. */
  6. namespace app\index\controller;
  7. use app\common\service\CommonService;
  8. use app\index\BaseController;
  9. class User extends BaseController {
  10. public function login() {
  11. $params = [
  12. 'id' => CommonService::getSetData()['channel_id'],
  13. 'userid' => input('unionid'),
  14. 'name' => input('nickName'),
  15. 'avatar' => input('avatar'),
  16. 'key' => md5(input('userid').CommonService::getSetData()['channel_auth_code'])
  17. ];
  18. session('unionid', input('unionid'));
  19. header('Location:http://mudu.tv/activity.php?a=userAssign&'.http_build_query($params));
  20. }
  21. }