-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 增加常用实体 & 调整result和useRequest返回内容
- Loading branch information
Showing
21 changed files
with
195 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 配置要求:必须以TARO_APP_开头否则不可以通过process.env.TARO_APP_XX获得 | ||
|
||
# 域名 | ||
TARO_APP_DOMAIN="https://mock.apifox.com" | ||
TARO_APP_DOMAIN="https://805807.cn:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 配置要求:必须以TARO_APP_开头否则不可以通过process.env.TARO_APP_XX获得 | ||
|
||
# 域名 | ||
TARO_APP_DOMAIN="https://mock.apifox.com" | ||
TARO_APP_DOMAIN="https://805807.cn:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# 这里封装业务响应类型 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './student' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { IStudentStruct } from '../entity' | ||
|
||
/** 获取学生信息接口返回类型 */ | ||
type TBizStudentGetInfo = { | ||
studentVo: IStudentStruct | ||
} | ||
|
||
export { TBizStudentGetInfo } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** 课程信息 */ | ||
interface ICourse { | ||
/** 学院ID */ | ||
collegeId: number | ||
/** 课程ID */ | ||
id: number | ||
/** 课程名称 */ | ||
name: string | ||
/** 教师id */ | ||
teacherId: number | ||
} | ||
|
||
/** 学院信息 */ | ||
interface ICollege { | ||
/** 学院ID */ | ||
id: number | ||
/** 学院logo */ | ||
logoUrl: string | ||
/** 学院名称 */ | ||
name: string | ||
} | ||
|
||
/** 年级信息 */ | ||
interface IGrade { | ||
/** 学院ID */ | ||
collegeId: number | ||
/** 年级ID */ | ||
id: number | ||
/** 年级名称 */ | ||
name: string | ||
} | ||
|
||
/** 年级信息 */ | ||
interface IClass { | ||
/** 年级ID */ | ||
gradeId: number | ||
/** 班级ID */ | ||
id: number | ||
/** 班级名称 */ | ||
name: string | ||
} | ||
|
||
/** 学生的组织详细信息 */ | ||
interface IStudentCollegeInfo { | ||
/** 班级信息 */ | ||
classVo?: IClass | ||
/** 年级信息 */ | ||
grade?: IGrade | ||
/** 组织信息 */ | ||
college?: ICollege | ||
} | ||
export { ICourse, IClass, ICollege, IGrade, IStudentCollegeInfo } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
export * from './task' | ||
export * from './student' | ||
export * from './college-info' | ||
export * from './work' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** 学生基础信息 */ | ||
interface IBaseStudentStruct { | ||
/** 学号 */ | ||
studentId?: string | ||
/** openid */ | ||
wechatId?: string | ||
/** 学生姓名 */ | ||
nickname?: string | ||
/** 班级ID */ | ||
classId?: number | ||
/** 学院ID */ | ||
collegeId: number | ||
/** 年级ID */ | ||
gradeId?: number | ||
} | ||
|
||
/** 学生实体 */ | ||
interface IStudentStruct extends IBaseStudentStruct { | ||
/** 手机号 */ | ||
phone?: string | ||
/** 头像 */ | ||
avatarUrl: string | ||
} | ||
|
||
export { IBaseStudentStruct, IStudentStruct } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/** 任务基础信息 */ | ||
interface IBaseWork { | ||
/** 任务ID */ | ||
id: number | ||
/** 创建时间(timestamp) */ | ||
createdAt: number | ||
/** 更新时间(timestamp) */ | ||
updatedAt: number | ||
/** 作业标题 */ | ||
title: string | ||
/** 任务状态 */ | ||
status: 0 | 1 | ||
/** TODO: 没有标签 */ | ||
} | ||
|
||
/** 作业 */ | ||
interface IWork extends IBaseWork { | ||
/** 课程ID */ | ||
courseId: number | ||
/** 作业描述 */ | ||
description: string | ||
/** 截止日期(timestamp) */ | ||
deadline: number | ||
/** 图片链接 */ | ||
pictureLinks: string | ||
/** 发布平台 */ | ||
publishPlatform: string | ||
/** 发布者ID */ | ||
publisherId: number | ||
} | ||
|
||
/** 通知 */ | ||
interface INotify extends IBaseWork { | ||
/** 通知描述 */ | ||
message: string | ||
/** 通知类型 */ | ||
type: string /** TODO: 需要再看下 */ | ||
} | ||
|
||
/** 任务状态枚举 */ | ||
const workEnum = { | ||
0: 'actived', | ||
1: 'deactived', | ||
} as const | ||
|
||
/** 作业状态枚举 */ | ||
const homeWorkEnum = { | ||
0: 'unread_unresolve', | ||
1: 'read_unresolve', | ||
2: 'read_resolve', | ||
} as const | ||
|
||
export { IWork, INotify, workEnum, homeWorkEnum } |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './enumHelper' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './enumHelper' | ||
export * from './helpers' | ||
export * from './entity' | ||
export * from './business' |