first commit

This commit is contained in:
编码猿
2024-09-27 00:48:07 +08:00
commit 342c8c1b1b
95 changed files with 23969 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2020. bmy
* Email2271608011@qq.com
* Githubhttps://github.com/helpcode
*/
import { Autowired } from "@ann/ioc.annotation";
import { UserService, ResponseType } from "@service/user.service";
import { BaseLogic } from "@logic/base.logic";
import { Methods, VueCustomize } from "@logic/base.type";
export class HomeLogic<T extends VueCustomize> extends BaseLogic implements Methods {
@Autowired()
public readonly UserService!: UserService;
public title: string = "12222";
public List: ResponseType[] = [];
// constructor() {
// super();
// }
constructor(_: T) {
super();
console.log("constructor params: ", _);
this._ = _
}
/**
* 在这里面调用需要打开页面就执行的ajax请求
* @constructor
*/
public async StartUp (): Promise<void> {
await this.getData();
}
/**
* 请求首页数据
*/
public async getData (): Promise<void> {
this.List = await this.UserService.UserList({ type: 1, page: 1 });
console.log("this.List: ", this.List);
// let res = await this.UserService.login({ type: 2, page: 2 });
// console.log("this.res: ", res);
//
// await this._.$router.push('/About')
}
}