|
@@ -23,18 +23,18 @@
|
|
|
</view>
|
|
|
|
|
|
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" >
|
|
|
- <swiper-item v-for="item of companyList" :key="item.id" style="position:relative">
|
|
|
+ <swiper-item v-for="(item,index) of companyList" :key="item.id" style="position:relative">
|
|
|
<!-- <view style="position: absolute;bottom: 28px;right: 16px;color: #ffffff75;" class="swiper-item uni-bg-red">{{item.company}}</view> -->
|
|
|
- <image :src="item.picUrl?item.picUrl:'../../static/bg.png'" style="width: 100%;height: 100%;"></image>
|
|
|
+ <image :src="item.picUrl?item.picUrl:'../../static/bg.png'" @click="showImgs(index,companyList)" mode="aspectFill" style="width: 100%;height: 100%;"></image>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
<view style="padding: 16px 0 4px 16px;font-weight: bold;">
|
|
|
优质供应 ▼
|
|
|
</view>
|
|
|
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" >
|
|
|
- <swiper-item v-for="item of prodList" :key="item.id">
|
|
|
+ <swiper-item v-for="(item,index) of prodList" :key="item.id">
|
|
|
<!-- <view style="position: absolute;bottom: 28px;right: 16px;color: #ffffff75;" class="swiper-item uni-bg-red">{{item.company}}</view> -->
|
|
|
- <image :src="item.picUrl?item.picUrl:'../../static/bg.png'" style="width: 100%;height: 100%;"></image>
|
|
|
+ <image :src="item.picUrl?item.picUrl:'../../static/bg.png'" @click="showImgs(index,prodList)" style="width: 100%;height: 100%;" mode="aspectFill"></image>
|
|
|
</swiper-item>
|
|
|
|
|
|
</swiper>
|
|
@@ -108,6 +108,18 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ showImgs(index, list){
|
|
|
+ let urls = [];
|
|
|
+ for(let i=0;i<list.length;i++){
|
|
|
+ urls.push(list[i].picUrl);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 预览图片
|
|
|
+ uni.previewImage({
|
|
|
+ urls: urls,
|
|
|
+ current: index,
|
|
|
+ });
|
|
|
+ },
|
|
|
showAdd(){
|
|
|
if(uni.getStorageSync('userNo')){
|
|
|
uni.navigateTo({
|