更新排序和页面

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{
Offset: int64(offset),
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)

@ -101,7 +101,7 @@ func (s *zincTweetSearchServant) queryByContent(user *core.User, q *core.QueryRe
"content": q.Query,
},
},
"sort": []string{"-is_top", "-latest_replied_on"},
"sort": []string{"is_top:desc", "-upvote_count", "-collection_count", "-latest_replied_on"},
"from": offset,
"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 = (
data: NetParams.PostStickTopic
): Promise<NetReq.PostStickTopic> => {
@ -253,7 +253,7 @@ export const stickTopic = (
});
};
/** 关注题 */
/** 关注题 */
export const followTopic = (
data: NetParams.PostFollowTopic
): Promise<NetReq.PostFollowTopic> => {
@ -264,7 +264,7 @@ export const followTopic = (
});
};
/** 取消关注题 */
/** 取消关注题 */
export const unfollowTopic = (
data: NetParams.PostUnfollowTopic
): Promise<NetReq.PostUnfollowTopic> => {

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

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

@ -13,7 +13,7 @@
</template>
</n-input>
</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">
<div class="hot-tag-item" v-for="tag in followTags" :key="tag.id">
<router-link
@ -35,7 +35,7 @@
</div>
</n-spin>
</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">
<div class="hot-tag-item" v-for="tag in hotTags" :key="tag.id">
<router-link

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

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

@ -1,6 +1,6 @@
<template>
<div>
<main-nav title="公告" />
<main-nav title="排行榜" />
<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 totalPage = ref(0);
const title = computed(() => {
let t = 'Aimo Community';
let t = 'Aimo';
if (route.query && route.query.q) {
if (route.query.t && route.query.t === 'tag') {

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

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

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

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

Loading…
Cancel
Save