优化推荐功能新增参数配置及上传工具
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
<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 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]">
|
||||
@ -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,
|
||||
@ -45,6 +47,14 @@
|
||||
value: 2,
|
||||
},
|
||||
])
|
||||
const handleUpload = () => {
|
||||
// 先判断登录
|
||||
const store = useUserStore()
|
||||
if (!store.token) {
|
||||
return ElMessage.error('请先登录')
|
||||
}
|
||||
navigateTo('/upnew?drawType=1')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@ -6,12 +6,17 @@
|
||||
<div class="box-border p-[16px]">
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<div class="title mr-[38px] text-[16px] text-[#333333] font-bold">{{ props.itemInfo.title }}</div>
|
||||
<div class="title mr-[38px] text-[16px] text-[#333333] font-bold flex items-center" :title="props.itemInfo.title">
|
||||
<img v-if="props.itemInfo.source === 2" src="~/assets/images/zhuan.png" alt="" srcset="" class="mr-[2px] w-[22px] relative bottom-[-4px]" />
|
||||
<img v-if="props.itemInfo.source === 1" src="~/assets/images/yuan.png" alt="" srcset="" class="mr-[2px] w-[20px] relative bottom-[-4px]" />
|
||||
{{ props.itemInfo.title }}
|
||||
</div>
|
||||
<div class="mt-[8px] text-[15px] text-[#999999] font-normal">by {{ props.itemInfo?.ownedUserIdInfo?.nickName }}</div>
|
||||
<div class="mt-[4px] text-[13px] text-[#999999] font-normal">{{ dayjs(props.itemInfo.createTime).format('YYYY-MM-DD HH:mm:ss') }}</div>
|
||||
</div>
|
||||
<div><img :src="props.itemInfo?.ownedUserIdInfo?.avatar" alt="" srcset="" class="h-[40px] w-[40px] rd-[50%]" /></div>
|
||||
</div>
|
||||
<div class="mt-[24px] flex items-center justify-between">
|
||||
<div class="mt-[14px] flex items-center justify-between">
|
||||
<div class="flex items-center justify-between text-[14px] text-[#666666] font-normal">
|
||||
<div class="mr-[9px] flex items-center">
|
||||
<img src="~/assets/images/look.png" alt="" srcset="" class="mr-[2px] h-[17px]" />
|
||||
@ -35,6 +40,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import dayjs from 'dayjs'
|
||||
import type { PropType } from 'vue'
|
||||
import type { pageRes } from '~/api/upnew/types'
|
||||
const props = defineProps({
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<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 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]">
|
||||
@ -22,11 +23,12 @@
|
||||
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,
|
||||
})
|
||||
const result = defineModel<pageRes| null>('result', {
|
||||
const result = defineModel<pageRes | null>('result', {
|
||||
required: true,
|
||||
})
|
||||
|
||||
@ -44,6 +46,15 @@
|
||||
value: 2,
|
||||
},
|
||||
])
|
||||
|
||||
const handleUpload = () => {
|
||||
// 先判断登录
|
||||
const store = useUserStore()
|
||||
if (!store.token) {
|
||||
return ElMessage.error('请先登录')
|
||||
}
|
||||
navigateTo('/upnew?drawType=3')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user