12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- /**
- * Author: luzheng.liu
- * Time: 2020/12/5 17:15
- */
- namespace app\index\controller;
- use app\common\service\CommonService;
- use app\index\BaseController;
- use app\index\exception\ApiException;
- use think\facade\Session;
- class User extends BaseController {
- public function login() {
- $channelId = input('channelId');
- if (empty($channelId)){
- throw new ApiException('渠道id不为空');
- }
- $params = [
- 'id' => $channelId,
- 'userid' => input('unionid'),
- 'name' => input('nickName'),
- 'avatar' => input('avatar'),
- 'key' => md5(input('unionid').CommonService::getSetData($channelId)['channel_auth_code'])
- ];
- var_dump(input());
- die();
- // Session::set('wxId',input('unionid'));
- header('Location:http://mudu.tv/activity.php?a=userAssign&'.http_build_query($params));
- }
- public function clearSession() {
- // var_dump($_SERVER);
- Session::clear();
- // var_dump($_SERVER);
- }
- }
|