fix: rating
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
@tap="handleLogin"
|
||||
/>
|
||||
<view class="header-texts">
|
||||
<text class="title">全民评分</text>
|
||||
<text class="title">夯拉评分</text>
|
||||
<text class="subtitle">看看全国网友怎么评分</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -136,58 +136,27 @@ const loadTopicList = async (categoryId, page = 1) => {
|
||||
const switchCategory = (categoryId) => {
|
||||
if (currentCategoryId.value === categoryId) return;
|
||||
currentCategoryId.value = categoryId;
|
||||
|
||||
// 切换分类时重新加载数据
|
||||
uni.$trackRecord({
|
||||
eventName: 'switch_category',
|
||||
eventType: 'click',
|
||||
elementId: `category_${categoryId}`,
|
||||
elementContent: categories.value.find(c => c.id === categoryId)?.title || '未知分类',
|
||||
});
|
||||
// 切换分类时重新加载数据
|
||||
currentPage.value = 1;
|
||||
hasMore.value = true;
|
||||
loadTopicList(categoryId, currentPage.value);
|
||||
};
|
||||
|
||||
const mockData = [
|
||||
{
|
||||
id: 1,
|
||||
title: '你心中的千古一帝',
|
||||
participants: '23.5万',
|
||||
heat: '98k',
|
||||
items: [
|
||||
{ id: 1, name: '李世民', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=1', score: '9.8' },
|
||||
{ id: 2, name: '秦始皇', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=2', score: '9.5' },
|
||||
{ id: 3, name: '康熙', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=3', score: '9.2' },
|
||||
],
|
||||
aiSummary: '多数用户认为李世民综合能力最强,兼具文治武功。',
|
||||
tags: ['历史', '皇帝', '争议']
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '国产手机系统谁最强',
|
||||
participants: '15万',
|
||||
heat: '76k',
|
||||
items: [
|
||||
{ id: 1, name: 'iOS', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=4', score: '8.5' },
|
||||
{ id: 2, name: 'HyperOS', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=5', score: '8.2' },
|
||||
{ id: 3, name: 'OriginOS', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=6', score: '8.0' },
|
||||
],
|
||||
aiSummary: '系统流畅度与动效是用户关注的核心,底层优化成为评分关键。',
|
||||
tags: ['数码', '手机', '测评']
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: '最值得定居的城市',
|
||||
participants: '12.8万',
|
||||
heat: '62k',
|
||||
items: [
|
||||
{ id: 1, name: '成都', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=7', score: '9.2' },
|
||||
{ id: 2, name: '杭州', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=8', score: '8.9' },
|
||||
{ id: 3, name: '厦门', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=9', score: '8.7' },
|
||||
],
|
||||
aiSummary: '宜居性与就业机会是主要博弈点,慢节奏生活深受青睐。',
|
||||
tags: ['城市', '生活', '推荐']
|
||||
}
|
||||
];
|
||||
|
||||
const topicList = ref([...mockData]);
|
||||
const topicList = ref([]);
|
||||
|
||||
const goToRating = (topicId, itemId) => {
|
||||
uni.$trackRecord({
|
||||
eventName: 'jumpto_rating',
|
||||
eventType: 'jump',
|
||||
elementId: `topic_${topicId}`,
|
||||
elementContent: `主题${topicId}`,
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: `/pages/rating/index?topicId=${topicId}&itemId=${itemId}`
|
||||
});
|
||||
@@ -248,7 +217,7 @@ onShareAppMessage(async () => {
|
||||
const shareToken = await getShareToken("index");
|
||||
getShareReward();
|
||||
return {
|
||||
title: "全民评分",
|
||||
title: "夯拉评分",
|
||||
path: "/pages/index/index?shareToken=" + shareToken,
|
||||
};
|
||||
});
|
||||
@@ -257,7 +226,7 @@ onShareTimeline(async () => {
|
||||
const shareToken = await getShareToken("index");
|
||||
getShareReward();
|
||||
return {
|
||||
title: "全民评分",
|
||||
title: "夯拉评分",
|
||||
query: `shareToken=${shareToken}`,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user