├── .browserslistrc ├── .eslintrc.js ├── .github └── workflows │ └── auto_deploy.yml ├── .gitignore ├── .npmrc ├── README.md ├── assets ├── image-20240310005126437.png ├── image-20240310010635669.png ├── image-20240310010718776.png └── image-20240310010747573.png ├── babel.config.js ├── dist.zip ├── generated ├── core │ ├── ApiError.ts │ ├── ApiRequestOptions.ts │ ├── ApiResult.ts │ ├── CancelablePromise.ts │ ├── OpenAPI.ts │ └── request.ts ├── index.ts ├── models │ ├── BaseResponse.ts │ ├── BaseResponse_LoginUserVO_.ts │ ├── BaseResponse_Page_PostVO_.ts │ ├── BaseResponse_Page_QueryQuestionSubmitVo_.ts │ ├── BaseResponse_Page_QuestionListVO_.ts │ ├── BaseResponse_Page_QuestionSubmitVO_.ts │ ├── BaseResponse_Page_QuestionVO_.ts │ ├── BaseResponse_Page_Question_.ts │ ├── BaseResponse_Page_RankListVo_.ts │ ├── BaseResponse_Page_UserVO_.ts │ ├── BaseResponse_Page_User_.ts │ ├── BaseResponse_PostVO_.ts │ ├── BaseResponse_QuestionVO_.ts │ ├── BaseResponse_Question_.ts │ ├── BaseResponse_UserVO_.ts │ ├── BaseResponse_User_.ts │ ├── BaseResponse_boolean_.ts │ ├── BaseResponse_int_.ts │ ├── BaseResponse_long_.ts │ ├── BaseResponse_string_.ts │ ├── CheckReq.ts │ ├── CodeReq.ts │ ├── CommentBackResp.ts │ ├── CommentReq.ts │ ├── CommentResp.ts │ ├── DeleteRequest.ts │ ├── JudgeCase.ts │ ├── JudgeConfig.ts │ ├── JudgeInfo.ts │ ├── LoginUserVO.ts │ ├── ModelAndView.ts │ ├── OrderItem.ts │ ├── PageRequest.ts │ ├── PageResult_CommentBackResp_.ts │ ├── PageResult_CommentResp_.ts │ ├── Page_PostVO_.ts │ ├── Page_QueryQuestionSubmitVo_.ts │ ├── Page_QuestionListVO_.ts │ ├── Page_QuestionSubmitVO_.ts │ ├── Page_QuestionVO_.ts │ ├── Page_Question_.ts │ ├── Page_RankListVo_.ts │ ├── Page_UserVO_.ts │ ├── Page_User_.ts │ ├── PostAddRequest.ts │ ├── PostEditRequest.ts │ ├── PostFavourAddRequest.ts │ ├── PostFavourQueryRequest.ts │ ├── PostQueryRequest.ts │ ├── PostThumbAddRequest.ts │ ├── PostUpdateRequest.ts │ ├── PostVO.ts │ ├── QueryQuestionSubmitVo.ts │ ├── Question.ts │ ├── QuestionAddRequest.ts │ ├── QuestionEditRequest.ts │ ├── QuestionListVO.ts │ ├── QuestionQueryBaseRequest.ts │ ├── QuestionQueryRequest.ts │ ├── QuestionSubmitAddRequest.ts │ ├── QuestionSubmitQueryRequest.ts │ ├── QuestionSubmitVO.ts │ ├── QuestionUpdateRequest.ts │ ├── QuestionVO.ts │ ├── RankListVo.ts │ ├── RecentCommentResp.ts │ ├── ReplyResp.ts │ ├── Result_List_RecentCommentResp_.ts │ ├── Result_List_ReplyResp_.ts │ ├── Result_PageResult_CommentBackResp_.ts │ ├── Result_PageResult_CommentResp_.ts │ ├── Result_object_.ts │ ├── User.ts │ ├── UserAddRequest.ts │ ├── UserLoginRequest.ts │ ├── UserQueryRequest.ts │ ├── UserRegisterRequest.ts │ ├── UserUpdateMyRequest.ts │ ├── UserUpdateRequest.ts │ ├── UserVO.ts │ └── View.ts └── services │ ├── BasicErrorControllerService.ts │ ├── CommentControllerService.ts │ ├── FileControllerService.ts │ ├── LoginControllerService.ts │ ├── PostControllerService.ts │ ├── PostFavourControllerService.ts │ ├── PostThumbControllerService.ts │ ├── QuestionControllerService.ts │ └── UserControllerService.ts ├── package-lock.json ├── package.json ├── pnpm-lock.yaml ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── access │ ├── accessEnum.ts │ ├── checkAccess.ts │ └── index.ts ├── assets │ ├── 401_images │ │ └── 401.gif │ ├── 404_images │ │ ├── 404.png │ │ └── 404_cloud.png │ ├── Gincoder-dark.svg │ ├── Gincoder.svg │ ├── Gincoder1.svg │ ├── config.ts │ ├── icons │ │ ├── album.svg │ │ ├── angle-left.svg │ │ ├── angle-right.svg │ │ ├── archives.svg │ │ ├── arrow-down.svg │ │ ├── arrow-up.svg │ │ ├── article.svg │ │ ├── article_link.svg │ │ ├── article_share.svg │ │ ├── author.svg │ │ ├── badge.svg │ │ ├── bilibili.svg │ │ ├── calendar.svg │ │ ├── category.svg │ │ ├── clock.svg │ │ ├── close.svg │ │ ├── comment.svg │ │ ├── comments.svg │ │ ├── copy.svg │ │ ├── delete.svg │ │ ├── down.svg │ │ ├── edit.svg │ │ ├── emoji.svg │ │ ├── eye.svg │ │ ├── flower.svg │ │ ├── friend.svg │ │ ├── fun.svg │ │ ├── gitee.svg │ │ ├── github.svg │ │ ├── heart.svg │ │ ├── heng.svg │ │ ├── history.svg │ │ ├── home.svg │ │ ├── laba.svg │ │ ├── like.svg │ │ ├── link.cur │ │ ├── logout.svg │ │ ├── message.svg │ │ ├── moon.svg │ │ ├── normal.cur │ │ ├── plane.svg │ │ ├── qizhi.svg │ │ ├── qq.svg │ │ ├── qr_code.svg │ │ ├── right-arrow.svg │ │ ├── search.svg │ │ ├── sun.svg │ │ ├── tag.svg │ │ ├── talk.svg │ │ ├── top.svg │ │ ├── trumpet.svg │ │ ├── up.svg │ │ ├── update.svg │ │ ├── upload.svg │ │ ├── user.svg │ │ ├── web.svg │ │ └── zhaoxiang.svg │ ├── logo.ico │ ├── logo_dark.svg │ └── logo_light.svg ├── components │ ├── CodeEditor.vue │ ├── GlobalHeader.vue │ ├── LightSetting.vue │ ├── MdEditor.vue │ ├── MdViewer.vue │ ├── Modals │ │ ├── AuthModal.vue │ │ ├── Login.vue │ │ ├── SignUp.vue │ │ ├── forgetpassword.vue │ │ └── recodeDetail.vue │ ├── Oauth │ │ └── index.vue │ ├── QuestionHeader.vue │ ├── SvgIcon │ │ └── index.vue │ ├── ViewQuestion │ │ ├── CodeCollapsePanels.vue │ │ ├── CodeTips.vue │ │ ├── ProblemSolve.vue │ │ └── RecordDetail.vue │ ├── addQuestion │ │ └── JudgmentConfig.vue │ ├── comment │ │ ├── CommentList.vue │ │ └── ReplyBox.vue │ ├── type │ │ ├── Copy.vue │ │ └── Loding.vue │ └── userAvatar.vue ├── config │ ├── codeDefault.js │ └── zh_Hans.json ├── constant │ ├── MarkDownThemes │ │ └── cyanosis.css │ └── codemirrorTheme │ │ ├── default.ts │ │ ├── main.css │ │ └── monokai.ts ├── layouts │ ├── BasicLayout.vue │ └── QuestionLayout.vue ├── main.ts ├── plugins │ └── axios.ts ├── router │ ├── index.ts │ └── routes.ts ├── shims-vue.d.ts ├── store │ ├── addQuestion.ts │ ├── auth.ts │ ├── code.ts │ ├── index.ts │ ├── loading.ts │ ├── theme.ts │ └── user.ts ├── utils │ ├── date.ts │ ├── emoji.ts │ ├── tv.ts │ └── useCurrentInstance.ts └── views │ ├── About.vue │ ├── AboutView.vue │ ├── HomeView.vue │ ├── Rank.vue │ ├── UserManageView.vue │ ├── UserView.vue │ ├── aiChat │ └── chatAi.vue │ ├── chat │ └── chatView.vue │ ├── error │ ├── 401.vue │ └── 404.vue │ ├── post │ ├── AddpostView.vue │ ├── ManagePostView.vue │ ├── postView.vue │ └── viewPostView.vue │ └── question │ ├── AddQuestionView.vue │ ├── ManageQuestionView.vue │ ├── QuestionSubmitView.vue │ ├── QuestionsView.vue │ └── ViewQuestionView.vue ├── tailwind.config.js ├── tsconfig.json └── vue.config.js /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | not ie 11 5 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | "vue/setup-compiler-macros": true, 6 | }, 7 | extends: [ 8 | "plugin:vue/vue3-essential", 9 | "eslint:recommended", 10 | "@vue/typescript/recommended", 11 | "plugin:prettier/recommended", 12 | ], 13 | parserOptions: { 14 | ecmaVersion: 2020, 15 | }, 16 | rules: { 17 | "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", 18 | "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", 19 | }, 20 | }; 21 | -------------------------------------------------------------------------------- /.github/workflows/auto_deploy.yml: -------------------------------------------------------------------------------- 1 | name: AutoDeploy 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths-ignore: 8 | - LICENSE 9 | - README.md 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: 检出代码 17 | uses: actions/checkout@v3 18 | 19 | - name: Node环境 20 | uses: actions/setup-node@v2 21 | with: 22 | node-version: 16 23 | 24 | - uses: pnpm/action-setup@v2 25 | name: 安装pnpm 26 | id: pnpm-install 27 | with: 28 | version: 8 29 | run_install: false 30 | 31 | - name: Get pnpm store directory 32 | id: pnpm-cache 33 | shell: bash 34 | run: | 35 | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT 36 | 37 | - uses: actions/cache@v3 38 | name: Setup pnpm cache 39 | with: 40 | path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} 41 | key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} 42 | restore-keys: | 43 | ${{ runner.os }}-pnpm-store- 44 | 45 | - name: 安装依赖 46 | if: steps.cache-hit.outputs.cache-hit != 'true' 47 | run: pnpm install 48 | 49 | - name: 打包构建 50 | run: pnpm run build 51 | 52 | - name: 部署 53 | uses: appleboy/scp-action@master 54 | with: 55 | host: ${{ secrets.USER_HOST }} 56 | username: ${{ secrets.USER_NAME }} 57 | key: ${{ secrets.KEY }} 58 | source: './dist' 59 | target: ${{ secrets.USER_TARGET }} 60 | 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | .github 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](src/assets/Gincoder1.svg) 2 | 3 | 在线体验地址: https://www.gincode.icu 4 | 5 | ## 项目介绍:smiley_cat: 6 | 7 | 在系统前台,管理员可以创建、管理题目;用户可以自由搜索题目、阅读题目、编写并提交代码。还提供了排行榜以及技术文章来增加网站丰富度,提供了评论系统供大家在做题时讨论。 8 | 在系统后端,能够根据管理员设定的题目测试用例在代码沙箱中对代码进行编译、运行、判断输出是否正确。 9 | 其中,代码沙箱可以作为独立服务,提供给其他开发者使用。 10 | 11 | 业务流程: 12 | 13 | ![image-20240310005126437](assets/image-20240310005126437.png) 14 | 15 | ## 前技术选项:sweat_drops: 16 | 17 | - Vue3 18 | - Vue-CLI脚手架 19 | - VueX状态管理 20 | - Arco Design组件库 21 | - 手写前端项目模板(通用布局、权限管理、状态管理、菜单生成 22 | - Monaco Editor代码编辑器 23 | - :boom:OpenAPI前端代码生成 24 | 25 | ## 项目前端特点:sparkles: 26 | 27 | - 做题UI仿LeetCode页面,拖拽式。 28 | - 提供明、暗两种主题风格。 29 | - 动态路由区分不同用户。 30 | - 接入第三方登录,减少注册成本。 31 | - 文件存储在第三方加快响应速度。 32 | - 发布评论、回复评论、表情包。 33 | - 文章以及题目题解都是采用 Markdown 编辑器。 34 | - 文章以及排行榜在未登陆情况下可以游玩。 35 | 36 | ## 部分运行截图:japanese_ogre: 37 | 38 | ![image-20240310010635669](assets/image-20240310010635669.png) 39 | 40 | ![image-20240310010718776](assets//image-20240310010718776.png) 41 | 42 | ![image-20240310010747573](assets//image-20240310010747573.png) -------------------------------------------------------------------------------- /assets/image-20240310005126437.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/assets/image-20240310005126437.png -------------------------------------------------------------------------------- /assets/image-20240310010635669.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/assets/image-20240310010635669.png -------------------------------------------------------------------------------- /assets/image-20240310010718776.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/assets/image-20240310010718776.png -------------------------------------------------------------------------------- /assets/image-20240310010747573.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/assets/image-20240310010747573.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ["@vue/cli-plugin-babel/preset"], 3 | }; 4 | -------------------------------------------------------------------------------- /dist.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/dist.zip -------------------------------------------------------------------------------- /generated/core/ApiError.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | import type { ApiRequestOptions } from './ApiRequestOptions'; 6 | import type { ApiResult } from './ApiResult'; 7 | 8 | export class ApiError extends Error { 9 | public readonly url: string; 10 | public readonly status: number; 11 | public readonly statusText: string; 12 | public readonly body: any; 13 | public readonly request: ApiRequestOptions; 14 | 15 | constructor(request: ApiRequestOptions, response: ApiResult, message: string) { 16 | super(message); 17 | 18 | this.name = 'ApiError'; 19 | this.url = response.url; 20 | this.status = response.status; 21 | this.statusText = response.statusText; 22 | this.body = response.body; 23 | this.request = request; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /generated/core/ApiRequestOptions.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | export type ApiRequestOptions = { 6 | readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; 7 | readonly url: string; 8 | readonly path?: Record; 9 | readonly cookies?: Record; 10 | readonly headers?: Record; 11 | readonly query?: Record; 12 | readonly formData?: Record; 13 | readonly body?: any; 14 | readonly mediaType?: string; 15 | readonly responseHeader?: string; 16 | readonly errors?: Record; 17 | }; 18 | -------------------------------------------------------------------------------- /generated/core/ApiResult.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | export type ApiResult = { 6 | readonly url: string; 7 | readonly ok: boolean; 8 | readonly status: number; 9 | readonly statusText: string; 10 | readonly body: any; 11 | }; 12 | -------------------------------------------------------------------------------- /generated/core/OpenAPI.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | import type { ApiRequestOptions } from './ApiRequestOptions'; 6 | 7 | type Resolver = (options: ApiRequestOptions) => Promise; 8 | type Headers = Record; 9 | 10 | export type OpenAPIConfig = { 11 | BASE: string; 12 | VERSION: string; 13 | WITH_CREDENTIALS: boolean; 14 | CREDENTIALS: 'include' | 'omit' | 'same-origin'; 15 | TOKEN?: string | Resolver | undefined; 16 | USERNAME?: string | Resolver | undefined; 17 | PASSWORD?: string | Resolver | undefined; 18 | HEADERS?: Headers | Resolver | undefined; 19 | ENCODE_PATH?: ((path: string) => string) | undefined; 20 | }; 21 | 22 | export const OpenAPI: OpenAPIConfig = { 23 | BASE: 'http://localhost:9001', 24 | VERSION: '1.0', 25 | WITH_CREDENTIALS: false, 26 | CREDENTIALS: 'include', 27 | TOKEN: undefined, 28 | USERNAME: undefined, 29 | PASSWORD: undefined, 30 | HEADERS: undefined, 31 | ENCODE_PATH: undefined, 32 | }; 33 | -------------------------------------------------------------------------------- /generated/models/BaseResponse.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type BaseResponse = { 7 | code?: number; 8 | data?: any; 9 | message?: string; 10 | }; 11 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_LoginUserVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { LoginUserVO } from './LoginUserVO'; 7 | 8 | export type BaseResponse_LoginUserVO_ = { 9 | code?: number; 10 | data?: LoginUserVO; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Page_PostVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Page_PostVO_ } from './Page_PostVO_'; 7 | 8 | export type BaseResponse_Page_PostVO_ = { 9 | code?: number; 10 | data?: Page_PostVO_; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Page_QueryQuestionSubmitVo_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Page_QueryQuestionSubmitVo_ } from './Page_QueryQuestionSubmitVo_'; 7 | 8 | export type BaseResponse_Page_QueryQuestionSubmitVo_ = { 9 | code?: number; 10 | data?: Page_QueryQuestionSubmitVo_; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Page_QuestionListVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Page_QuestionListVO_ } from './Page_QuestionListVO_'; 7 | 8 | export type BaseResponse_Page_QuestionListVO_ = { 9 | code?: number; 10 | data?: Page_QuestionListVO_; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Page_QuestionSubmitVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Page_QuestionSubmitVO_ } from './Page_QuestionSubmitVO_'; 7 | 8 | export type BaseResponse_Page_QuestionSubmitVO_ = { 9 | code?: number; 10 | data?: Page_QuestionSubmitVO_; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Page_QuestionVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Page_QuestionVO_ } from './Page_QuestionVO_'; 7 | 8 | export type BaseResponse_Page_QuestionVO_ = { 9 | code?: number; 10 | data?: Page_QuestionVO_; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Page_Question_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Page_Question_ } from './Page_Question_'; 7 | 8 | export type BaseResponse_Page_Question_ = { 9 | code?: number; 10 | data?: Page_Question_; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Page_RankListVo_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Page_RankListVo_ } from './Page_RankListVo_'; 7 | 8 | export type BaseResponse_Page_RankListVo_ = { 9 | code?: number; 10 | data?: Page_RankListVo_; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Page_UserVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Page_UserVO_ } from './Page_UserVO_'; 7 | 8 | export type BaseResponse_Page_UserVO_ = { 9 | code?: number; 10 | data?: Page_UserVO_; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Page_User_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Page_User_ } from './Page_User_'; 7 | 8 | export type BaseResponse_Page_User_ = { 9 | code?: number; 10 | data?: Page_User_; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_PostVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { PostVO } from './PostVO'; 7 | 8 | export type BaseResponse_PostVO_ = { 9 | code?: number; 10 | data?: PostVO; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_QuestionVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { QuestionVO } from './QuestionVO'; 7 | 8 | export type BaseResponse_QuestionVO_ = { 9 | code?: number; 10 | data?: QuestionVO; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_Question_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { Question } from './Question'; 7 | 8 | export type BaseResponse_Question_ = { 9 | code?: number; 10 | data?: Question; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_UserVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { UserVO } from './UserVO'; 7 | 8 | export type BaseResponse_UserVO_ = { 9 | code?: number; 10 | data?: UserVO; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_User_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { User } from './User'; 7 | 8 | export type BaseResponse_User_ = { 9 | code?: number; 10 | data?: User; 11 | message?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_boolean_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type BaseResponse_boolean_ = { 7 | code?: number; 8 | data?: boolean; 9 | message?: string; 10 | }; 11 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_int_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type BaseResponse_int_ = { 7 | code?: number; 8 | data?: number; 9 | message?: string; 10 | }; 11 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_long_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type BaseResponse_long_ = { 7 | code?: number; 8 | data?: number; 9 | message?: string; 10 | }; 11 | -------------------------------------------------------------------------------- /generated/models/BaseResponse_string_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type BaseResponse_string_ = { 7 | code?: number; 8 | data?: string; 9 | message?: string; 10 | }; 11 | -------------------------------------------------------------------------------- /generated/models/CheckReq.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type CheckReq = { 7 | idList?: Array; 8 | isCheck: number; 9 | }; 10 | -------------------------------------------------------------------------------- /generated/models/CodeReq.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type CodeReq = { 7 | code: string; 8 | }; 9 | -------------------------------------------------------------------------------- /generated/models/CommentBackResp.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type CommentBackResp = { 7 | articleTitle?: string; 8 | commentContent?: string; 9 | createTime?: string; 10 | fromNickname?: string; 11 | id?: string; 12 | isCheck?: number; 13 | toNickname?: string; 14 | userAvatar?: string; 15 | }; 16 | -------------------------------------------------------------------------------- /generated/models/CommentReq.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type CommentReq = { 7 | commentContent: string; 8 | parentId?: number; 9 | questionId: number; 10 | replyId?: number; 11 | toUid?: number; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/CommentResp.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { ReplyResp } from './ReplyResp'; 7 | 8 | export type CommentResp = { 9 | commentContent?: string; 10 | createTime?: string; 11 | fromNickname?: string; 12 | fromUid?: number; 13 | id?: number; 14 | replyCount?: number; 15 | replyVOList?: Array; 16 | userAvatar?: string; 17 | }; 18 | -------------------------------------------------------------------------------- /generated/models/DeleteRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type DeleteRequest = { 7 | id?: number; 8 | }; 9 | -------------------------------------------------------------------------------- /generated/models/JudgeCase.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type JudgeCase = { 7 | input?: string; 8 | output?: string; 9 | }; 10 | -------------------------------------------------------------------------------- /generated/models/JudgeConfig.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type JudgeConfig = { 7 | memoryLimit?: number; 8 | stackLimit?: number; 9 | timeLimit?: number; 10 | }; 11 | -------------------------------------------------------------------------------- /generated/models/JudgeInfo.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type JudgeInfo = { 7 | memory?: number; 8 | message?: string; 9 | result?: string; 10 | time?: number; 11 | }; 12 | -------------------------------------------------------------------------------- /generated/models/LoginUserVO.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type LoginUserVO = { 7 | createTime?: string; 8 | email?: string; 9 | id?: number; 10 | phone?: string; 11 | updateTime?: string; 12 | userAvatar?: string; 13 | userName?: string; 14 | userProfile?: string; 15 | userRole?: string; 16 | }; 17 | -------------------------------------------------------------------------------- /generated/models/ModelAndView.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { View } from './View'; 7 | 8 | export type ModelAndView = { 9 | empty?: boolean; 10 | model?: any; 11 | modelMap?: Record; 12 | reference?: boolean; 13 | status?: ModelAndView.status; 14 | view?: View; 15 | viewName?: string; 16 | }; 17 | 18 | export namespace ModelAndView { 19 | 20 | export enum status { 21 | ACCEPTED = 'ACCEPTED', 22 | ALREADY_REPORTED = 'ALREADY_REPORTED', 23 | BAD_GATEWAY = 'BAD_GATEWAY', 24 | BAD_REQUEST = 'BAD_REQUEST', 25 | BANDWIDTH_LIMIT_EXCEEDED = 'BANDWIDTH_LIMIT_EXCEEDED', 26 | CHECKPOINT = 'CHECKPOINT', 27 | CONFLICT = 'CONFLICT', 28 | CONTINUE = 'CONTINUE', 29 | CREATED = 'CREATED', 30 | DESTINATION_LOCKED = 'DESTINATION_LOCKED', 31 | EXPECTATION_FAILED = 'EXPECTATION_FAILED', 32 | FAILED_DEPENDENCY = 'FAILED_DEPENDENCY', 33 | FORBIDDEN = 'FORBIDDEN', 34 | FOUND = 'FOUND', 35 | GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT', 36 | GONE = 'GONE', 37 | HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED', 38 | IM_USED = 'IM_USED', 39 | INSUFFICIENT_SPACE_ON_RESOURCE = 'INSUFFICIENT_SPACE_ON_RESOURCE', 40 | INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE', 41 | INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR', 42 | I_AM_A_TEAPOT = 'I_AM_A_TEAPOT', 43 | LENGTH_REQUIRED = 'LENGTH_REQUIRED', 44 | LOCKED = 'LOCKED', 45 | LOOP_DETECTED = 'LOOP_DETECTED', 46 | METHOD_FAILURE = 'METHOD_FAILURE', 47 | METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED', 48 | MOVED_PERMANENTLY = 'MOVED_PERMANENTLY', 49 | MOVED_TEMPORARILY = 'MOVED_TEMPORARILY', 50 | MULTIPLE_CHOICES = 'MULTIPLE_CHOICES', 51 | MULTI_STATUS = 'MULTI_STATUS', 52 | NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED', 53 | NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION', 54 | NOT_ACCEPTABLE = 'NOT_ACCEPTABLE', 55 | NOT_EXTENDED = 'NOT_EXTENDED', 56 | NOT_FOUND = 'NOT_FOUND', 57 | NOT_IMPLEMENTED = 'NOT_IMPLEMENTED', 58 | NOT_MODIFIED = 'NOT_MODIFIED', 59 | NO_CONTENT = 'NO_CONTENT', 60 | OK = 'OK', 61 | PARTIAL_CONTENT = 'PARTIAL_CONTENT', 62 | PAYLOAD_TOO_LARGE = 'PAYLOAD_TOO_LARGE', 63 | PAYMENT_REQUIRED = 'PAYMENT_REQUIRED', 64 | PERMANENT_REDIRECT = 'PERMANENT_REDIRECT', 65 | PRECONDITION_FAILED = 'PRECONDITION_FAILED', 66 | PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED', 67 | PROCESSING = 'PROCESSING', 68 | PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED', 69 | REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE', 70 | REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE', 71 | REQUEST_HEADER_FIELDS_TOO_LARGE = 'REQUEST_HEADER_FIELDS_TOO_LARGE', 72 | REQUEST_TIMEOUT = 'REQUEST_TIMEOUT', 73 | REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG', 74 | RESET_CONTENT = 'RESET_CONTENT', 75 | SEE_OTHER = 'SEE_OTHER', 76 | SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE', 77 | SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS', 78 | TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT', 79 | TOO_EARLY = 'TOO_EARLY', 80 | TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS', 81 | UNAUTHORIZED = 'UNAUTHORIZED', 82 | UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS', 83 | UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY', 84 | UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE', 85 | UPGRADE_REQUIRED = 'UPGRADE_REQUIRED', 86 | URI_TOO_LONG = 'URI_TOO_LONG', 87 | USE_PROXY = 'USE_PROXY', 88 | VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES', 89 | } 90 | 91 | 92 | } 93 | -------------------------------------------------------------------------------- /generated/models/OrderItem.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type OrderItem = { 7 | asc?: boolean; 8 | column?: string; 9 | }; 10 | -------------------------------------------------------------------------------- /generated/models/PageRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type PageRequest = { 7 | current?: number; 8 | pageSize?: number; 9 | sortField?: string; 10 | sortOrder?: string; 11 | }; 12 | -------------------------------------------------------------------------------- /generated/models/PageResult_CommentBackResp_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { CommentBackResp } from './CommentBackResp'; 7 | 8 | export type PageResult_CommentBackResp_ = { 9 | count?: number; 10 | recordList?: Array; 11 | }; 12 | -------------------------------------------------------------------------------- /generated/models/PageResult_CommentResp_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { CommentResp } from './CommentResp'; 7 | 8 | export type PageResult_CommentResp_ = { 9 | count?: number; 10 | recordList?: Array; 11 | }; 12 | -------------------------------------------------------------------------------- /generated/models/Page_PostVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { OrderItem } from './OrderItem'; 7 | import type { PostVO } from './PostVO'; 8 | 9 | export type Page_PostVO_ = { 10 | countId?: string; 11 | current?: number; 12 | maxLimit?: number; 13 | optimizeCountSql?: boolean; 14 | orders?: Array; 15 | pages?: number; 16 | records?: Array; 17 | searchCount?: boolean; 18 | size?: number; 19 | total?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/Page_QueryQuestionSubmitVo_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { OrderItem } from './OrderItem'; 7 | import type { QueryQuestionSubmitVo } from './QueryQuestionSubmitVo'; 8 | 9 | export type Page_QueryQuestionSubmitVo_ = { 10 | countId?: string; 11 | current?: number; 12 | maxLimit?: number; 13 | optimizeCountSql?: boolean; 14 | orders?: Array; 15 | pages?: number; 16 | records?: Array; 17 | searchCount?: boolean; 18 | size?: number; 19 | total?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/Page_QuestionListVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { OrderItem } from './OrderItem'; 7 | import type { QuestionListVO } from './QuestionListVO'; 8 | 9 | export type Page_QuestionListVO_ = { 10 | countId?: string; 11 | current?: number; 12 | maxLimit?: number; 13 | optimizeCountSql?: boolean; 14 | orders?: Array; 15 | pages?: number; 16 | records?: Array; 17 | searchCount?: boolean; 18 | size?: number; 19 | total?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/Page_QuestionSubmitVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { OrderItem } from './OrderItem'; 7 | import type { QuestionSubmitVO } from './QuestionSubmitVO'; 8 | 9 | export type Page_QuestionSubmitVO_ = { 10 | countId?: string; 11 | current?: number; 12 | maxLimit?: number; 13 | optimizeCountSql?: boolean; 14 | orders?: Array; 15 | pages?: number; 16 | records?: Array; 17 | searchCount?: boolean; 18 | size?: number; 19 | total?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/Page_QuestionVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { OrderItem } from './OrderItem'; 7 | import type { QuestionVO } from './QuestionVO'; 8 | 9 | export type Page_QuestionVO_ = { 10 | countId?: string; 11 | current?: number; 12 | maxLimit?: number; 13 | optimizeCountSql?: boolean; 14 | orders?: Array; 15 | pages?: number; 16 | records?: Array; 17 | searchCount?: boolean; 18 | size?: number; 19 | total?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/Page_Question_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { OrderItem } from './OrderItem'; 7 | import type { Question } from './Question'; 8 | 9 | export type Page_Question_ = { 10 | countId?: string; 11 | current?: number; 12 | maxLimit?: number; 13 | optimizeCountSql?: boolean; 14 | orders?: Array; 15 | pages?: number; 16 | records?: Array; 17 | searchCount?: boolean; 18 | size?: number; 19 | total?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/Page_RankListVo_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { OrderItem } from './OrderItem'; 7 | import type { RankListVo } from './RankListVo'; 8 | 9 | export type Page_RankListVo_ = { 10 | countId?: string; 11 | current?: number; 12 | maxLimit?: number; 13 | optimizeCountSql?: boolean; 14 | orders?: Array; 15 | pages?: number; 16 | records?: Array; 17 | searchCount?: boolean; 18 | size?: number; 19 | total?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/Page_UserVO_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { OrderItem } from './OrderItem'; 7 | import type { UserVO } from './UserVO'; 8 | 9 | export type Page_UserVO_ = { 10 | countId?: string; 11 | current?: number; 12 | maxLimit?: number; 13 | optimizeCountSql?: boolean; 14 | orders?: Array; 15 | pages?: number; 16 | records?: Array; 17 | searchCount?: boolean; 18 | size?: number; 19 | total?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/Page_User_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { OrderItem } from './OrderItem'; 7 | import type { User } from './User'; 8 | 9 | export type Page_User_ = { 10 | countId?: string; 11 | current?: number; 12 | maxLimit?: number; 13 | optimizeCountSql?: boolean; 14 | orders?: Array; 15 | pages?: number; 16 | records?: Array; 17 | searchCount?: boolean; 18 | size?: number; 19 | total?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/PostAddRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type PostAddRequest = { 7 | background?: string; 8 | content?: string; 9 | description?: string; 10 | tags?: Array; 11 | title?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/PostEditRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type PostEditRequest = { 7 | content?: string; 8 | id?: number; 9 | tags?: Array; 10 | title?: string; 11 | }; 12 | -------------------------------------------------------------------------------- /generated/models/PostFavourAddRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type PostFavourAddRequest = { 7 | postId?: number; 8 | }; 9 | -------------------------------------------------------------------------------- /generated/models/PostFavourQueryRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { PostQueryRequest } from './PostQueryRequest'; 7 | 8 | export type PostFavourQueryRequest = { 9 | current?: number; 10 | pageSize?: number; 11 | postQueryRequest?: PostQueryRequest; 12 | sortField?: string; 13 | sortOrder?: string; 14 | userId?: number; 15 | }; 16 | -------------------------------------------------------------------------------- /generated/models/PostQueryRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type PostQueryRequest = { 7 | content?: string; 8 | current?: number; 9 | favourUserId?: number; 10 | id?: number; 11 | notId?: number; 12 | orTags?: Array; 13 | pageSize?: number; 14 | searchText?: string; 15 | sortField?: string; 16 | sortOrder?: string; 17 | tags?: Array; 18 | title?: string; 19 | userId?: number; 20 | }; 21 | -------------------------------------------------------------------------------- /generated/models/PostThumbAddRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type PostThumbAddRequest = { 7 | postId?: number; 8 | }; 9 | -------------------------------------------------------------------------------- /generated/models/PostUpdateRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type PostUpdateRequest = { 7 | background?: string; 8 | content?: string; 9 | description?: string; 10 | id?: number; 11 | tags?: Array; 12 | title?: string; 13 | }; 14 | -------------------------------------------------------------------------------- /generated/models/PostVO.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { UserVO } from './UserVO'; 7 | 8 | export type PostVO = { 9 | background?: string; 10 | content?: string; 11 | createTime?: string; 12 | description?: string; 13 | favourNum?: number; 14 | hasFavour?: boolean; 15 | hasThumb?: boolean; 16 | id?: number; 17 | tags?: Array; 18 | thumbNum?: number; 19 | title?: string; 20 | updateTime?: string; 21 | user?: UserVO; 22 | userId?: number; 23 | }; 24 | -------------------------------------------------------------------------------- /generated/models/QueryQuestionSubmitVo.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { JudgeInfo } from './JudgeInfo'; 7 | 8 | export type QueryQuestionSubmitVo = { 9 | code?: string; 10 | createTime?: string; 11 | id?: number; 12 | judgeInfo?: JudgeInfo; 13 | language?: string; 14 | status?: number; 15 | title?: string; 16 | updateTime?: string; 17 | userId?: number; 18 | userName?: string; 19 | }; 20 | -------------------------------------------------------------------------------- /generated/models/Question.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type Question = { 7 | acceptedNum?: number; 8 | answer?: string; 9 | content?: string; 10 | createTime?: string; 11 | favourNum?: number; 12 | id?: number; 13 | isDelete?: number; 14 | judgeCase?: string; 15 | judgeConfig?: string; 16 | statue?: number; 17 | submitNum?: number; 18 | tags?: string; 19 | template?: string; 20 | thumbNum?: number; 21 | title?: string; 22 | updateTime?: string; 23 | userId?: number; 24 | }; 25 | -------------------------------------------------------------------------------- /generated/models/QuestionAddRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { JudgeCase } from './JudgeCase'; 7 | import type { JudgeConfig } from './JudgeConfig'; 8 | 9 | export type QuestionAddRequest = { 10 | answer?: string; 11 | content: string; 12 | judgeCase?: Array; 13 | judgeConfig?: JudgeConfig; 14 | tags?: Array; 15 | template?: string; 16 | title: string; 17 | }; 18 | -------------------------------------------------------------------------------- /generated/models/QuestionEditRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { JudgeCase } from './JudgeCase'; 7 | import type { JudgeConfig } from './JudgeConfig'; 8 | 9 | export type QuestionEditRequest = { 10 | answer?: string; 11 | content?: string; 12 | id?: number; 13 | judgeCase?: Array; 14 | judgeConfig?: JudgeConfig; 15 | tags?: Array; 16 | title?: string; 17 | }; 18 | -------------------------------------------------------------------------------- /generated/models/QuestionListVO.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type QuestionListVO = { 7 | acceptedNum?: number; 8 | content?: string; 9 | createTime?: string; 10 | id?: number; 11 | passRate?: number; 12 | statue?: number; 13 | submitNum?: number; 14 | tags?: Array; 15 | title?: string; 16 | }; 17 | -------------------------------------------------------------------------------- /generated/models/QuestionQueryBaseRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type QuestionQueryBaseRequest = { 7 | current?: number; 8 | language?: string; 9 | pageSize?: number; 10 | sortField?: string; 11 | sortOrder?: string; 12 | status?: number; 13 | title?: string; 14 | userName?: string; 15 | }; 16 | -------------------------------------------------------------------------------- /generated/models/QuestionQueryRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type QuestionQueryRequest = { 7 | answer?: string; 8 | content?: string; 9 | current?: number; 10 | id?: number; 11 | pageSize?: number; 12 | sortField?: string; 13 | sortOrder?: string; 14 | statue?: number; 15 | tags?: Array; 16 | title?: string; 17 | userId?: number; 18 | }; 19 | -------------------------------------------------------------------------------- /generated/models/QuestionSubmitAddRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type QuestionSubmitAddRequest = { 7 | code?: string; 8 | inputList?: Array; 9 | language?: string; 10 | model?: number; 11 | questionId?: number; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/QuestionSubmitQueryRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type QuestionSubmitQueryRequest = { 7 | current?: number; 8 | language?: string; 9 | pageSize?: number; 10 | questionId?: number; 11 | sortField?: string; 12 | sortOrder?: string; 13 | status?: number; 14 | userId?: number; 15 | userName?: string; 16 | }; 17 | -------------------------------------------------------------------------------- /generated/models/QuestionSubmitVO.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { JudgeInfo } from './JudgeInfo'; 7 | import type { QuestionVO } from './QuestionVO'; 8 | import type { UserVO } from './UserVO'; 9 | 10 | export type QuestionSubmitVO = { 11 | code?: string; 12 | createTime?: string; 13 | id?: number; 14 | judgeInfo?: JudgeInfo; 15 | language?: string; 16 | questionId?: number; 17 | questionVO?: QuestionVO; 18 | status?: number; 19 | title?: string; 20 | updateTime?: string; 21 | userName?: string; 22 | userVO?: UserVO; 23 | }; 24 | -------------------------------------------------------------------------------- /generated/models/QuestionUpdateRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { JudgeCase } from './JudgeCase'; 7 | import type { JudgeConfig } from './JudgeConfig'; 8 | 9 | export type QuestionUpdateRequest = { 10 | answer?: string; 11 | content?: string; 12 | id?: number; 13 | judgeCase?: Array; 14 | judgeConfig?: JudgeConfig; 15 | tags?: Array; 16 | template?: string; 17 | title?: string; 18 | }; 19 | -------------------------------------------------------------------------------- /generated/models/QuestionVO.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { JudgeConfig } from './JudgeConfig'; 7 | import type { UserVO } from './UserVO'; 8 | 9 | export type QuestionVO = { 10 | acceptedNum?: number; 11 | answer?: string; 12 | content?: string; 13 | createTime?: string; 14 | favourNum?: number; 15 | id?: number; 16 | judgeConfig?: JudgeConfig; 17 | passRate?: string; 18 | statue?: number; 19 | submitNum?: number; 20 | tags?: Array; 21 | template?: string; 22 | thumbNum?: number; 23 | title?: string; 24 | updateTime?: string; 25 | userId?: number; 26 | userVO?: UserVO; 27 | }; 28 | -------------------------------------------------------------------------------- /generated/models/RankListVo.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type RankListVo = { 7 | id?: number; 8 | passRate?: number; 9 | userAcTotal?: number; 10 | userAvatar?: string; 11 | userName?: string; 12 | userProfile?: string; 13 | userScore?: number; 14 | userSubmitTotal?: number; 15 | }; 16 | -------------------------------------------------------------------------------- /generated/models/RecentCommentResp.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type RecentCommentResp = { 7 | avatar?: string; 8 | commentContent?: string; 9 | createTime?: string; 10 | id?: number; 11 | nickname?: string; 12 | }; 13 | -------------------------------------------------------------------------------- /generated/models/ReplyResp.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type ReplyResp = { 7 | avatar?: string; 8 | commentContent?: string; 9 | createTime?: string; 10 | fromNickname?: string; 11 | fromUid?: number; 12 | id?: number; 13 | parentId?: number; 14 | toNickname?: string; 15 | toUid?: number; 16 | webSite?: string; 17 | }; 18 | -------------------------------------------------------------------------------- /generated/models/Result_List_RecentCommentResp_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { RecentCommentResp } from './RecentCommentResp'; 7 | 8 | export type Result_List_RecentCommentResp_ = { 9 | code?: number; 10 | data?: Array; 11 | flag?: boolean; 12 | msg?: string; 13 | }; 14 | -------------------------------------------------------------------------------- /generated/models/Result_List_ReplyResp_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { ReplyResp } from './ReplyResp'; 7 | 8 | export type Result_List_ReplyResp_ = { 9 | code?: number; 10 | data?: Array; 11 | flag?: boolean; 12 | msg?: string; 13 | }; 14 | -------------------------------------------------------------------------------- /generated/models/Result_PageResult_CommentBackResp_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { PageResult_CommentBackResp_ } from './PageResult_CommentBackResp_'; 7 | 8 | export type Result_PageResult_CommentBackResp_ = { 9 | code?: number; 10 | data?: PageResult_CommentBackResp_; 11 | flag?: boolean; 12 | msg?: string; 13 | }; 14 | -------------------------------------------------------------------------------- /generated/models/Result_PageResult_CommentResp_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | import type { PageResult_CommentResp_ } from './PageResult_CommentResp_'; 7 | 8 | export type Result_PageResult_CommentResp_ = { 9 | code?: number; 10 | data?: PageResult_CommentResp_; 11 | flag?: boolean; 12 | msg?: string; 13 | }; 14 | -------------------------------------------------------------------------------- /generated/models/Result_object_.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type Result_object_ = { 7 | code?: number; 8 | data?: any; 9 | flag?: boolean; 10 | msg?: string; 11 | }; 12 | -------------------------------------------------------------------------------- /generated/models/User.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type User = { 7 | createTime?: string; 8 | email?: string; 9 | id?: number; 10 | isDelete?: number; 11 | loginType?: number; 12 | phone?: string; 13 | updateTime?: string; 14 | userAccount?: string; 15 | userAvatar?: string; 16 | userName?: string; 17 | userPassword?: string; 18 | userProfile?: string; 19 | userRole?: string; 20 | userState?: string; 21 | }; 22 | -------------------------------------------------------------------------------- /generated/models/UserAddRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type UserAddRequest = { 7 | userAccount?: string; 8 | userAvatar?: string; 9 | userName?: string; 10 | userRole?: string; 11 | }; 12 | -------------------------------------------------------------------------------- /generated/models/UserLoginRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type UserLoginRequest = { 7 | userAccount?: string; 8 | userPassword?: string; 9 | }; 10 | -------------------------------------------------------------------------------- /generated/models/UserQueryRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type UserQueryRequest = { 7 | current?: number; 8 | email?: string; 9 | id?: number; 10 | loginType?: number; 11 | pageSize?: number; 12 | phone?: string; 13 | sortField?: string; 14 | sortOrder?: string; 15 | userName?: string; 16 | userProfile?: string; 17 | userRole?: string; 18 | }; 19 | -------------------------------------------------------------------------------- /generated/models/UserRegisterRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type UserRegisterRequest = { 7 | checkPassword?: string; 8 | userAccount?: string; 9 | userPassword?: string; 10 | verificationCode?: string; 11 | }; 12 | -------------------------------------------------------------------------------- /generated/models/UserUpdateMyRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type UserUpdateMyRequest = { 7 | userAvatar?: string; 8 | userName: string; 9 | userProfile?: string; 10 | }; 11 | -------------------------------------------------------------------------------- /generated/models/UserUpdateRequest.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type UserUpdateRequest = { 7 | email?: string; 8 | id?: number; 9 | phone?: string; 10 | userAvatar?: string; 11 | userName?: string; 12 | userProfile?: string; 13 | userRole?: string; 14 | }; 15 | -------------------------------------------------------------------------------- /generated/models/UserVO.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type UserVO = { 7 | createTime?: string; 8 | id?: number; 9 | userAvatar?: string; 10 | userName?: string; 11 | userProfile?: string; 12 | userRole?: string; 13 | }; 14 | -------------------------------------------------------------------------------- /generated/models/View.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | 6 | export type View = { 7 | contentType?: string; 8 | }; 9 | -------------------------------------------------------------------------------- /generated/services/BasicErrorControllerService.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | import type { ModelAndView } from '../models/ModelAndView'; 6 | 7 | import type { CancelablePromise } from '../core/CancelablePromise'; 8 | import { OpenAPI } from '../core/OpenAPI'; 9 | import { request as __request } from '../core/request'; 10 | 11 | export class BasicErrorControllerService { 12 | 13 | /** 14 | * errorHtml 15 | * @returns ModelAndView OK 16 | * @throws ApiError 17 | */ 18 | public static errorHtmlUsingGet(): CancelablePromise { 19 | return __request(OpenAPI, { 20 | method: 'GET', 21 | url: '/api/error', 22 | errors: { 23 | 401: `Unauthorized`, 24 | 403: `Forbidden`, 25 | 404: `Not Found`, 26 | }, 27 | }); 28 | } 29 | 30 | /** 31 | * errorHtml 32 | * @returns ModelAndView OK 33 | * @throws ApiError 34 | */ 35 | public static errorHtmlUsingHead(): CancelablePromise { 36 | return __request(OpenAPI, { 37 | method: 'HEAD', 38 | url: '/api/error', 39 | errors: { 40 | 401: `Unauthorized`, 41 | 403: `Forbidden`, 42 | }, 43 | }); 44 | } 45 | 46 | /** 47 | * errorHtml 48 | * @returns ModelAndView OK 49 | * @returns any Created 50 | * @throws ApiError 51 | */ 52 | public static errorHtmlUsingPost(): CancelablePromise { 53 | return __request(OpenAPI, { 54 | method: 'POST', 55 | url: '/api/error', 56 | errors: { 57 | 401: `Unauthorized`, 58 | 403: `Forbidden`, 59 | 404: `Not Found`, 60 | }, 61 | }); 62 | } 63 | 64 | /** 65 | * errorHtml 66 | * @returns ModelAndView OK 67 | * @returns any Created 68 | * @throws ApiError 69 | */ 70 | public static errorHtmlUsingPut(): CancelablePromise { 71 | return __request(OpenAPI, { 72 | method: 'PUT', 73 | url: '/api/error', 74 | errors: { 75 | 401: `Unauthorized`, 76 | 403: `Forbidden`, 77 | 404: `Not Found`, 78 | }, 79 | }); 80 | } 81 | 82 | /** 83 | * errorHtml 84 | * @returns ModelAndView OK 85 | * @throws ApiError 86 | */ 87 | public static errorHtmlUsingDelete(): CancelablePromise { 88 | return __request(OpenAPI, { 89 | method: 'DELETE', 90 | url: '/api/error', 91 | errors: { 92 | 401: `Unauthorized`, 93 | 403: `Forbidden`, 94 | }, 95 | }); 96 | } 97 | 98 | /** 99 | * errorHtml 100 | * @returns ModelAndView OK 101 | * @throws ApiError 102 | */ 103 | public static errorHtmlUsingOptions(): CancelablePromise { 104 | return __request(OpenAPI, { 105 | method: 'OPTIONS', 106 | url: '/api/error', 107 | errors: { 108 | 401: `Unauthorized`, 109 | 403: `Forbidden`, 110 | }, 111 | }); 112 | } 113 | 114 | /** 115 | * errorHtml 116 | * @returns ModelAndView OK 117 | * @throws ApiError 118 | */ 119 | public static errorHtmlUsingPatch(): CancelablePromise { 120 | return __request(OpenAPI, { 121 | method: 'PATCH', 122 | url: '/api/error', 123 | errors: { 124 | 401: `Unauthorized`, 125 | 403: `Forbidden`, 126 | }, 127 | }); 128 | } 129 | 130 | } 131 | -------------------------------------------------------------------------------- /generated/services/FileControllerService.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | import type { BaseResponse_string_ } from '../models/BaseResponse_string_'; 6 | 7 | import type { CancelablePromise } from '../core/CancelablePromise'; 8 | import { OpenAPI } from '../core/OpenAPI'; 9 | import { request as __request } from '../core/request'; 10 | 11 | export class FileControllerService { 12 | 13 | /** 14 | * uploadFile 15 | * @returns any OK 16 | * @throws ApiError 17 | */ 18 | public static uploadFileUsingGet(): CancelablePromise { 19 | return __request(OpenAPI, { 20 | method: 'GET', 21 | url: '/api/file/rankTable', 22 | errors: { 23 | 401: `Unauthorized`, 24 | 403: `Forbidden`, 25 | 404: `Not Found`, 26 | }, 27 | }); 28 | } 29 | 30 | /** 31 | * uploadFile 32 | * @param file 33 | * @returns string OK 34 | * @returns any Created 35 | * @throws ApiError 36 | */ 37 | public static uploadFileUsingPost( 38 | file?: Blob, 39 | ): CancelablePromise { 40 | return __request(OpenAPI, { 41 | method: 'POST', 42 | url: '/api/file/upload', 43 | formData: { 44 | 'file': file, 45 | }, 46 | errors: { 47 | 401: `Unauthorized`, 48 | 403: `Forbidden`, 49 | 404: `Not Found`, 50 | }, 51 | }); 52 | } 53 | 54 | /** 55 | * uploadFileExip 56 | * @param biz 57 | * @param file 58 | * @returns BaseResponse_string_ OK 59 | * @returns any Created 60 | * @throws ApiError 61 | */ 62 | public static uploadFileExipUsingPost( 63 | biz?: string, 64 | file?: Blob, 65 | ): CancelablePromise { 66 | return __request(OpenAPI, { 67 | method: 'POST', 68 | url: '/api/file/upload2', 69 | query: { 70 | 'biz': biz, 71 | }, 72 | formData: { 73 | 'file': file, 74 | }, 75 | errors: { 76 | 401: `Unauthorized`, 77 | 403: `Forbidden`, 78 | 404: `Not Found`, 79 | }, 80 | }); 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /generated/services/LoginControllerService.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | import type { BaseResponse_LoginUserVO_ } from '../models/BaseResponse_LoginUserVO_'; 6 | import type { CodeReq } from '../models/CodeReq'; 7 | 8 | import type { CancelablePromise } from '../core/CancelablePromise'; 9 | import { OpenAPI } from '../core/OpenAPI'; 10 | import { request as __request } from '../core/request'; 11 | 12 | export class LoginControllerService { 13 | 14 | /** 15 | * giteeLogin 16 | * @param data data 17 | * @returns BaseResponse_LoginUserVO_ OK 18 | * @returns any Created 19 | * @throws ApiError 20 | */ 21 | public static giteeLoginUsingPost( 22 | data: CodeReq, 23 | ): CancelablePromise { 24 | return __request(OpenAPI, { 25 | method: 'POST', 26 | url: '/api/oauth/gitee', 27 | body: data, 28 | errors: { 29 | 401: `Unauthorized`, 30 | 403: `Forbidden`, 31 | 404: `Not Found`, 32 | }, 33 | }); 34 | } 35 | 36 | /** 37 | * githubLogin 38 | * @param data data 39 | * @returns BaseResponse_LoginUserVO_ OK 40 | * @returns any Created 41 | * @throws ApiError 42 | */ 43 | public static githubLoginUsingPost( 44 | data: CodeReq, 45 | ): CancelablePromise { 46 | return __request(OpenAPI, { 47 | method: 'POST', 48 | url: '/api/oauth/github', 49 | body: data, 50 | errors: { 51 | 401: `Unauthorized`, 52 | 403: `Forbidden`, 53 | 404: `Not Found`, 54 | }, 55 | }); 56 | } 57 | 58 | /** 59 | * qqLogin 60 | * @param data data 61 | * @returns BaseResponse_LoginUserVO_ OK 62 | * @returns any Created 63 | * @throws ApiError 64 | */ 65 | public static qqLoginUsingPost( 66 | data: CodeReq, 67 | ): CancelablePromise { 68 | return __request(OpenAPI, { 69 | method: 'POST', 70 | url: '/api/oauth/qq', 71 | body: data, 72 | errors: { 73 | 401: `Unauthorized`, 74 | 403: `Forbidden`, 75 | 404: `Not Found`, 76 | }, 77 | }); 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /generated/services/PostFavourControllerService.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | import type { BaseResponse_int_ } from '../models/BaseResponse_int_'; 6 | import type { BaseResponse_Page_PostVO_ } from '../models/BaseResponse_Page_PostVO_'; 7 | import type { PostFavourAddRequest } from '../models/PostFavourAddRequest'; 8 | import type { PostFavourQueryRequest } from '../models/PostFavourQueryRequest'; 9 | import type { PostQueryRequest } from '../models/PostQueryRequest'; 10 | 11 | import type { CancelablePromise } from '../core/CancelablePromise'; 12 | import { OpenAPI } from '../core/OpenAPI'; 13 | import { request as __request } from '../core/request'; 14 | 15 | export class PostFavourControllerService { 16 | 17 | /** 18 | * doPostFavour 19 | * @param postFavourAddRequest postFavourAddRequest 20 | * @returns BaseResponse_int_ OK 21 | * @returns any Created 22 | * @throws ApiError 23 | */ 24 | public static doPostFavourUsingPost( 25 | postFavourAddRequest: PostFavourAddRequest, 26 | ): CancelablePromise { 27 | return __request(OpenAPI, { 28 | method: 'POST', 29 | url: '/api/post_favour/', 30 | body: postFavourAddRequest, 31 | errors: { 32 | 401: `Unauthorized`, 33 | 403: `Forbidden`, 34 | 404: `Not Found`, 35 | }, 36 | }); 37 | } 38 | 39 | /** 40 | * listFavourPostByPage 41 | * @param postFavourQueryRequest postFavourQueryRequest 42 | * @returns BaseResponse_Page_PostVO_ OK 43 | * @returns any Created 44 | * @throws ApiError 45 | */ 46 | public static listFavourPostByPageUsingPost( 47 | postFavourQueryRequest: PostFavourQueryRequest, 48 | ): CancelablePromise { 49 | return __request(OpenAPI, { 50 | method: 'POST', 51 | url: '/api/post_favour/list/page', 52 | body: postFavourQueryRequest, 53 | errors: { 54 | 401: `Unauthorized`, 55 | 403: `Forbidden`, 56 | 404: `Not Found`, 57 | }, 58 | }); 59 | } 60 | 61 | /** 62 | * listMyFavourPostByPage 63 | * @param postQueryRequest postQueryRequest 64 | * @returns BaseResponse_Page_PostVO_ OK 65 | * @returns any Created 66 | * @throws ApiError 67 | */ 68 | public static listMyFavourPostByPageUsingPost( 69 | postQueryRequest: PostQueryRequest, 70 | ): CancelablePromise { 71 | return __request(OpenAPI, { 72 | method: 'POST', 73 | url: '/api/post_favour/my/list/page', 74 | body: postQueryRequest, 75 | errors: { 76 | 401: `Unauthorized`, 77 | 403: `Forbidden`, 78 | 404: `Not Found`, 79 | }, 80 | }); 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /generated/services/PostThumbControllerService.ts: -------------------------------------------------------------------------------- 1 | /* generated using openapi-typescript-codegen -- do no edit */ 2 | /* istanbul ignore file */ 3 | /* tslint:disable */ 4 | /* eslint-disable */ 5 | import type { BaseResponse_int_ } from '../models/BaseResponse_int_'; 6 | import type { PostThumbAddRequest } from '../models/PostThumbAddRequest'; 7 | 8 | import type { CancelablePromise } from '../core/CancelablePromise'; 9 | import { OpenAPI } from '../core/OpenAPI'; 10 | import { request as __request } from '../core/request'; 11 | 12 | export class PostThumbControllerService { 13 | 14 | /** 15 | * doThumb 16 | * @param postThumbAddRequest postThumbAddRequest 17 | * @returns BaseResponse_int_ OK 18 | * @returns any Created 19 | * @throws ApiError 20 | */ 21 | public static doThumbUsingPost( 22 | postThumbAddRequest: PostThumbAddRequest, 23 | ): CancelablePromise { 24 | return __request(OpenAPI, { 25 | method: 'POST', 26 | url: '/api/post_thumb/', 27 | body: postThumbAddRequest, 28 | errors: { 29 | 401: `Unauthorized`, 30 | 403: `Forbidden`, 31 | 404: `Not Found`, 32 | }, 33 | }); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oj-frontend", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "@bytemd/plugin-gfm": "^1.21.0", 12 | "@bytemd/plugin-highlight": "^1.21.0", 13 | "@bytemd/vue-next": "^1.21.0", 14 | "@chat-ui/vue3": "^1.0.11", 15 | "axios": "^1.4.0", 16 | "core-js": "^3.8.3", 17 | "highlight.js": "^11.8.0", 18 | "moment": "^2.29.4", 19 | "monaco-editor": "^0.41.0", 20 | "monaco-editor-webpack-plugin": "^7.1.0", 21 | "vue": "^3.2.13", 22 | "vue-router": "^4.0.3", 23 | "vuex": "^4.0.0" 24 | }, 25 | "devDependencies": { 26 | "@arco-design/web-vue": "^2.49.2", 27 | "@vue/cli-plugin-babel": "~5.0.0", 28 | "@vue/cli-plugin-router": "~5.0.0", 29 | "@vue/cli-plugin-typescript": "~5.0.0", 30 | "@vue/cli-plugin-vuex": "~5.0.0", 31 | "@vue/cli-service": "~5.0.0", 32 | "openapi-typescript-codegen": "^0.25.0", 33 | "prettier": "^2.4.1", 34 | "tailwindcss": "^3.4.7", 35 | "tippy.js": "^6.3.7", 36 | "typescript": "~4.5.5" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | GinCoder 9 | 21 | 22 | 23 | 26 |
27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 54 | 59 | -------------------------------------------------------------------------------- /src/access/accessEnum.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 权限定义 3 | */ 4 | const ACCESS_ENUM = { 5 | NOT_LOGIN: "notLogin", 6 | USER: "user", 7 | ADMIN: "admin", 8 | }; 9 | 10 | export default ACCESS_ENUM; 11 | -------------------------------------------------------------------------------- /src/access/checkAccess.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 检查权限 (判断当前登录用户是否具有某个权限) 3 | * @param loginUser 当前登录用户 4 | * @param needAccess 需要有的权限 5 | * @return boolean 有无权限 6 | */ 7 | 8 | import ACCESS_ENUM from "./accessEnum"; 9 | 10 | const checkAccess = (loginUser: any, needAccess = ACCESS_ENUM.NOT_LOGIN) => { 11 | // 获取当前登录用户具有的权限(如果没有loginUser,则表示未登录) 12 | const loginUserAccess = loginUser?.userRole ?? ACCESS_ENUM.NOT_LOGIN; 13 | if (needAccess === ACCESS_ENUM.NOT_LOGIN) { 14 | return true; 15 | } 16 | // 如果用户登录才能访问 17 | if (needAccess === ACCESS_ENUM.USER) { 18 | // 如果用户没登陆,那么表示无权限 19 | if (loginUserAccess === ACCESS_ENUM.NOT_LOGIN) { 20 | return false; 21 | } 22 | } 23 | // 如果需要管理员权限 24 | if (needAccess === ACCESS_ENUM.ADMIN) { 25 | // 如果不为管理员,表示无权限 26 | if (loginUserAccess !== ACCESS_ENUM.ADMIN) { 27 | return false; 28 | } 29 | } 30 | return true; 31 | }; 32 | 33 | export default checkAccess; 34 | -------------------------------------------------------------------------------- /src/access/index.ts: -------------------------------------------------------------------------------- 1 | import router from "@/router"; 2 | import store from "@/store"; 3 | import ACCESS_ENUM from "@/access/accessEnum"; 4 | import checkAccess from "./checkAccess"; 5 | 6 | router.beforeEach(async (to, from, next) => { 7 | const user = store.state.user; 8 | let currentUser = user.loginUser; 9 | // 实现自动登录 10 | if (!currentUser || !currentUser.userRole) { 11 | await store.dispatch("user/getLoginUser"); 12 | currentUser = user.loginUser; 13 | } 14 | const needAccess = (to.meta?.access as string) ?? ACCESS_ENUM.NOT_LOGIN; 15 | // 要跳转的页面必须要登录 16 | if (needAccess !== ACCESS_ENUM.NOT_LOGIN) { 17 | // 如果没有登录,则跳出登录弹窗 18 | if ( 19 | !currentUser.userRole || 20 | currentUser.userRole === ACCESS_ENUM.NOT_LOGIN 21 | ) { 22 | store.commit("auth/updateModal", { modelName: "login", value: true }); 23 | next("#"); 24 | return; 25 | } 26 | // 如果已经登录,权限不足则跳转到401页面 27 | if (!checkAccess(currentUser, needAccess)) { 28 | next("/noAuth"); 29 | return; 30 | } 31 | } 32 | next(); 33 | }); 34 | -------------------------------------------------------------------------------- /src/assets/401_images/401.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/src/assets/401_images/401.gif -------------------------------------------------------------------------------- /src/assets/404_images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/src/assets/404_images/404.png -------------------------------------------------------------------------------- /src/assets/404_images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/src/assets/404_images/404_cloud.png -------------------------------------------------------------------------------- /src/assets/config.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | // gitee的client-id 3 | GITEE_APP_ID: "917bb29bb3ed563427cf421d962340d9c1bd70b5b26d9864272e46545a46d06e", 4 | // gitee回调地址 5 | GITEE_REDIRECT_URL: "https://gincode.icu/oauth/login/gitee", 6 | // github的client-id 7 | GITHUB_APP_ID: "b2c062bb2bfe5096a530", 8 | // github回调地址 9 | GITHUB_REDIRECT_URL: "https://gincode.icu/oauth/login/github", 10 | // qq的app-id 11 | QQ_APP_ID: "102095634", 12 | // qq的回调地址 13 | QQ_REDIRECT_URL: "https://www.gincode.icu/oauth/login/qq", 14 | }; -------------------------------------------------------------------------------- /src/assets/icons/album.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/angle-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/angle-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/archives.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/arrow-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/arrow-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/article.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/article_link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/article_share.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/author.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/badge.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/bilibili.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/calendar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/category.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/clock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/comment.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/comments.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/copy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/delete.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/emoji.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/flower.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/friend.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/fun.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/gitee.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/github.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/heart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/heng.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/history.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/home.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/laba.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/like.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/link.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/src/assets/icons/link.cur -------------------------------------------------------------------------------- /src/assets/icons/logout.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/message.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/moon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/normal.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/src/assets/icons/normal.cur -------------------------------------------------------------------------------- /src/assets/icons/plane.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/qizhi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/qq.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/qr_code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/right-arrow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/sun.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/tag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/talk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/top.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/trumpet.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/update.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/upload.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/web.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/zhaoxiang.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/src/assets/logo.ico -------------------------------------------------------------------------------- /src/assets/logo_dark.svg: -------------------------------------------------------------------------------- 1 | 9 | 15 | 21 | 22 | 28 | -------------------------------------------------------------------------------- /src/assets/logo_light.svg: -------------------------------------------------------------------------------- 1 | 9 | 15 | 21 | -------------------------------------------------------------------------------- /src/components/CodeEditor.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /src/components/GlobalHeader.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 71 | 72 | 86 | -------------------------------------------------------------------------------- /src/components/MdViewer.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 61 | 62 | 64 | -------------------------------------------------------------------------------- /src/components/Modals/AuthModal.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 32 | 33 | 44 | -------------------------------------------------------------------------------- /src/components/Oauth/index.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 59 | 60 | -------------------------------------------------------------------------------- /src/components/SvgIcon/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 30 | 31 | -------------------------------------------------------------------------------- /src/components/ViewQuestion/CodeTips.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 50 | 51 | 64 | -------------------------------------------------------------------------------- /src/components/ViewQuestion/ProblemSolve.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 22 | 23 | 39 | -------------------------------------------------------------------------------- /src/components/addQuestion/JudgmentConfig.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/components/comment/ReplyBox.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 85 | 86 | 152 | -------------------------------------------------------------------------------- /src/components/type/Copy.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panther125/GinCoder-frontend/ba99c04b22556208152f5f5eb28705957fdff224/src/components/type/Copy.vue -------------------------------------------------------------------------------- /src/components/type/Loding.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/userAvatar.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 66 | 67 | 86 | -------------------------------------------------------------------------------- /src/config/codeDefault.js: -------------------------------------------------------------------------------- 1 | export const defaultTemplateCode = 2 | "class Solution { \r\n public int addTwoNum(int num1, int num2) {\r\n \r\n } \r\n }\r\n"; 3 | 4 | export const defaultMergeCode = 5 | "import java.util.Scanner; \r\npublic class Main {\r\n public static void main(String[] args) { \r\n Scanner scanner = new Scanner(System.in); \r\n int num1 = scanner.nextInt(); \r\n int num2 = scanner.nextInt(); \r\n Solution solution = new Solution(); \r\n int ret = solution.addTwoNum(num1, num2); \r\n System.out.println(ret); \r\n }\r\n}\r\n"; -------------------------------------------------------------------------------- /src/config/zh_Hans.json: -------------------------------------------------------------------------------- 1 | { 2 | "bold": "粗体", 3 | "boldText": "粗体文本", 4 | "cheatsheet": "Markdown 语法", 5 | "closeHelp": "关闭帮助", 6 | "closeToc": "关闭目录", 7 | "code": "代码", 8 | "codeBlock": "代码块", 9 | "codeLang": "编程语言", 10 | "codeText": "代码", 11 | "exitFullscreen": "退出全屏", 12 | "exitPreviewOnly": "恢复默认", 13 | "exitWriteOnly": "恢复默认", 14 | "fullscreen": "全屏", 15 | "h1": "一级标题", 16 | "h2": "二级标题", 17 | "h3": "三级标题", 18 | "h4": "四级标题", 19 | "h5": "五级标题", 20 | "h6": "六级标题", 21 | "headingText": "标题", 22 | "help": "帮助", 23 | "hr": "分割线", 24 | "image": "图片", 25 | "imageAlt": "alt", 26 | "imageTitle": "图片描述", 27 | "italic": "斜体", 28 | "italicText": "斜体文本", 29 | "limited": "已达最大字符数限制", 30 | "lines": "行数", 31 | "link": "链接", 32 | "linkText": "链接描述", 33 | "ol": "有序列表", 34 | "olItem": "项目", 35 | "preview": "预览", 36 | "previewOnly": "仅预览区", 37 | "quote": "引用", 38 | "quotedText": "引用文本", 39 | "shortcuts": "快捷键", 40 | "source": "源代码", 41 | "sync": "同步滚动", 42 | "toc": "目录", 43 | "top": "回到顶部", 44 | "ul": "无序列表", 45 | "ulItem": "项目", 46 | "words": "字数", 47 | "write": "编辑", 48 | "writeOnly": "仅编辑区" 49 | } -------------------------------------------------------------------------------- /src/constant/codemirrorTheme/default.ts: -------------------------------------------------------------------------------- 1 | export default ` 2 | .bytemd { 3 | background-color: #fff 4 | } 5 | .bytemd-status-right span:hover { 6 | color: #0366d6 7 | } 8 | 9 | .bytemd-toolbar-icon:hover { 10 | background-color: #e1e4e8 11 | } 12 | 13 | .bytemd{ 14 | border: 1px solid #e1e4e8; 15 | } 16 | 17 | .bytemd-status { 18 | border-top: 1px solid #e1e4e8; 19 | } 20 | 21 | .bytemd-status-right { 22 | color: #000 23 | } 24 | .bytemd-status-left { 25 | color: #000 26 | } 27 | 28 | .bytemd-toolbar { 29 | border-bottom: 1px solid #e1e4e8; 30 | } 31 | .bytemd-split .bytemd-preview { 32 | border-left: 1px solid #e1e4e8 33 | } 34 | .cm-s-default .cm-header { 35 | color: #00f 36 | } 37 | 38 | .cm-s-default .cm-quote { 39 | color: #090 40 | } 41 | 42 | .cm-s-default .cm-keyword { 43 | color: #708 44 | } 45 | 46 | .cm-s-default .cm-atom { 47 | color: #219 48 | } 49 | 50 | .cm-s-default .cm-number { 51 | color: #164 52 | } 53 | 54 | .cm-s-default .cm-def { 55 | color: #00f 56 | } 57 | 58 | .cm-s-default .cm-variable-2 { 59 | color: #05a 60 | } 61 | 62 | .cm-s-default .cm-variable-3, .cm-s-default .cm-type { 63 | color: #085 64 | } 65 | 66 | .cm-s-default .cm-comment { 67 | color: #a50 68 | } 69 | 70 | .cm-s-default .cm-string { 71 | color: #a11 72 | } 73 | 74 | .cm-s-default .cm-string-2 { 75 | color: #f50 76 | } 77 | 78 | .cm-s-default .cm-meta, .cm-s-default .cm-qualifier { 79 | color: #555 80 | } 81 | 82 | .cm-s-default .cm-builtin { 83 | color: #30a 84 | } 85 | 86 | .cm-s-default .cm-bracket { 87 | color: #997 88 | } 89 | 90 | .cm-s-default .cm-tag { 91 | color: #170 92 | } 93 | 94 | .cm-s-default .cm-attribute { 95 | color: #00c 96 | } 97 | 98 | .cm-s-default .cm-hr { 99 | color: #999 100 | } 101 | 102 | .cm-s-default .cm-link { 103 | color: #00c 104 | } 105 | 106 | .cm-s-default .cm-error, .cm-invalidchar { 107 | color: red 108 | }`; 109 | -------------------------------------------------------------------------------- /src/constant/codemirrorTheme/monokai.ts: -------------------------------------------------------------------------------- 1 | export default `/* Based on Sublime Text's Monokai theme */ 2 | .bytemd { 3 | background-color: #272822 4 | } 5 | .bytemd-status-right span:hover { 6 | color: #e056fd 7 | } 8 | 9 | .bytemd-toolbar-icon:hover { 10 | background-color: #2d2d2d 11 | } 12 | .bytemd{ 13 | border: 1px solid #3c3c3c; 14 | } 15 | 16 | .bytemd-status { 17 | // background: #272822; 18 | border-top: 1px solid #3c3c3c; 19 | } 20 | 21 | .bytemd-status-right { 22 | color: #fff 23 | } 24 | .bytemd-status-left { 25 | color: #fff 26 | } 27 | 28 | .bytemd-toolbar { 29 | background: #272822; 30 | border-bottom: 1px solid #3c3c3c; 31 | } 32 | .bytemd-split .bytemd-preview { 33 | border-left: 1px solid #3c3c3c 34 | } 35 | .cm-s-default.CodeMirror { 36 | background: #272822; 37 | color: #f8f8f2; 38 | } 39 | 40 | .cm-s-default div.CodeMirror-selected { 41 | background: #49483E; 42 | } 43 | 44 | .cm-s-default .CodeMirror-line::selection, .cm-s-default .CodeMirror-line > span::selection, .cm-s-default .CodeMirror-line > span > span::selection { 45 | background: rgba(73, 72, 62, .99); 46 | } 47 | 48 | .cm-s-default .CodeMirror-line::-moz-selection, .cm-s-default .CodeMirror-line > span::-moz-selection, .cm-s-default .CodeMirror-line > span > span::-moz-selection { 49 | background: rgba(73, 72, 62, .99); 50 | } 51 | 52 | .cm-s-default .CodeMirror-gutters { 53 | background: #272822; 54 | border-right: 0px; 55 | } 56 | 57 | .cm-s-default .CodeMirror-guttermarker { 58 | color: white; 59 | } 60 | 61 | .cm-s-default .CodeMirror-guttermarker-subtle { 62 | color: #d0d0d0; 63 | } 64 | 65 | .cm-s-default .CodeMirror-linenumber { 66 | color: #d0d0d0; 67 | } 68 | 69 | .cm-s-default .CodeMirror-cursor { 70 | border-left: 1px solid #f8f8f0; 71 | } 72 | 73 | .cm-s-default span.cm-comment { 74 | // color: #75715e; 75 | color: #5fc344; 76 | 77 | } 78 | 79 | .cm-s-default span.cm-atom { 80 | color: #ae81ff; 81 | } 82 | 83 | .cm-s-default span.cm-number { 84 | color: #ae81ff; 85 | } 86 | 87 | .cm-s-default span.cm-comment.cm-attribute { 88 | color: #97b757; 89 | } 90 | 91 | .cm-s-default span.cm-comment.cm-def { 92 | color: #bc9262; 93 | } 94 | 95 | .cm-s-default span.cm-comment.cm-tag { 96 | color: #bc6283; 97 | } 98 | 99 | .cm-s-default span.cm-comment.cm-type { 100 | color: #5998a6; 101 | } 102 | 103 | .cm-s-default span.cm-property, .cm-s-default span.cm-attribute { 104 | color: #a6e22e; 105 | } 106 | 107 | .cm-s-default span.cm-keyword { 108 | color: #f92672; 109 | } 110 | 111 | .cm-s-default span.cm-builtin { 112 | color: #66d9ef; 113 | } 114 | 115 | .cm-s-default span.cm-string { 116 | color: #e6db74; 117 | } 118 | 119 | .cm-s-default span.cm-variable { 120 | color: #f8f8f2; 121 | } 122 | 123 | .cm-s-default span.cm-variable-2 { 124 | color: #9effff; 125 | } 126 | 127 | .cm-s-default span.cm-variable-3, .cm-s-default span.cm-type { 128 | color: #66d9ef; 129 | } 130 | 131 | .cm-s-default span.cm-def { 132 | color: #fd971f; 133 | } 134 | 135 | .cm-s-default span.cm-bracket { 136 | color: #f8f8f2; 137 | } 138 | 139 | .cm-s-default span.cm-tag { 140 | color: #f92672; 141 | } 142 | 143 | .cm-s-default span.cm-header { 144 | color: #ae81ff; 145 | } 146 | 147 | .cm-s-default span.cm-link { 148 | color: #ae81ff; 149 | } 150 | 151 | .cm-s-default span.cm-error { 152 | background: #f92672; 153 | color: #f8f8f0; 154 | } 155 | 156 | .cm-s-default .CodeMirror-activeline-background { 157 | background: #373831; 158 | } 159 | 160 | .cm-s-default .CodeMirror-matchingbracket { 161 | text-decoration: underline; 162 | color: white !important; 163 | }`; 164 | -------------------------------------------------------------------------------- /src/layouts/QuestionLayout.vue: -------------------------------------------------------------------------------- 1 | 11 | 14 | 15 | 44 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from "vue"; 2 | import App from "./App.vue"; 3 | import SvgIcon from "@/components/SvgIcon/index.vue"; 4 | import ArcoVue from "@arco-design/web-vue"; 5 | import "@arco-design/web-vue/dist/arco.css"; 6 | import ArcoVueIcon from "@arco-design/web-vue/es/icon"; 7 | import router from "./router"; 8 | import store from "./store"; 9 | import "@/plugins/axios"; 10 | import "@/access"; 11 | import "bytemd/dist/index.css"; 12 | 13 | 14 | const app = createApp(App); 15 | app.use(ArcoVue); 16 | app.use(ArcoVueIcon); 17 | app.use(store); 18 | app.use(router); 19 | app.component("svg-icon", SvgIcon); 20 | app.mount("#app"); 21 | -------------------------------------------------------------------------------- /src/plugins/axios.ts: -------------------------------------------------------------------------------- 1 | // Add a request interceptor 2 | import axios from "axios"; 3 | import { OpenAPI } from "../../generated"; 4 | 5 | axios.defaults.withCredentials = true; 6 | 7 | axios.interceptors.request.use( 8 | function (config) { 9 | // 生成随机值 10 | // const userID = localStorage.getItem("Authorization"); 11 | // config.headers.none = "" + Math.random(); 12 | // config.headers.Authorization = userID; 13 | return config; 14 | }, 15 | function (error) { 16 | // Do something with request error 17 | return Promise.reject(error); 18 | } 19 | ); 20 | 21 | // Add a response interceptor 22 | axios.interceptors.response.use( 23 | function (response) { 24 | // Any status code that lie within the range of 2xx cause this function to trigger 25 | // Do something with response data 26 | return response; 27 | }, 28 | function (error) { 29 | // Any status codes that falls outside the range of 2xx cause this function to trigger 30 | // Do something with response error 31 | return Promise.reject(error); 32 | } 33 | ); 34 | 35 | // 携带凭证 36 | OpenAPI.WITH_CREDENTIALS = true; 37 | const baseUrl ="http://localhost:9001"; 38 | // const baseUrl ="https://gincode.icu"; 39 | 40 | OpenAPI.BASE = baseUrl; 41 | // console.log("当前环境:", process.env.NODE_ENV, "请求地址", baseUrl); 42 | -------------------------------------------------------------------------------- /src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from "vue-router"; 2 | import { routes } from "./routes"; 3 | 4 | const router = createRouter({ 5 | history: createWebHistory(process.env.BASE_URL), 6 | routes, 7 | }); 8 | 9 | export default router; 10 | -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue' 4 | const component: DefineComponent<{}, {}, any> 5 | export default component 6 | } 7 | 8 | declare module "@"; -------------------------------------------------------------------------------- /src/store/addQuestion.ts: -------------------------------------------------------------------------------- 1 | import { StoreOptions } from "vuex"; 2 | 3 | // initial state 4 | export default { 5 | namespaced: true, 6 | state: { 7 | drawerVisible: false, 8 | }, 9 | actions: {}, 10 | mutations: { 11 | showDrawerVisible(state, payload) { 12 | state.drawerVisible = payload; 13 | }, 14 | }, 15 | } as StoreOptions; 16 | -------------------------------------------------------------------------------- /src/store/auth.ts: -------------------------------------------------------------------------------- 1 | import { StoreOptions } from "vuex"; 2 | 3 | // initial state 4 | export default { 5 | namespaced: true, 6 | state: { 7 | modals: {}, // 弹窗状态存储在modals对象中 8 | }, 9 | actions: { 10 | toggleLogin({ commit }) { 11 | commit("toggleModals", { 12 | login: true, 13 | signup: false, 14 | }); 15 | }, 16 | toggleSignUp({ commit }) { 17 | commit("toggleModals", { 18 | login: false, 19 | signup: true, 20 | }); 21 | }, 22 | }, 23 | mutations: { 24 | updateModal(state, { modelName, value }) { 25 | state.modals[modelName] = value; 26 | }, 27 | clearModal(state) { 28 | state.modals = {}; 29 | }, 30 | toggleModals(state, { login, signup }) { 31 | state.modals.login = login; 32 | state.modals.signup = signup; 33 | }, 34 | }, 35 | } as StoreOptions; 36 | -------------------------------------------------------------------------------- /src/store/code.ts: -------------------------------------------------------------------------------- 1 | import { StoreOptions } from "vuex"; 2 | 3 | // initial state 4 | export default { 5 | namespaced: true, 6 | state: { 7 | codePatterns: localStorage.getItem("codePatterns") 8 | ? localStorage.getItem("codePatterns") 9 | : "1", 10 | }, 11 | actions: {}, 12 | mutations: { 13 | // 修改代码模式,并将模式存入localStorage 14 | changePatterns(state, code) { 15 | state.codePatterns = code.codePatterns; 16 | localStorage.setItem("codePatterns", code.codePatterns); 17 | }, 18 | }, 19 | } as StoreOptions; 20 | -------------------------------------------------------------------------------- /src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from "vuex"; 2 | import user from "./user"; 3 | import auth from "./auth"; 4 | import loading from "./loading"; 5 | import questionDrawer from "./addQuestion"; 6 | import theme from "./theme"; 7 | import code from "./code"; 8 | 9 | export default createStore({ 10 | mutations: {}, 11 | actions: {}, 12 | modules: { 13 | user, 14 | auth, 15 | loading, 16 | questionDrawer, 17 | theme, 18 | code, 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /src/store/loading.ts: -------------------------------------------------------------------------------- 1 | import { StoreOptions } from "vuex"; 2 | 3 | // initial state 4 | export default { 5 | namespaced: true, 6 | state: { 7 | loading: false, 8 | }, 9 | actions: {}, 10 | mutations: { 11 | showLoading(state, payload) { 12 | state.loading = payload; 13 | }, 14 | }, 15 | } as StoreOptions; 16 | -------------------------------------------------------------------------------- /src/store/theme.ts: -------------------------------------------------------------------------------- 1 | import { StoreOptions } from "vuex"; 2 | 3 | // initial state 4 | export default { 5 | namespaced: true, 6 | state: { 7 | theme: "light", 8 | }, 9 | actions: {}, 10 | mutations: { 11 | toggleTheme(state, payload) { 12 | state.theme = payload; 13 | }, 14 | }, 15 | } as StoreOptions; 16 | -------------------------------------------------------------------------------- /src/store/user.ts: -------------------------------------------------------------------------------- 1 | import { StoreOptions } from "vuex"; 2 | import ACCESS_ENUM from "@/access/accessEnum"; 3 | import { UserControllerService } from "../../generated"; 4 | 5 | // initial state 6 | export default { 7 | namespaced: true, 8 | state: { 9 | loginUser: { 10 | userName: "未登录", 11 | }, 12 | }, 13 | actions: { 14 | async getLoginUser({ commit, state }, payload) { 15 | // 从远程请求获取登录信息 16 | const res = await UserControllerService.getLoginUserUsingGet(); 17 | if (res.code === 0) { 18 | commit("updateUser", res.data); 19 | } else { 20 | commit("updateUser", { 21 | ...state.loginUser, 22 | userRole: ACCESS_ENUM.NOT_LOGIN, 23 | }); 24 | } 25 | }, 26 | }, 27 | mutations: { 28 | updateUser(state, payload) { 29 | state.loginUser = payload; 30 | }, 31 | }, 32 | } as StoreOptions; 33 | -------------------------------------------------------------------------------- /src/utils/date.ts: -------------------------------------------------------------------------------- 1 | import dayjs from "dayjs"; 2 | 3 | export function formatDate(date: string | Date, format = "YYYY-MM-DD") { 4 | return dayjs(date).format(format); 5 | } 6 | 7 | export function formatDateTime(date: string | Date, format = "YYYY-MM-DD HH:mm:ss") { 8 | return formatDate(date, format); 9 | } 10 | -------------------------------------------------------------------------------- /src/utils/tv.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | "[tv_白眼]": "https://static.ttkwsd.top/emoji/tvby.png", 3 | "[tv_doge]": "https://static.ttkwsd.top/emoji/tvdoge.png", 4 | "[tv_坏笑]": "https://static.ttkwsd.top/emoji/tvhx.png", 5 | "[tv_难过]": "https://static.ttkwsd.top/emoji/tvng.png", 6 | "[tv_生气]": "https://static.ttkwsd.top/emoji/tvsq.png", 7 | "[tv_委屈]": "https://static.ttkwsd.top/emoji/tvwq.png", 8 | "[tv_斜眼笑]": "https://static.ttkwsd.top/emoji/tvxyx.png", 9 | "[tv_呆]": "https://static.ttkwsd.top/emoji/tvd.png", 10 | "[tv_发怒]": "https://static.ttkwsd.top/emoji/tvfn.png", 11 | "[tv_惊吓]": "https://static.ttkwsd.top/emoji/tvjx.png", 12 | "[tv_呕吐]": "https://static.ttkwsd.top/emoji/tvot.png", 13 | "[tv_思考]": "https://static.ttkwsd.top/emoji/tvsk.png", 14 | "[tv_微笑]": "https://static.ttkwsd.top/emoji/tvwx.png", 15 | "[tv_疑问]": "https://static.ttkwsd.top/emoji/tvyw.png", 16 | "[tv_大哭]": "https://static.ttkwsd.top/emoji/tvdk.png", 17 | "[tv_鼓掌]": "https://static.ttkwsd.top/emoji/tvgz.png", 18 | "[tv_抠鼻]": "https://static.ttkwsd.top/emoji/tvkb.png", 19 | "[tv_亲亲]": "https://static.ttkwsd.top/emoji/tvqq.png", 20 | "[tv_调皮]": "https://static.ttkwsd.top/emoji/tvtp.png", 21 | "[tv_笑哭]": "https://static.ttkwsd.top/emoji/tvxk.png", 22 | "[tv_晕]": "https://static.ttkwsd.top/emoji/tvy.png", 23 | "[tv_点赞]": "https://static.ttkwsd.top/emoji/tvdz.png", 24 | "[tv_害羞]": "https://static.ttkwsd.top/emoji/tvhaixiu.png", 25 | "[tv_睡着]": "https://static.ttkwsd.top/emoji/tvsz.png", 26 | "[tv_色]": "https://static.ttkwsd.top/emoji/tvse.png", 27 | "[tv_吐血]": "https://static.ttkwsd.top/emoji/tvtx.png", 28 | "[tv_无奈]": "https://static.ttkwsd.top/emoji/tvwn.png", 29 | "[tv_再见]": "https://static.ttkwsd.top/emoji/tvzj.png", 30 | "[tv_流汗]": "https://static.ttkwsd.top/emoji/tvlh.png", 31 | "[tv_偷笑]": "https://static.ttkwsd.top/emoji/tvtouxiao.png", 32 | "[tv_抓狂]": "https://static.ttkwsd.top/emoji/tvzk.png", 33 | "[tv_黑人问号]": "https://static.ttkwsd.top/emoji/tvhrwh.png", 34 | "[tv_困]": "https://static.ttkwsd.top/emoji/tvkun.png", 35 | "[tv_打脸]": "https://static.ttkwsd.top/emoji/tvdl.png", 36 | "[tv_闭嘴]": "https://static.ttkwsd.top/emoji/tvbz.png", 37 | "[tv_鄙视]": "https://static.ttkwsd.top/emoji/tvbs.png", 38 | "[tv_腼腆]": "https://static.ttkwsd.top/emoji/tvmt.png", 39 | "[tv_馋]": "https://static.ttkwsd.top/emoji/tvchan.png", 40 | "[tv_可爱]": "https://static.ttkwsd.top/emoji/tvka.png", 41 | "[tv_发财]": "https://static.ttkwsd.top/emoji/tvfc.png", 42 | "[tv_生病]": "https://static.ttkwsd.top/emoji/tvsb.png", 43 | "[tv_流鼻血]": "https://static.ttkwsd.top/emoji/tvlbx.png", 44 | "[tv_尴尬]": "https://static.ttkwsd.top/emoji/tvgg.png", 45 | "[tv_大佬]": "https://static.ttkwsd.top/emoji/tvdalao.png", 46 | "[tv_流泪]": "https://static.ttkwsd.top/emoji/tvliulei.png", 47 | "[tv_冷漠]": "https://static.ttkwsd.top/emoji/tvlm.png", 48 | "[tv_皱眉]": "https://static.ttkwsd.top/emoji/tvzm.png", 49 | "[tv_鬼脸]": "https://static.ttkwsd.top/emoji/tvgl.png", 50 | "[tv_调侃]": "https://static.ttkwsd.top/emoji/tvtk.png", 51 | "[tv_目瞪口呆]": "https://static.ttkwsd.top/emoji/tvmdkd.png", 52 | }; 53 | -------------------------------------------------------------------------------- /src/utils/useCurrentInstance.ts: -------------------------------------------------------------------------------- 1 | import { ComponentInternalInstance, getCurrentInstance } from "vue"; 2 | export default function useCurrentInstance() { 3 | const { appContext } = getCurrentInstance() as ComponentInternalInstance; 4 | const proxy = appContext.config.globalProperties; 5 | return { 6 | proxy, 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /src/views/About.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 40 | 41 | 61 | -------------------------------------------------------------------------------- /src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 26 | 27 | 91 | -------------------------------------------------------------------------------- /src/views/Rank.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 144 | 145 | -------------------------------------------------------------------------------- /src/views/error/401.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 46 | 47 | 96 | -------------------------------------------------------------------------------- /src/views/post/viewPostView.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 53 | 59 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/views/chatView.{vue,js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [require("@tailwindcss/typography")], 8 | }; -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "esnext", 5 | "strict": true, 6 | "jsx": "preserve", 7 | "moduleResolution": "node", 8 | "skipLibCheck": true, 9 | "esModuleInterop": true, 10 | "allowSyntheticDefaultImports": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "useDefineForClassFields": true, 13 | "resolveJsonModule": true, 14 | "sourceMap": true, 15 | "allowJs": true, 16 | "baseUrl": ".", 17 | "outDir": "./dist", 18 | "types": [ 19 | "webpack-env" 20 | ], 21 | "paths": { 22 | "@/*": [ 23 | "src/*" 24 | ] 25 | }, 26 | "lib": [ 27 | "esnext", 28 | "dom", 29 | "dom.iterable", 30 | "scripthost" 31 | ] 32 | }, 33 | "include": [ 34 | "src/**/*.ts", 35 | "src/**/*.tsx", 36 | "src/**/*.vue", 37 | "tests/**/*.ts", 38 | "tests/**/*.tsx" 39 | ], 40 | "exclude": [ 41 | "node_modules" 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require("@vue/cli-service"); 2 | const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); 3 | module.exports = defineConfig({ 4 | transpileDependencies: true, 5 | chainWebpack(config) { 6 | config.plugin("monaco").use(new MonacoWebpackPlugin({})); 7 | }, 8 | }); 9 | --------------------------------------------------------------------------------