'frontendadd'

This commit is contained in:
yangqiao
2024-12-30 17:47:28 +08:00
parent 8b4cc37514
commit 34e25633ba
71 changed files with 3699 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
export interface PurchaseListResult {
list: Array<PurchaseInfo>
}
export interface PurchaseInfo {
adminName: string
index: string
pdName: string
pdNum: string
pdType: string
purchaseNum: number
updateTime: Date
}
export interface ProjectListResult {
[x: string]: number
code: any
data: any
msg: any
// list: Array<ProjectInfo>;
}
export interface ProjectInfo {
adminName: string
adminPhone: string
index: number
name: string
updateTime: Date
}

View File

@@ -0,0 +1,26 @@
export interface ListResult {
list: Array<ListModel>;
}
export interface ListModel {
adminName: string;
amount: string;
contractType: number;
index: number;
name: string;
no: string;
paymentType: number;
status: number;
updateTime: Date;
}
export interface CardListResult {
list: Array<CardList>;
}
export interface CardList {
banner: string;
description: string;
index: number;
isSetup: boolean;
name: string;
type: number;
}

View File

@@ -0,0 +1,32 @@
import { defineComponent } from 'vue';
export interface MenuListResult {
list: Array<RouteItem>;
}
export type Component<T = any> =
| ReturnType<typeof defineComponent>
| (() => Promise<typeof import('*.vue')>)
| (() => Promise<T>);
export interface RouteItem {
path: string;
name: string;
component?: Component | string;
components?: Component;
redirect?: string;
meta: RouteMeta;
children?: Array<RouteItem>;
}
export interface RouteMeta {
title: string;
icon?: string;
expanded?: boolean;
orderNo?: number;
hidden?: boolean;
hiddenBreadcrumb?: boolean;
single?: boolean;
keepAlive?: boolean;
frameSrc?: string;
frameBlank?: boolean;
}

22
frontend/src/api/user.ts Normal file
View File

@@ -0,0 +1,22 @@
import type { ProjectListResult } from './model/detailModel'
import { request } from '../utils/request'
// 登录获取Token
export function authLogin(data: any) {
return request.post<ProjectListResult>({
url: `/login`,
data
})
}
// 发送聊天请求
export function chat(data: any) {
return request.post<ProjectListResult>({
url: `/chat`,
data
})
}
// 获取模型列表
export function getModelList() {
return request.get<ProjectListResult>({
url: `/model`
})
}