'require|url', 'state|携带参数' => 'require|length:1,255', 'scope|应用授权作用域' => 'require|in:snsapi_base,snsapi_userinfo' ]); if (!$val->check(['callback' => $callback, 'state' => $state, 'scope' => $scope])) throw new ValidateException($val->getError()); $oauth = &load_wechat('Oauth'); $rs = $oauth->getOauthRedirect($callback, $state, $scope); halt('调用成功', $rs); } }