feat: 添加待确认分类功能,支持获取和确认未分类交易记录;优化相关组件和服务
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 10s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 10s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
This commit is contained in:
@@ -53,18 +53,25 @@
|
||||
<div v-else class="detail-content">
|
||||
{{ currentMessage.content }}
|
||||
</div>
|
||||
<div v-if="currentMessage.url" class="detail-footer" style="padding: 16px;">
|
||||
<van-button type="primary" block @click="handleUrlJump(currentMessage.url)">
|
||||
查看详情
|
||||
</van-button>
|
||||
</div>
|
||||
</PopupContainer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { showToast, showDialog } from 'vant';
|
||||
import { getMessageList, markAsRead, deleteMessage, markAllAsRead } from '@/api/message';
|
||||
import { useMessageStore } from '@/stores/message';
|
||||
import PopupContainer from '@/components/PopupContainer.vue';
|
||||
|
||||
const messageStore = useMessageStore();
|
||||
const router = useRouter();
|
||||
const list = ref([]);
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
@@ -138,11 +145,7 @@ const viewDetail = async (item) => {
|
||||
}
|
||||
|
||||
if (item.messageType === 1) {
|
||||
if (item.content.startsWith('http')) {
|
||||
window.open(item.content, '_blank');
|
||||
} else {
|
||||
showToast('无效的URL');
|
||||
}
|
||||
handleUrlJump(item.url || item.content);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -150,6 +153,19 @@ const viewDetail = async (item) => {
|
||||
detailVisible.value = true;
|
||||
};
|
||||
|
||||
const handleUrlJump = (targetUrl) => {
|
||||
if (!targetUrl) return;
|
||||
|
||||
if (targetUrl.startsWith('http')) {
|
||||
window.open(targetUrl, '_blank');
|
||||
} else if (targetUrl.startsWith('/')) {
|
||||
router.push(targetUrl);
|
||||
detailVisible.value = false;
|
||||
} else {
|
||||
showToast('无效的URL');
|
||||
}
|
||||
};
|
||||
|
||||
const handleDelete = (item) => {
|
||||
showDialog({
|
||||
title: '提示',
|
||||
|
||||
Reference in New Issue
Block a user