|
@@ -1,23 +1,25 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="home-page">
|
|
<div class="home-page">
|
|
|
<div class="banner flex-center">
|
|
<div class="banner flex-center">
|
|
|
- <el-carousel :height="carouselHeight" style="width: 100%;">
|
|
|
|
|
- <el-carousel-item v-for="(item,index) in 3" :key="index">
|
|
|
|
|
- <img
|
|
|
|
|
- :src="`https://baomiai.oss-cn-shanghai.aliyuncs.com/static/banner-0${index+1}.png`"
|
|
|
|
|
- class="carousel-image"
|
|
|
|
|
- @load="onImageLoad"
|
|
|
|
|
- />
|
|
|
|
|
- </el-carousel-item>
|
|
|
|
|
- <!-- <el-carousel-item>
|
|
|
|
|
- <img
|
|
|
|
|
- :src="bannerImage"
|
|
|
|
|
- class="carousel-image"
|
|
|
|
|
- @load="onImageLoad"
|
|
|
|
|
- />
|
|
|
|
|
- </el-carousel-item> -->
|
|
|
|
|
-
|
|
|
|
|
- </el-carousel>
|
|
|
|
|
|
|
+ <div class="flex-between" style="width:100%">
|
|
|
|
|
+ <div class="flex_1 flex-column-start-between" >
|
|
|
|
|
+ <img :src="allyinqing" alt="" style="height:40px">
|
|
|
|
|
+ <img :src="aigongzuoliu" alt="" style="height:186px">
|
|
|
|
|
+ <div class="font_size24 line_height30">
|
|
|
|
|
+ 一站式发现、交易与运行自动化工作流。连接n8n、Coze、Dify 等主流平台,释放生产力潜能。
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <img :src="userTotal" alt="" style="height:52px">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-carousel height="522px" style="width: 777px;">
|
|
|
|
|
+ <el-carousel-item v-for="(item,index) in 3" :key="index">
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="`https://baomiai.oss-cn-shanghai.aliyuncs.com/static/banner-0${index+1}.png?v=0.0.1`"
|
|
|
|
|
+ class="carousel-image"
|
|
|
|
|
+ @load="onImageLoad"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-carousel-item>
|
|
|
|
|
+ </el-carousel>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 中间搜索区域 -->
|
|
<!-- 中间搜索区域 -->
|
|
|
<div class="workflow-container">
|
|
<div class="workflow-container">
|
|
@@ -82,6 +84,9 @@
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import searchIcon from '@/assets/imgs/search.png'
|
|
import searchIcon from '@/assets/imgs/search.png'
|
|
|
|
|
+import allyinqing from '@/assets/imgs/allyinqing.png'
|
|
|
|
|
+import aigongzuoliu from '@/assets/imgs/aigongzuoliu.png'
|
|
|
|
|
+import userTotal from '@/assets/imgs/userTotal.png'
|
|
|
import addIcon from '@/assets/imgs/add.png'
|
|
import addIcon from '@/assets/imgs/add.png'
|
|
|
import n8Icon from '@/assets/imgs/8n8.png'
|
|
import n8Icon from '@/assets/imgs/8n8.png'
|
|
|
import cozeIcon from '@/assets/imgs/coze.png'
|
|
import cozeIcon from '@/assets/imgs/coze.png'
|
|
@@ -95,16 +100,18 @@ import { getCategoryListTree } from '@/api/category.js'
|
|
|
import { getPublishList } from '@/api/publish.js'
|
|
import { getPublishList } from '@/api/publish.js'
|
|
|
|
|
|
|
|
|
|
|
|
|
-import { onMounted,ref, inject } from 'vue'
|
|
|
|
|
|
|
+import { onMounted,ref, inject, reactive } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
import { useI18n } from 'vue-i18n'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
const { t } = useI18n() // 获取t函数// 导入useI18n
|
|
const { t } = useI18n() // 获取t函数// 导入useI18n
|
|
|
const categoryListTree = ref([])
|
|
const categoryListTree = ref([])
|
|
|
|
|
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
console.log('Home mounted')
|
|
console.log('Home mounted')
|
|
|
getCategoryListTreeFn();
|
|
getCategoryListTreeFn();
|
|
|
- getList();
|
|
|
|
|
|
|
+ // getList();
|
|
|
|
|
+ loadMore();
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -165,17 +172,42 @@ const getCategoryListTreeFn = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 查询寻找工作流列表
|
|
// 查询寻找工作流列表
|
|
|
-const getList = async (type) => {
|
|
|
|
|
- const res = await getPublishList({
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- pageSize: 8,
|
|
|
|
|
- orderByColumn: 'publishId',
|
|
|
|
|
- isAsc: 'desc'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+const searchFom = reactive({
|
|
|
|
|
+ pageNum: 0,
|
|
|
|
|
+ pageSize: 8,
|
|
|
|
|
+ orderByColumn: 'publishId',
|
|
|
|
|
+ isAsc: 'desc'
|
|
|
|
|
+})
|
|
|
|
|
+const total = ref(0);
|
|
|
|
|
+const hasLoadedAll = ref(false);
|
|
|
|
|
+// const getList = async (type) => {
|
|
|
|
|
+// const res = await getPublishList(searchFom)
|
|
|
|
|
+// if(res.code === 200){
|
|
|
|
|
+// list.value = res.rows || [];
|
|
|
|
|
+// }
|
|
|
|
|
+// };
|
|
|
|
|
+const loadMore = async () => {
|
|
|
|
|
+ // 如果已经加载完所有数据,则不再请求
|
|
|
|
|
+ if (hasLoadedAll.value) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ searchFom.pageNum += 1;
|
|
|
|
|
+ const res = await getPublishList(searchFom)
|
|
|
if(res.code === 200){
|
|
if(res.code === 200){
|
|
|
- list.value = res.rows || [];
|
|
|
|
|
|
|
+ list.value = [...list.value, ...res.rows || []];
|
|
|
|
|
+ total.value = res.total || 0;
|
|
|
|
|
+ // 判断是否已加载完所有数据
|
|
|
|
|
+ if (list.value.length >= total.value) {
|
|
|
|
|
+ hasLoadedAll.value = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+defineExpose({
|
|
|
|
|
+ loadMore
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
@@ -186,7 +218,8 @@ const getList = async (type) => {
|
|
|
min-height: 600px;
|
|
min-height: 600px;
|
|
|
.carousel-image {
|
|
.carousel-image {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: auto;
|
|
|
|
|
|
|
+ height: 522px;
|
|
|
|
|
+ margin-left: 20px;
|
|
|
// object-fit: cover; // 保持比例填充整个容器
|
|
// object-fit: cover; // 保持比例填充整个容器
|
|
|
// object-position: center; // 居中显示
|
|
// object-position: center; // 居中显示
|
|
|
}
|
|
}
|
|
@@ -350,9 +383,13 @@ $height-btn: 50px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.home-page{
|
|
.home-page{
|
|
|
|
|
+ // height: calc(100vh - 60px);
|
|
|
|
|
+ // overflow: auto;
|
|
|
.course-list{
|
|
.course-list{
|
|
|
margin-top: 70px;
|
|
margin-top: 70px;
|
|
|
margin-bottom: 140px;
|
|
margin-bottom: 140px;
|
|
|
|
|
+ // height: calc(100vh - 60px - 140px);
|
|
|
|
|
+ // overflow: auto;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|