Commit 1bb0016d by 孙美琪

首页行业资源修改

parent e76910ad
......@@ -53,3 +53,12 @@ export function partnerList (query) {
params: query
})
}
// 获取计算资源相关
export function informationResourceList(query){
return request({
url:'/api/v1/computility',
method: 'get',
params: query
})
}
......@@ -30,10 +30,12 @@
<el-row :gutter="24">
<el-col class="resource-col" :span="8" v-for="x in i.assemblyData" :key="i"
@click="i.id === 1? $router.push(x.router):openAssembly(x)"
:style="{background: `url(${index === 0 ?baseImgUrl+x.image:baseImgUrl+x.homeImage}) no-repeat center center / 100%`}"
>
<!-- style="background: url("@/assets/images/indexImg/resource1.png") no-repeat center center / 100%;"-->
<div class="resource-box">
<div class="title">{{ x.title }}</div>
<div class="introduce">{{ x.description }}</div>
<div class="introduce">{{ index === 0 ? x.information : x.description }}</div>
</div>
</el-col>
</el-row>
......@@ -134,10 +136,11 @@
</template>
<script setup name="Index">
import {banner, assemblyList, informationList} from '@/api/home.js'
import {banner, assemblyList, informationResourceList, informationList} from '@/api/home.js'
import {ref} from 'vue'
const baseUrl = import.meta.env.VITE_APP_BASE_API
const baseImgUrl = window.location.origin
const assemblyData = ref([])
const bannerImgList = ref([])
......@@ -148,21 +151,21 @@ const list = ref([
titleEH: '/RESOURCE',
present: '强劲 · 稳定 · 安全的云计算能力 · 助力企业上云',
assemblyData: [
{
title: '天河系列超级计算机',
description: '拥有天河一号、天河新一代超算,综合算力200PF(64位精度),人工智能算力800PF,存储超20PB。可提供科学研究、工程仿真、并行算法及大规模并行应用软件研发。',
router: '/computingResource/resourceList?type=0'
},
{
title: '天河 天马智算集群',
description: '提供各类通用、国产CPU、GPU裸金属服务器,资源独占、性能无损、弹性扩容、安全可靠',
router: '/computingResource/resourceList?type=1'
},
{
title: '云计算服务',
description: '提供安全稳定及灵活扩展的云计算服务,实现按需扩展CPU、内存、存储和网络资源,有效降低 IT 成本,提升运维效率,助力核心业务创新。',
router: '/computingResource/resourceList?type=2'
}
// {
// title: '天河系列超级计算机',
// description: '拥有天河一号、天河新一代超算,综合算力200PF(64位精度),人工智能算力800PF,存储超20PB。可提供科学研究、工程仿真、并行算法及大规模并行应用软件研发。',
// router: '/computingResource/resourceList?type=0'
// },
// {
// title: '天河 天马智算集群',
// description: '提供各类通用、国产CPU、GPU裸金属服务器,资源独占、性能无损、弹性扩容、安全可靠',
// router: '/computingResource/resourceList?type=1'
// },
// {
// title: '云计算服务',
// description: '提供安全稳定及灵活扩展的云计算服务,实现按需扩展CPU、内存、存储和网络资源,有效降低 IT 成本,提升运维效率,助力核心业务创新。',
// router: '/computingResource/resourceList?type=2'
// }
]
},
{
......@@ -205,7 +208,16 @@ function getAassemblyList() {
})
}
// 计算自选
function getResource() {
informationResourceList().then(res => {
console.log(res, 'res')
list.value[0].assemblyData = res.data.length > 3 ? res.data.slice(0, 3) : res.data
})
}
getAassemblyList()
getResource()
const informationData = ref([])
const informationMainData = ref({})
......@@ -382,17 +394,17 @@ function handleCarousel(url) {
z-index: 2 !important;
}
.resource-col:first-of-type .resource-box {
background: url("@/assets/images/indexImg/resource1.png") no-repeat center center / 100%;
}
.resource-col:nth-of-type(2) .resource-box {
background: url("@/assets/images/indexImg/resource2.png") no-repeat center center / 100%;
}
.resource-col:nth-of-type(3) .resource-box {
background: url("@/assets/images/indexImg/resource3.png") no-repeat center center / 100%;
}
//.resource-col:first-of-type .resource-box {
// background: url("@/assets/images/indexImg/resource1.png") no-repeat center center / 100%;
//}
//
//.resource-col:nth-of-type(2) .resource-box {
// background: url("@/assets/images/indexImg/resource2.png") no-repeat center center / 100%;
//}
//
//.resource-col:nth-of-type(3) .resource-box {
// background: url("@/assets/images/indexImg/resource3.png") no-repeat center center / 100%;
//}
.app-container {
padding: 0;
......
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