<?php
/**
 * Author: luzheng.liu
 * Time: 2020/12/5 17:15
 */

namespace app\index\controller;


use app\common\service\CommonService;
use app\index\BaseController;
use think\facade\Session;

class User extends BaseController {

    public function login() {
        $params = [
            'id'     => CommonService::getSetData()['channel_id'],
            'userid' => input('unionid'),
            'name'   => input('nickName'),
            'avatar' => input('avatar'),
            'key'    => md5(input('unionid').CommonService::getSetData()['channel_auth_code'])
        ];
        Session::set('wxId',input('unionid'));
        header('Location:http://mudu.tv/activity.php?a=userAssign&'.http_build_query($params));
    }
}