Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5055cb78
authored
Aug 03, 2025
by
yangchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实现banner的显示和计算资源的显示
parent
a664dcc2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
11 deletions
+33
-11
.env.development
+1
-0
src/api/home.js
+13
-10
src/views/index.vue
+19
-1
No files found.
.env.development
View file @
5055cb78
...
...
@@ -6,3 +6,4 @@ VITE_APP_ENV = 'development'
# 先进计算普惠算力公共服务平台/开发环境
VITE_APP_BASE_API = 'http://localhost:48080/app-api/'
#VITE_APP_BASE_API = 'http://localhost:48080/'
src/api/home.js
View file @
5055cb78
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'
})
}
src/views/index.vue
View file @
5055cb78
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment