Skip to content

Commit 5d03043

Browse files
committed
refactor/重构部分前端文件
1 parent 783d04f commit 5d03043

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

pai-coding-front/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<title>
5-
编程汇
5+
小灰飞~编程汇
66
</title>
77
<meta name="baidu-site-verification" content="codeva-mbGuu7l4Q1" />
88
<meta

pai-coding-front/src/components/article/ArticleCard.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ import {doGet} from "@/http/BackendRequests";
149149
import type {CommonResponse} from "@/http/ResponseTypes/CommonResponseType";
150150
import {ARTICLE_COLUMN_RELATION_URL} from "@/http/URL";
151151
import {messageTip} from "@/util/utils";
152-
import {useArticleInfoStore} from "@/stores/articleInfo";
153152
154-
const articleInfoStore = useArticleInfoStore()
155153
const router = useRouter()
156154
157155
const props = defineProps<{
@@ -163,7 +161,6 @@ const clickArticle = () =>{
163161
if(props.article.articleType === ArticleTypeNumberEnum.COLUMN){
164162
doGet<CommonResponse>(`${ARTICLE_COLUMN_RELATION_URL}/${props.article.articleId}`).then(res=>{
165163
router.push(`/column/${res.data.result.columnId}/${res.data.result.section}`)
166-
articleInfoStore.setArticleId(res.data.result.articleId)
167164
}).catch(err=>{
168165
messageTip("获取专栏信息失败", "error")
169166
console.log(err)

pai-coding-front/src/constants/ArticleTypeEnumConstants.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,14 @@ export enum ArticleTypeEnum{
1515
// 专栏文章
1616
COLUMN = 'COLUMN',
1717
}
18+
19+
export enum ArticleTypeNumberEnum {
20+
// 空文章
21+
EMPTY = 0,
22+
// 博文
23+
BLOG = 1,
24+
// 问答
25+
ANSWER = 2,
26+
// 专栏文章
27+
COLUMN = 3,
28+
}

pai-coding-front/src/stores/global.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// src/stores/global.ts
22
import { defineStore } from 'pinia';
3-
import axios from 'axios';
4-
import { doGet } from '@/http/BackendRequests';
53
import { GLOBAL_STORE } from '@/constants/StoreConstants'
64
import { defaultGlobalResponse, type GlobalResponse } from '@/http/ResponseTypes/CommonResponseType'
75

0 commit comments

Comments
 (0)