更新排序和页面

pull/361/head
HXY 2 years ago
parent 6d15279393
commit 679d0e401f

@ -103,7 +103,7 @@ func (s *meiliTweetSearchServant) queryByContent(user *core.User, q *core.QueryR
request := &meilisearch.SearchRequest{ request := &meilisearch.SearchRequest{
Offset: int64(offset), Offset: int64(offset),
Limit: int64(limit), Limit: int64(limit),
Sort: []string{"is_top:desc", "latest_replied_on:desc"}, Sort: []string{"is_top:desc", "-upvote_count", "-collection_count", "latest_replied_on:desc"},
} }
filter := s.filterList(user) filter := s.filterList(user)

@ -101,7 +101,7 @@ func (s *zincTweetSearchServant) queryByContent(user *core.User, q *core.QueryRe
"content": q.Query, "content": q.Query,
}, },
}, },
"sort": []string{"-is_top", "-latest_replied_on"}, "sort": []string{"is_top:desc", "-upvote_count", "-collection_count", "-latest_replied_on"},
"from": offset, "from": offset,
"size": limit, "size": limit,
}) })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 45 KiB

@ -242,7 +242,7 @@ export const deleteCommentReply = (
}); });
}; };
/** 置顶/取消置顶题 */ /** 置顶/取消置顶题 */
export const stickTopic = ( export const stickTopic = (
data: NetParams.PostStickTopic data: NetParams.PostStickTopic
): Promise<NetReq.PostStickTopic> => { ): Promise<NetReq.PostStickTopic> => {
@ -253,7 +253,7 @@ export const stickTopic = (
}); });
}; };
/** 关注题 */ /** 关注题 */
export const followTopic = ( export const followTopic = (
data: NetParams.PostFollowTopic data: NetParams.PostFollowTopic
): Promise<NetReq.PostFollowTopic> => { ): Promise<NetReq.PostFollowTopic> => {
@ -264,7 +264,7 @@ export const followTopic = (
}); });
}; };
/** 取消关注题 */ /** 取消关注题 */
export const unfollowTopic = ( export const unfollowTopic = (
data: NetParams.PostUnfollowTopic data: NetParams.PostUnfollowTopic
): Promise<NetReq.PostUnfollowTopic> => { ): Promise<NetReq.PostUnfollowTopic> => {

@ -1,6 +1,6 @@
:root { :root {
// 如果要变更中间栏的大小,修改此处即可 // 如果要变更中间栏的大小,修改此处即可
--content-main: 600px; --content-main: 910px;
} }
.app-container { .app-container {

@ -140,7 +140,7 @@ const doClickText = (e: MouseEvent, id: number | string) => {
if (d.length === 2) { if (d.length === 2) {
store.commit('refresh'); store.commit('refresh');
if (d[0] === 'tag') { if (d[0] === 'tag') {
window.$message.warning(''); window.$message.warning('');
} else { } else {
router.push({ router.push({
name: 'user', name: 'user',

@ -13,7 +13,7 @@
</template> </template>
</n-input> </n-input>
</div> </div>
<n-card v-if="showFollowTopics" class="hottopic-wrap" title="关注题" embedded :bordered="false" size="small"> <n-card v-if="showFollowTopics" class="hottopic-wrap" title="关注题" embedded :bordered="false" size="small">
<n-spin :show="loading"> <n-spin :show="loading">
<div class="hot-tag-item" v-for="tag in followTags" :key="tag.id"> <div class="hot-tag-item" v-for="tag in followTags" :key="tag.id">
<router-link <router-link
@ -35,7 +35,7 @@
</div> </div>
</n-spin> </n-spin>
</n-card> </n-card>
<n-card class="hottopic-wrap" title="热门题" embedded :bordered="false" size="small"> <n-card class="hottopic-wrap" title="热门题" embedded :bordered="false" size="small">
<n-spin :show="loading"> <n-spin :show="loading">
<div class="hot-tag-item" v-for="tag in hotTags" :key="tag.id"> <div class="hot-tag-item" v-for="tag in hotTags" :key="tag.id">
<router-link <router-link

@ -156,7 +156,7 @@ const menuOptions = computed(() => {
href: '/profile', href: '/profile',
}); });
options.push({ options.push({
label: '', label: '',
key: 'messages', key: 'messages',
icon: () => h(ChatbubblesOutline), icon: () => h(ChatbubblesOutline),
href: '/messages', href: '/messages',

@ -14,7 +14,7 @@ const routes = [
path: '/post', path: '/post',
name: 'post', name: 'post',
meta: { meta: {
title: '题详情', title: '题详情',
}, },
component: () => import('@/views/Post.vue'), component: () => import('@/views/Post.vue'),
}, },
@ -22,7 +22,7 @@ const routes = [
path: '/topic', path: '/topic',
name: 'topic', name: 'topic',
meta: { meta: {
title: '题', title: '题',
}, },
component: () => import('@/views/Topic.vue'), component: () => import('@/views/Topic.vue'),
}, },
@ -30,7 +30,7 @@ const routes = [
path: '/anouncement', path: '/anouncement',
name: 'anouncement', name: 'anouncement',
meta: { meta: {
title: '公告', title: '排行榜',
}, },
component: () => import('@/views/Anouncement.vue'), component: () => import('@/views/Anouncement.vue'),
}, },
@ -38,7 +38,7 @@ const routes = [
path: '/profile', path: '/profile',
name: 'profile', name: 'profile',
meta: { meta: {
title: '主页', title: '我的贴子',
}, },
component: () => import('@/views/Profile.vue'), component: () => import('@/views/Profile.vue'),
}, },
@ -78,7 +78,7 @@ const routes = [
path: '/wallet', path: '/wallet',
name: 'wallet', name: 'wallet',
meta: { meta: {
title: '钱包', title: '订阅',
}, },
component: () => import('@/views/Wallet.vue'), component: () => import('@/views/Wallet.vue'),
}, },
@ -86,7 +86,7 @@ const routes = [
path: '/setting', path: '/setting',
name: 'setting', name: 'setting',
meta: { meta: {
title: '设置', title: '个人中心',
}, },
component: () => import('@/views/Setting.vue'), component: () => import('@/views/Setting.vue'),
}, },

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<main-nav title="公告" /> <main-nav title="排行榜" />
<n-list class="main-content-wrap" bordered> <n-list class="main-content-wrap" bordered>

@ -55,7 +55,7 @@ const page = ref(+(route.query.p as string) || 1);
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(0); const totalPage = ref(0);
const title = computed(() => { const title = computed(() => {
let t = 'Aimo Community'; let t = 'Aimo';
if (route.query && route.query.q) { if (route.query && route.query.q) {
if (route.query.t && route.query.t === 'tag') { if (route.query.t && route.query.t === 'tag') {

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<main-nav title="主页" /> <main-nav title="我的贴子" />
<n-list <n-list
class="main-content-wrap profile-wrap" class="main-content-wrap profile-wrap"

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<main-nav title="设置" theme /> <main-nav title="个人中心" theme />
<n-card title="基本信息" size="small" class="setting-card"> <n-card title="基本信息" size="small" class="setting-card">
<div class="base-line avatar"> <div class="base-line avatar">
<n-avatar <n-avatar

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<main-nav title="题" /> <main-nav title="题" />
<n-list class="main-content-wrap tags-wrap" bordered> <n-list class="main-content-wrap tags-wrap" bordered>
<n-tabs type="line" animated @update:value="changeTab"> <n-tabs type="line" animated @update:value="changeTab">

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<main-nav title="钱包" /> <main-nav title="订阅" />
<n-list class="main-content-wrap" bordered> <n-list class="main-content-wrap" bordered>
<div class="balance-wrap"> <div class="balance-wrap">

Loading…
Cancel
Save