mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 17:08:29 +08:00
代码优化
This commit is contained in:
parent
806c9b55de
commit
dc73b1d30e
@ -14,16 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
Inject,
|
||||
OnInit,
|
||||
OnDestroy,
|
||||
AfterViewInit,
|
||||
Optional
|
||||
} from '@angular/core';
|
||||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit, OnDestroy, AfterViewInit, Optional } from '@angular/core';
|
||||
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { throwIfAlreadyLoaded } from '@core';
|
||||
@ -40,7 +31,6 @@ import {ImageCaptchaService} from '../../../service/image-captcha.service';
|
||||
import { SocialsProviderService } from '../../../service/socials-provider.service';
|
||||
import { CONSTS } from '../../../shared/consts';
|
||||
|
||||
|
||||
import { stringify } from 'querystring';
|
||||
|
||||
@Component({
|
||||
@ -95,7 +85,6 @@ export class UserLoginComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
//set redirect_uri , is BASE64URL
|
||||
if (this.route.snapshot.queryParams[CONSTS.REDIRECT_URI]) {
|
||||
@ -326,7 +315,6 @@ export class UserLoginComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// #endregion
|
||||
@ -396,13 +384,13 @@ export class UserLoginComponent implements OnInit, OnDestroy {
|
||||
|
||||
qrScanMaxkey(data: any) {
|
||||
// @ts-ignore
|
||||
document.getElementById("div_qrcodelogin").innerHTML = '';
|
||||
document.getElementById('div_qrcodelogin').innerHTML = '';
|
||||
// @ts-ignore
|
||||
var qrcode = new QRCode("div_qrcodelogin", {
|
||||
var qrcode = new QRCode('div_qrcodelogin', {
|
||||
width: 200,
|
||||
height: 200,
|
||||
colorDark: "#000000",
|
||||
colorLight: "#ffffff"
|
||||
colorDark: '#000000',
|
||||
colorLight: '#ffffff'
|
||||
}).makeCode(data.state);
|
||||
//3分钟监听二维码
|
||||
this.count = 90;
|
||||
|
||||
@ -46,6 +46,7 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -107,7 +108,7 @@ public class LoginEntryPoint {
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "登录接口", description = "用户登录地址",method="GET")
|
||||
@RequestMapping(value={"/get"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
@GetMapping(value={"/get"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public ResponseEntity<?> get(
|
||||
@RequestParam(value = "remember_me", required = false) String rememberMeJwt) {
|
||||
logger.debug("/get.");
|
||||
|
||||
@ -65,8 +65,9 @@ public class OneTimePasswordController {
|
||||
@RequestMapping(value = {"/timebased"})
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> timebased(
|
||||
@RequestParam String generate,@CurrentUser UserInfo currentUser) {
|
||||
HashMap<String,Object >timebased =new HashMap<String,Object >();
|
||||
@RequestParam(name="generate") String generate,
|
||||
@CurrentUser UserInfo currentUser) {
|
||||
HashMap<String,Object >timebased =new HashMap<>();
|
||||
|
||||
generate(generate,currentUser);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user