项目获取界面
This commit is contained in:
parent
dbe98b703d
commit
e0f4f3d5d4
|
@ -542,7 +542,7 @@ const projectGetCustom = (data) =>{
|
|||
const queryTags = `tags=${encodedTags.join('&tags=')}`;
|
||||
const queryIsFinish = `isFinish=${encodedIsFinish.join('&isFinish=')}`;
|
||||
return axios({
|
||||
url:`${api}/project/get/custom?${queryTags}&${queryIsFinish}`,
|
||||
url:`${api}/project/get/custom?id=${data.id}&${queryTags}&${queryIsFinish}`,
|
||||
method: "get",
|
||||
headers:{
|
||||
'Timestamp': getCurrentTimestamp()
|
||||
|
|
|
@ -16,7 +16,7 @@ import BottomMessage from "@/views/ProjectPage/MainMessage/BottomMessage.vue";
|
|||
import {onMounted, reactive, ref} from "vue";
|
||||
import request from "@/js/request.js";
|
||||
|
||||
const projects = ref([]);
|
||||
const projects = ref();
|
||||
const id = window.localStorage.getItem('id')
|
||||
const data = reactive({
|
||||
id: id,
|
||||
|
@ -28,16 +28,16 @@ const project = reactive({
|
|||
})
|
||||
|
||||
onMounted(()=>{
|
||||
console.log('id的值',id)
|
||||
console.log('id的值',data)
|
||||
request.projectGetCustom(data).then((res)=>{
|
||||
// console.log(res)
|
||||
// Project.data= res.data.data.data
|
||||
// console.log("res:::",res)
|
||||
projects.value = res.data.data;
|
||||
|
||||
console.log("无语",projects.value)
|
||||
// console.log("projects.value:",projects.value)
|
||||
// console.log("projects.value[0].id:",projects.value[0].id)
|
||||
project.data = projects.value[0];
|
||||
project.data = projects.value;
|
||||
console.log("project.data:00000",project.data)
|
||||
|
||||
})
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<template v-else>
|
||||
<div class="flex flex-wrap justify-start mt-5 w-full">
|
||||
<template v-for="(project, index) in projects" :key="index">
|
||||
<a-card class=" mr-2.5 transition-transform transform-gpu hover:scale-105 relative w-[24vw] h-60 mb-4 rounded-none bg-cover bg-center bg-[url('@/assert/images/img12.jpg')]" @mouseleave="showButton[index]=false" @mouseover="showButton[index]=true">
|
||||
<a-card class=" mr-2 transition-transform transform-gpu hover:scale-105 relative w-[24vw] h-60 mb-4 rounded-none bg-cover bg-center bg-[url('@/assert/images/img12.jpg')]" @mouseleave="showButton[index]=false" @mouseover="showButton[index]=true">
|
||||
<div class="flex absolute left-0 bottom-0 min-h-[30%] w-full bg-white">
|
||||
<p class="ml-6 mt-4 text-lg font-bold tracking-tight text-gray-900">{{ project.name }}</p>
|
||||
<div class="ml-auto mr-10">
|
||||
|
@ -62,7 +62,7 @@ const showButton = reactive([]);
|
|||
const projects = ref([]);
|
||||
const id =ref(1)
|
||||
const data = reactive({
|
||||
id:null,
|
||||
id:'',
|
||||
tags:[],
|
||||
isFinish:[0,1,2,-1]
|
||||
})
|
||||
|
@ -81,6 +81,8 @@ onMounted(() =>{
|
|||
function getAllProject(){
|
||||
request.projectGetCustom(data).then((res)=>{
|
||||
projects.value = res.data.data;
|
||||
console.log(projects.value)
|
||||
|
||||
})
|
||||
// loading.value = true;
|
||||
// console.log('zmhuisss',loading.value)
|
||||
|
|
Loading…
Reference in New Issue
Block a user