前端
This commit is contained in:
parent
2fdf43309c
commit
63b12cba04
@ -8,3 +8,11 @@ export function getTab(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getbanner(id) {
|
||||
return request({
|
||||
url: '/api/category/'+id,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
|
@ -294,9 +294,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import { Swiper, SwiperSlide, } from "vue-awesome-swiper";
|
||||
import "/src/components/swiper/css/swiper.min.css";
|
||||
import { getTab } from "@/api/gw/home";
|
||||
import { getTab,getbanner } from "@/api/gw/home";
|
||||
export default {
|
||||
components: {
|
||||
Swiper,
|
||||
@ -322,6 +322,8 @@ export default {
|
||||
{ name: '合作企业' },
|
||||
{ name: '联系我们' },
|
||||
],
|
||||
imgUrl:'https://f382b38516.zicp.fun',
|
||||
bannerlist:[],
|
||||
isMounted: false,
|
||||
swiperOptions: {
|
||||
navigation: {
|
||||
@ -414,6 +416,16 @@ export default {
|
||||
getTab().then(response => {
|
||||
if(response.code == 200){
|
||||
this.tablist = response.data;
|
||||
getbanner(response.data[0].id).then(res => {
|
||||
if(res.code == 200){
|
||||
let list = res.data[3].children.list
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
this.bannerlist.push(this.imgUrl+list[i].imgUrl)
|
||||
}
|
||||
console.log(this.bannerlist)
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user