fix: pk
12
pages.json
@@ -139,20 +139,20 @@
|
|||||||
{
|
{
|
||||||
"text": "PK站",
|
"text": "PK站",
|
||||||
"pagePath": "pages/pk/index",
|
"pagePath": "pages/pk/index",
|
||||||
"iconPath": "static/images/tabBar/creation.png",
|
"iconPath": "static/images/tabBar/pk.png",
|
||||||
"selectedIconPath": "static/images/tabBar/creation_s.png"
|
"selectedIconPath": "static/images/tabBar/pk_s.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "发布",
|
"text": "发布",
|
||||||
"pagePath": "pages/release/index",
|
"pagePath": "pages/release/index",
|
||||||
"iconPath": "static/images/tabBar/creation.png",
|
"iconPath": "static/images/tabBar/publish.png",
|
||||||
"selectedIconPath": "static/images/tabBar/creation_s.png"
|
"selectedIconPath": "static/images/tabBar/publish_s.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "消息",
|
"text": "消息",
|
||||||
"pagePath": "pages/message/index",
|
"pagePath": "pages/message/index",
|
||||||
"iconPath": "static/images/tabBar/me.png",
|
"iconPath": "static/images/tabBar/message.png",
|
||||||
"selectedIconPath": "static/images/tabBar/me_s.png"
|
"selectedIconPath": "static/images/tabBar/message_s.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "我的",
|
"text": "我的",
|
||||||
|
|||||||
@@ -132,6 +132,9 @@ import {
|
|||||||
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
|
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
|
||||||
|
|
||||||
const DEFAULT_AVATAR = "/static/images/icon/robot.png";
|
const DEFAULT_AVATAR = "/static/images/icon/robot.png";
|
||||||
|
const APPROVED_AVATAR = "/static/images/icon/approved.png";
|
||||||
|
const REJECTED_AVATAR = "/static/images/icon/rejected.png";
|
||||||
|
const PENDING_AVATAR = "/static/images/icon/pending.png";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const loginPopupRef = ref(null);
|
const loginPopupRef = ref(null);
|
||||||
@@ -266,7 +269,17 @@ const formatDayLabel = (day) => {
|
|||||||
|
|
||||||
const resolveAvatar = (item) => {
|
const resolveAvatar = (item) => {
|
||||||
const avatar = item?.fromUser?.avatar;
|
const avatar = item?.fromUser?.avatar;
|
||||||
if (!avatar) return DEFAULT_AVATAR;
|
if (!avatar) {
|
||||||
|
if(item.title.includes("已通过")) {
|
||||||
|
return APPROVED_AVATAR;
|
||||||
|
} else if(item.title.includes("未通过")) {
|
||||||
|
return REJECTED_AVATAR;
|
||||||
|
} else if(item.title.includes("已提交审核")) {
|
||||||
|
return PENDING_AVATAR;
|
||||||
|
} else {
|
||||||
|
return DEFAULT_AVATAR;
|
||||||
|
}
|
||||||
|
}
|
||||||
return String(avatar).startsWith("http") ? avatar : `${FILE_BASE_URL}${avatar}`;
|
return String(avatar).startsWith("http") ? avatar : `${FILE_BASE_URL}${avatar}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -281,6 +294,8 @@ const resolveActionText = (item) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const resolveJumpText = (item) => {
|
const resolveJumpText = (item) => {
|
||||||
|
if(item.title.includes("已提交审核") || item.title.includes("未通过")) return "";
|
||||||
|
|
||||||
if (item.itemId) return "查看评分详情";
|
if (item.itemId) return "查看评分详情";
|
||||||
if (item.topicId) return "查看话题";
|
if (item.topicId) return "查看话题";
|
||||||
return "查看消息";
|
return "查看消息";
|
||||||
@@ -423,6 +438,7 @@ const markSingleAsRead = async (item) => {
|
|||||||
|
|
||||||
const handleItemTap = async (item) => {
|
const handleItemTap = async (item) => {
|
||||||
await markSingleAsRead(item);
|
await markSingleAsRead(item);
|
||||||
|
if(item.title.includes("未通过") || item.title.includes("已提交审核")) return
|
||||||
handleNavigate(item);
|
handleNavigate(item);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
<text class="nickname" @tap="handleUserClick">{{ userInfo.nickName }}</text>
|
<text class="nickname" @tap="handleUserClick">{{ userInfo.nickName }}</text>
|
||||||
|
|
||||||
<view class="tags-container" v-if="isLoggedIn && userStats.label && userStats.label.length">
|
<view class="tags-container" v-if="isLoggedIn && userStats.label && userStats.label.length">
|
||||||
<text class="sparkle-icon">✨</text>
|
<!-- <text class="sparkle-icon">✨</text>
|
||||||
<text class="tags-text">{{ userStats.label.join(' | ') }}</text>
|
<text class="tags-text">{{ userStats.label.join(' | ') }}</text> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="tags-container" v-else-if="!isLoggedIn">
|
<view class="tags-container" v-else-if="!isLoggedIn">
|
||||||
<text class="tags-text">点击登录解锁更多功能</text>
|
<text class="tags-text">点击登录解锁更多功能</text>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ const loadData = async (page = 1) => {
|
|||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await fetchUserTopics(page);
|
const res = await fetchUserTopics(page);
|
||||||
const list = res?.data?.records || res?.records || res?.list || [];
|
const list = res?.list || [];
|
||||||
|
|
||||||
// 如果是第一页,先清空原有数据
|
// 如果是第一页,先清空原有数据
|
||||||
if (page === 1) {
|
if (page === 1) {
|
||||||
|
|||||||
@@ -295,7 +295,13 @@ const confirmAddItem = async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({ title: '添加成功', icon: 'success' });
|
// uni.showToast({ title: '添加成功', icon: 'success' });
|
||||||
|
if (successPopupRef.value) {
|
||||||
|
successPopupRef.value.show({
|
||||||
|
emoji: '🎉',
|
||||||
|
label: '请耐心等待管理员审核'
|
||||||
|
}, 'release');
|
||||||
|
}
|
||||||
|
|
||||||
// 重置表单并关闭弹窗
|
// 重置表单并关闭弹窗
|
||||||
newItem.value = { name: '', avatar: '' };
|
newItem.value = { name: '', avatar: '' };
|
||||||
|
|||||||
BIN
static/images/icon/approved.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
static/images/icon/pending.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
static/images/icon/rejected.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 6.7 KiB |
BIN
static/images/tabBar/message.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
static/images/tabBar/message_s.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
static/images/tabBar/pk.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
static/images/tabBar/pk_s.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
static/images/tabBar/publish.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
static/images/tabBar/publish_s.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |