Browse Source

联调首页图片

master
邓宏 2 years ago
parent
commit
ed18326e17
  1. 21
      pages/home/index.vue

21
pages/home/index.vue

@ -15,8 +15,7 @@
swiper.headImg{ swiper.headImg{
height:424rpx; height:424rpx;
margin-bottom:-80rpx; margin-bottom:-80rpx;
image{ .u-transition{
width:100%;
height:100%; height:100%;
} }
} }
@ -268,12 +267,15 @@
</style> </style>
<template> <template>
<view class="container"> <view class="container">
<!-- <image class="head" src="@/static/banner.png" mode="aspectFit"/> --> <swiper v-if="headImgs.length>0" class="headImg" circular>
<swiper class="headImg" circular> <swiper-item v-for="(v,k) in headImgs" :key="k">
<swiper-item> <u-image :src="`${host}/${v}`" width="100%" height="100%" mode="aspectFill">
<image src="@/static/banner.png" mode="aspectFill"/> <text slot="error" class="plant-xiaopangchetupianjiazaishibai"/>
</u-image>
</swiper-item> </swiper-item>
</swiper> </swiper>
<image v-else class="head" src="@/static/banner.png" mode="aspectFit"/>
<swiper class="data" :display-multiple-items="2" circular> <swiper class="data" :display-multiple-items="2" circular>
<swiper-item> <swiper-item>
<view data-title="地块个数()" style="--c:16, 193, 118;"> <view data-title="地块个数()" style="--c:16, 193, 118;">
@ -362,10 +364,11 @@
</template> </template>
<script> <script>
import request from '@/common/request.js' import request,{host} from '@/common/request.js'
export default { export default {
data() { data() {
return { return {
host:host('imgUrl'),
headImgs:[], headImgs:[],
mapContext:null, mapContext:null,
show:false, show:false,
@ -403,9 +406,9 @@ import request from '@/common/request.js'
}, },
methods: { methods: {
async getHeadImg(){ async getHeadImg(){
var res=await request("/base/api/plantCompany/picShow",{method:"post"}) var res=await request("/base/api/plantCompany/queryCompanyPicById")
if(res.statu){ if(res.statu){
this.headImgs=res.data
} }
}, },
// //

Loading…
Cancel
Save