Commit 5055cb78 by yangchen

实现banner的显示和计算资源的显示

parent a664dcc2
......@@ -6,3 +6,4 @@ VITE_APP_ENV = 'development'
# 先进计算普惠算力公共服务平台/开发环境
VITE_APP_BASE_API = 'http://localhost:48080/app-api/'
#VITE_APP_BASE_API = 'http://localhost:48080/'
import request from '@/utils/request'
// 获取首页banner
export function banner (query) {
return request({
url: '/biz/banner-info/get',
method: 'get',
params: query
})
//获取首页banner
// export function banner (query) {
// return request({
// url: '/biz/banner-info/get',
// method: 'get',
// params: query
// })
// }
export function banner() {
return request({ url: '/biz/banner-info/list', method: 'get' })
}
// 获取组件服务列表数据
......@@ -57,8 +61,7 @@ export function partnerList (query) {
// 获取计算资源相关
export function informationResourceList(query){
return request({
url:'/api/v1/computility',
method: 'get',
params: query
url:'/biz/computility-information/list',
method: 'get'
})
}
......@@ -3,10 +3,13 @@
<div class="banner">
<el-carousel height="600px" :indicator-position="bannerImgList.length <= 1 ? 'none':'' ">
<el-carousel-item v-for="item in bannerImgList" :key="item" @click="handleCarousel(item.url)">
<img :src="baseUrl + item.image" alt="">
<!-- <img :src="baseUrl + item.image" alt="">-->
<img :src="item.image" alt="">
</el-carousel-item>
</el-carousel>
</div>
<div class="new-model">
<div style="padding-top: 32px;">
<div class="model-box" v-for="(i,index) in list" :key="i">
......@@ -194,6 +197,21 @@ function getBanner() {
})
})
}
// function getBanner() {
// banner().then(res => {
// // 筛选条件:showStatus为1且image字段存在且不为空
// const validData = res.data.filter(item =>
// item.showStatus === 1 &&
// item.image &&
// item.image.trim() !== ''
// );
//
// // 对筛选后的数据进行排序
// bannerImgList.value = validData.sort(function (a, b) {
// return a.orderNum - b.orderNum
// })
// })
// }
getBanner()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment