User.php 728 B

123456789101112131415161718192021222324252627
  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. use think\facade\Session;
  10. class User extends BaseController {
  11. public function login() {
  12. $params = [
  13. 'id' => CommonService::getSetData()['channel_id'],
  14. 'userid' => input('unionid'),
  15. 'name' => input('nickName'),
  16. 'avatar' => input('avatar'),
  17. 'key' => md5(input('unionid').CommonService::getSetData()['channel_auth_code'])
  18. ];
  19. Session::set('wxId',input('unionid'));
  20. header('Location:http://mudu.tv/activity.php?a=userAssign&'.http_build_query($params));
  21. }
  22. }