Commit 261098ea by 孙美琪

首页行业资源图片完整路径修改

parent 1bb0016d
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col class="resource-col" :span="8" v-for="x in i.assemblyData" :key="i" <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)" @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(${index === 0 ?baseUrl+x.image:baseUrl+x.homeImage}) no-repeat center center / 100%`}"
> >
<!-- style="background: url("@/assets/images/indexImg/resource1.png") no-repeat center center / 100%;"--> <!-- style="background: url("@/assets/images/indexImg/resource1.png") no-repeat center center / 100%;"-->
<div class="resource-box"> <div class="resource-box">
...@@ -140,7 +140,7 @@ import {banner, assemblyList, informationResourceList, informationList} from '@/ ...@@ -140,7 +140,7 @@ import {banner, assemblyList, informationResourceList, informationList} from '@/
import {ref} from 'vue' import {ref} from 'vue'
const baseUrl = import.meta.env.VITE_APP_BASE_API const baseUrl = import.meta.env.VITE_APP_BASE_API
const baseImgUrl = window.location.origin // const baseImgUrl = window.location.origin
const assemblyData = ref([]) const assemblyData = ref([])
const bannerImgList = ref([]) const bannerImgList = ref([])
...@@ -211,7 +211,6 @@ function getAassemblyList() { ...@@ -211,7 +211,6 @@ function getAassemblyList() {
// 计算自选 // 计算自选
function getResource() { function getResource() {
informationResourceList().then(res => { informationResourceList().then(res => {
console.log(res, 'res')
list.value[0].assemblyData = res.data.length > 3 ? res.data.slice(0, 3) : res.data list.value[0].assemblyData = res.data.length > 3 ? res.data.slice(0, 3) : res.data
}) })
} }
......
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