优化推荐功能新增参数配置及上传工具

This commit is contained in:
wangqiao
2025-09-23 22:19:33 +08:00
parent aef8799652
commit 5b498724c4
9 changed files with 59 additions and 16 deletions

View File

@ -1,10 +1,11 @@
<template>
<div class="relative mt-[34px] w-[100%]">
<KlTabBar v-model="query.source" :data="tabBar" />
<div class="absolute right-[0px] top-[0px] text-[16px] text-[#999999] font-normal"
><span class="color-[#1A65FF]">{{ result?.total }}</span
>个筛选结果</div
>
<div class="absolute right-[0px] top-[0px] text-[16px] text-[#999999] font-normal">
<el-button type="warning" class="mr-4px" @click="handleUpload">上传工具</el-button>
<span class="color-[#1A65FF]">{{ result?.total }}</span>
个筛选结果
</div>
<div class="content mt-[10px]">
<el-row :gutter="20">
<el-col v-for="(item, index) in result?.list" :key="index" :span="6">
@ -22,6 +23,7 @@
import { ref } from 'vue'
import type { pageRes, pageReq } from '~/api/upnew/types'
import emptyImg from '~/assets/images/empty.png'
import useUserStore from '~/stores/user'
const query = defineModel<pageReq>('modelValue', {
required: true,
@ -34,7 +36,7 @@
const tabBar = ref([
{
label: '文本推荐',
value: -1
value: -1,
},
{
label: '原创文本',
@ -45,6 +47,15 @@
value: 2,
},
])
const handleUpload = () => {
// 先判断登录
const store = useUserStore()
if (!store.token) {
return ElMessage.error('请先登录')
}
navigateTo('/upnew?drawType=2')
}
</script>
<style lang="scss" scoped></style>