This commit is contained in:
xiaofajia 2024-10-28 23:09:27 +08:00
commit f93d18f4b9
2 changed files with 13 additions and 11 deletions

View File

@ -116,11 +116,16 @@ function dealMenuText(num,data,list){
break; break;
} }
} }
for (const item of list) { if(parData.parentId!=0){
if ( parData.parentId == 0){ for (const item of list) {
parData = item if (parData.parentId == item.id){
level++ if (item.parentId==0){
break; level++
}else {
level = level+2
}
break;
}
} }
} }
if (level==2){ if (level==2){

View File

@ -1,14 +1,11 @@
<template> <template>
<div class="container_"> <div class="container_">
<div class="top-list"> <div class="top-list">
<div class="list-box" v-for="(item, index) in serviceList.slice(0, 4)" :key="item.id" :span="4"> <div class="list-box" v-for="(item, index) in serviceList" :key="item.id" :span="4">
<div @click="goRoute(item.id)"> <div @click="goRoute(item.id)">
<img :src="index === 0 ? 'https://th.bing.com/th/id/OIP.Y9YEwiwLwTdvQDkLlA3JbQHaE8?w=251&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7' : <img :src="imgUrl + item.coverImg"
index === 1 ? 'https://th.bing.com/th/id/OIP.a8bAOOXWZ_G0POGjCXPYbgHaFj?w=206&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7' :
index === 2 ? 'https://th.bing.com/th/id/OIP.9vxxtCP1lmu43fYus2SZ5gHaE7?w=284&h=189&c=7&r=0&o=5&dpr=1.5&pid=1.7' :
'https://th.bing.com/th/id/OIP.MwxN9-_jrMRNiVLJ9Q7WRQHaE8?w=265&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7'"
style="width: 300px; height: 300px;"> style="width: 300px; height: 300px;">
<div style="font-weight: bold;text-align: center;font-size: 28px">{{ item.name }}</div> <div style="font-weight: bold;text-align: center;font-size: 28px">{{ item.name }}</div>
</div> </div>