This commit is contained in:
编码猿
2025-08-29 22:07:01 +08:00
parent 08057d0276
commit dc70b5fc26
10 changed files with 169 additions and 56 deletions

View File

@@ -24,14 +24,23 @@ export class ConfigureConfig {
DevUrl: 'http://127.0.0.1:8080',
ProdUrl: 'http://127.0.0.1:9090/api',
ApiList: {
// start - 注释内的key都将被Node.js监听并diff取出实时编辑后的差异项,然后程序决定是否增删请求中间层xx文件中的xx方法代码【不要删除】
UserList: '/UserList',
// start - 下面 注释内的各个对象key 将被Nodejs实时监听,获取你key改动(增删改)后,将同步
// start - 自动生成接口请求中间层的文件和文件内部的代码。
// start - 注意 下面 被注释的key 将不会生成文件或代码
// UserList: '/UserList',
// User_IndexTest: '/test',
// Car_carList: '/test',
Car_carList: '/test',
// Car_addCar: '/test',
// Index_reg: '/reg',
// Order_test: '/test',
// end - 注释内的key都将被Node.js监听并diff取出实时编辑后的差异项,然后程序决定是否增删请求中间层xx文件中的xx方法代码【不要删除】
Index_reg: '/reg',
Index_login: '/login',
Order_test: '/test',
// end - 上面 注释内的各个对象key 将被Nodejs实时监听,获取你key改动(增删改)后,将同步
// end - 自动生成接口请求中间层的文件和文件内部的代码。
// end - 注意 上面 被注释的key 将不会生成文件或代码
}
};

View File

@@ -0,0 +1,17 @@
// @ts-nocheck
import { GET, Mapper, POST, PUT, DELETE } from "@ann/Http.annotation";
import { property, defaultValue, deserialize } from "@ann/JsonToClass";
// 建议用工具json-class-desktop生成这个类 类型
export class ResponseType {
@property("id")
user_id!: number;
}
export class CarService {
@GET()
@Mapper(ResponseType)
public async carList (params: object): Promise<ResponseType[]> {}
}

View File

@@ -0,0 +1,21 @@
// @ts-nocheck
import { GET, Mapper, POST, PUT, DELETE } from "@ann/Http.annotation";
import { property, defaultValue, deserialize } from "@ann/JsonToClass";
// 建议用工具json-class-desktop生成这个类 类型
export class ResponseType {
@property("id")
user_id!: number;
}
export class IndexService {
@GET()
@Mapper(ResponseType)
public async reg (params: object): Promise<ResponseType[]> {}
@GET()
@Mapper(ResponseType)
public async login (params: object): Promise<ResponseType[]> {}
}

View File

@@ -0,0 +1,17 @@
// @ts-nocheck
import { GET, Mapper, POST, PUT, DELETE } from "@ann/Http.annotation";
import { property, defaultValue, deserialize } from "@ann/JsonToClass";
// 建议用工具json-class-desktop生成这个类 类型
export class ResponseType {
@property("id")
user_id!: number;
}
export class OrderService {
@GET()
@Mapper(ResponseType)
public async test (params: object): Promise<ResponseType[]> {}
}