优化推荐功能新增参数配置及上传工具
This commit is contained in:
@ -80,6 +80,7 @@ export interface pageRes {
|
||||
previewPoint?: number
|
||||
commentsPoint?: number
|
||||
hotPoint?: number
|
||||
source?: number
|
||||
}[]
|
||||
total: number
|
||||
}
|
||||
|
||||
BIN
assets/images/yuan.png
Normal file
BIN
assets/images/yuan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/images/zhuan.png
Normal file
BIN
assets/images/zhuan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@ -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,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,
|
||||
@ -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>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- 工具箱详情页面 -->
|
||||
<template>
|
||||
<KlNavTab />
|
||||
<div class="toolbox-detail w-[1019px] min-h-[374px] bg-[#FFFFFF] rounded-[12px] border border-solid border-[#EEEEEE] pa-[37px] pt-[20px] box-border ma-auto mt-[30px]">
|
||||
<div class="toolbox-detail w-[1200px] min-h-[374px] bg-[#FFFFFF] rounded-[12px] border border-solid border-[#EEEEEE] pa-[37px] pt-[20px] box-border ma-auto mt-[30px]">
|
||||
<div class="w-[100%]">
|
||||
<h1 class="font-[Microsoft_YaHei] font-bold text-[24px] text-[#333333] leading-[21px]">工具箱使用详情</h1>
|
||||
<div class="flex items-center w-[100%] mt-[30px]">
|
||||
@ -28,7 +28,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-[938px] h-[1px] bg-[#EEEEEE] rounded-[1px] my-[20px]"></div>
|
||||
<div class="w-[100%] h-[1px] bg-[#EEEEEE] rounded-[1px] my-[20px]"></div>
|
||||
<div class="body">
|
||||
<p class="font-[Microsoft_YaHei] font-normal text-[14px] text-[#333333] leading-[26px]">
|
||||
这里是工具箱的详细使用说明和描述内容。您可以在这里添加关于该工具箱功能的详细介绍,
|
||||
|
||||
@ -46,6 +46,10 @@
|
||||
return route.query.type || 'add'
|
||||
})
|
||||
|
||||
const drawType = computed(() => {
|
||||
return route.query.drawType || 1
|
||||
})
|
||||
|
||||
const form = reactive<TcreateReq>({
|
||||
activeName: 1, // 标签
|
||||
id: '', // 图纸id id,示例值(24548)
|
||||
@ -172,9 +176,9 @@
|
||||
const drawTypeRef = ref<InstanceType<typeof DrawType>>()
|
||||
onMounted(() => {
|
||||
// 初始化图纸类型
|
||||
drawTypeRef.value?.handleTypeChange(1)
|
||||
drawTypeRef.value?.handleTypeChange(Number(drawType.value))
|
||||
// 初始化图纸类型
|
||||
form.type = 1
|
||||
form.type = Number(drawType.value)
|
||||
|
||||
if (type.value !== 'add') {
|
||||
getDetail()
|
||||
|
||||
Reference in New Issue
Block a user