+
+
+
+
+
+ #{{ tag.tag }}
+
+ ({{ tag.quote_num }})
+ ({{ tag.quote_num }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/src/store/index.ts b/web/src/store/index.ts
index f0268f9c..60195adc 100644
--- a/web/src/store/index.ts
+++ b/web/src/store/index.ts
@@ -11,6 +11,7 @@ export default createStore({
desktopModelShow: document.body.clientWidth > 821,
authModalShow: false,
authModelTab: "signin",
+ userLogined: false,
userInfo: {
id: 0,
username: "",
@@ -40,10 +41,14 @@ export default createStore({
},
updateUserinfo(state, data) {
state.userInfo = data;
+ if (state.userInfo.id > 0) {
+ state.userLogined = true;
+ }
},
userLogout(state) {
localStorage.removeItem("PAOPAO_TOKEN");
state.userInfo = { id: 0, nickname: "", username: "" };
+ state.userLogined = false;
},
},
actions: {},
diff --git a/web/src/types/Item.d.ts b/web/src/types/Item.d.ts
index 2228e1a1..dde29899 100644
--- a/web/src/types/Item.d.ts
+++ b/web/src/types/Item.d.ts
@@ -290,6 +290,8 @@ declare module Item {
modified_on?: number;
/** 删除时间 */
deleted_on?: number;
+ /** 是否关注:0为未关注,1为已关注 */
+ is_following?: 0 | 1;
/** 是否删除:0为未删除,1为已删除 */
is_del?: 0 | 1;
}
diff --git a/web/src/types/NetParams.d.ts b/web/src/types/NetParams.d.ts
index 95e23e54..017f95ec 100644
--- a/web/src/types/NetParams.d.ts
+++ b/web/src/types/NetParams.d.ts
@@ -165,7 +165,7 @@ declare module NetParams {
}
interface PostGetTags {
- type: "hot" | "new";
+ type: "hot" | "new" | "follow" | "hot_extral";
num: number;
}
diff --git a/web/src/types/NetReq.d.ts b/web/src/types/NetReq.d.ts
index b317c587..1e7def92 100644
--- a/web/src/types/NetReq.d.ts
+++ b/web/src/types/NetReq.d.ts
@@ -1,197 +1,172 @@
declare module NetReq {
+ interface AuthUserLogin {
+ token: string;
+ }
- interface AuthUserLogin {
- token: string
- }
+ interface AuthUserRegister {
+ /** 用户UID */
+ id: number;
+ /** 用户名 */
+ username: string;
+ }
- interface AuthUserRegister {
- /** 用户UID */
- id: number,
- /** 用户名 */
- username: string
- }
+ type AuthUserInfo = Item.UserInfo;
- type AuthUserInfo = Item.UserInfo
+ interface AuthUpdateUserPassword {}
- interface AuthUpdateUserPassword {
+ interface UserGetCollections {
+ /** 帖子列表 */
+ list: Item.PostProps[];
+ /** 页码信息 */
+ pager: Item.PagerProps;
+ }
- }
+ interface UserGetSuggestUsers {
+ suggest: string[];
+ }
- interface UserGetCollections {
- /** 帖子列表 */
- list: Item.PostProps[],
- /** 页码信息 */
- pager: Item.PagerProps
- }
+ interface UserGetSuggestTags {
+ suggest: string[];
+ }
- interface UserGetSuggestUsers {
- suggest: string[]
- }
+ interface UserPrecheckAttachment {
+ paid: number;
+ }
- interface UserGetSuggestTags {
- suggest: string[]
- }
+ interface UserGetAttachment {
+ signed_url: string;
+ }
- interface UserPrecheckAttachment {
- paid: number
- }
+ interface UserGetUnreadMsgCount {
+ count: number;
+ }
- interface UserGetAttachment {
- signed_url: string
- }
+ interface UserGetMessages {
+ /** 消息列表 */
+ list: Item.MessageProps[];
+ /** 页码信息 */
+ pager: Item.PagerProps;
+ }
+
+ interface UserGetUserPosts {
+ /** 帖子列表 */
+ list: Item.PostProps[];
+ /** 页码信息 */
+ pager: Item.PagerProps;
+ }
- interface UserGetUnreadMsgCount {
- count: number
- }
+ type UserGetUserProfile = Item.UserInfo;
- interface UserGetMessages {
- /** 消息列表 */
- list: Item.MessageProps[],
- /** 页码信息 */
- pager: Item.PagerProps
- }
+ interface UserGetBills {
+ list: Item.BillProps[];
+ /** 页码信息 */
+ pager: Item.PagerProps;
+ }
- interface UserGetUserPosts {
- /** 帖子列表 */
- list: Item.PostProps[],
- /** 页码信息 */
- pager: Item.PagerProps
- }
+ interface UserReqRecharge {
+ id: number;
+ pay: string;
+ }
- type UserGetUserProfile = Item.UserInfo
+ interface UserGetRecharge {
+ status: string;
+ }
- interface UserGetBills {
- list: Item.BillProps[],
- /** 页码信息 */
- pager: Item.PagerProps
- }
+ interface UserBindUserPhone {}
- interface UserReqRecharge {
- id: number,
- pay: string
- }
+ interface UserGetCaptcha {
+ id: string;
+ /** 头像图片 base64 */
+ b64s: string;
+ }
- interface UserGetRecharge {
- status: string
- }
+ interface UserChangeNickname {}
- interface UserBindUserPhone {
+ interface UserChangePassword {}
- }
+ interface UserChangeStatus {}
- interface UserGetCaptcha {
- id: string,
- /** 头像图片 base64 */
- b64s: string
- }
+ interface AddFriend {}
- interface UserChangeNickname {
+ interface DeleteFriend {}
- }
+ interface GetContacts {
+ contacts: Item.ContactsItemProps;
+ total: number;
+ }
- interface UserChangePassword {
+ interface RejectFriend {}
- }
+ interface RequestingFriend {}
- interface UserChangeStatus {
+ type PostGetPost = Item.PostProps;
- }
+ interface PostGetPosts {
+ /** 帖子列表 */
+ list: Item.PostProps[];
+ /** 页码信息 */
+ pager: Item.PagerProps;
+ }
- interface AddFriend {
+ interface PostLockPost {
+ /** 锁定状态:0为未锁定,1为锁定 */
+ lock_status: 0 | 1;
+ }
- }
+ interface PostStickPost {
+ /** 置顶状态:0为未置顶,1为置顶 */
+ top_status: 0 | 1;
+ }
- interface DeleteFriend {
+ interface PostVisibilityPost {
+ /** 可见性:0为公开,1为私密,2为好友可见 */
+ visibility_status: import("@/utils/IEnum").VisibilityEnum;
+ }
- }
+ interface PostGetPostStar {
+ status: boolean;
+ }
- interface GetContacts {
- contacts: Item.ContactsItemProps,
- total: number
- }
+ interface PostPostStar {
+ status: boolean;
+ }
- interface RejectFriend {
+ interface PostGetPostCollection {
+ status: boolean;
+ }
- }
+ interface PostPostCollection {
+ status: boolean;
+ }
- interface RequestingFriend {
+ interface PostGetTags {
+ topics: Item.TagProps[];
+ extral_topics: Item.TagProps[];
+ }
- }
+ interface PostGetPostComments {
+ /** 评论列表 */
+ list: Item.CommentProps[];
+ /** 页码信息 */
+ pager: Item.PagerProps;
+ }
- type PostGetPost = Item.PostProps
+ type PostCreatePost = Item.PostProps;
- interface PostGetPosts {
- /** 帖子列表 */
- list: Item.PostProps[],
- /** 页码信息 */
- pager: Item.PagerProps
- }
+ interface PostDeletePost {}
- interface PostLockPost {
- /** 锁定状态:0为未锁定,1为锁定 */
- lock_status: 0 | 1
- }
+ type PostCreateComment = Item.CommentProps;
- interface PostStickPost {
- /** 置顶状态:0为未置顶,1为置顶 */
- top_status: 0 | 1
- }
+ interface PostDeleteComment {}
- interface PostVisibilityPost {
- /** 可见性:0为公开,1为私密,2为好友可见 */
- visibility_status: import('@/utils/IEnum').VisibilityEnum
- }
+ type PostCreateCommentReply = Item.ReplyProps;
- interface PostGetPostStar {
- status: boolean
- }
-
- interface PostPostStar {
- status: boolean
- }
-
- interface PostGetPostCollection {
- status: boolean
- }
-
- interface PostPostCollection {
- status: boolean
- }
-
- interface PostGetTags {
- topics: Item.TagProps[]
- }
-
- interface PostGetPostComments {
- /** 评论列表 */
- list: Item.CommentProps[],
- /** 页码信息 */
- pager: Item.PagerProps
- }
-
- type PostCreatePost = Item.PostProps
-
- interface PostDeletePost {
-
- }
-
- type PostCreateComment = Item.CommentProps
-
- interface PostDeleteComment {
-
- }
-
- type PostCreateCommentReply = Item.ReplyProps
-
- interface PostDeleteCommentReply {
-
- }
-
- interface GetContacts {
- /** 评论列表 */
- list: Item.ContactItemProps[],
- /** 页码信息 */
- pager: Item.PagerProps
- }
+ interface PostDeleteCommentReply {}
+ interface GetContacts {
+ /** 评论列表 */
+ list: Item.ContactItemProps[];
+ /** 页码信息 */
+ pager: Item.PagerProps;
+ }
}
diff --git a/web/src/views/Topic.vue b/web/src/views/Topic.vue
index 9da25620..35d60b75 100644
--- a/web/src/views/Topic.vue
+++ b/web/src/views/Topic.vue
@@ -6,33 +6,17 @@
+
-
-
- #{{ tag.tag }}
-
- ({{ tag.quote_num }})
-
-
-
-
+
@@ -40,11 +24,13 @@