轮播图图片预览
This commit is contained in:
parent
99062299fa
commit
edcc5c39fe
|
@ -5,7 +5,7 @@
|
|||
</view>
|
||||
<view v-if="load == false">
|
||||
<view class="top_swiper">
|
||||
<u-swiper :list="img" indicator indicatorMode="line" circular height="200" imgMode="aspectFit"></u-swiper>
|
||||
<u-swiper :list="img" indicator indicatorMode="line" circular height="200" imgMode="aspectFit" @click="previewImage"></u-swiper>
|
||||
</view>
|
||||
<view class="top_title">
|
||||
标题
|
||||
|
@ -94,6 +94,14 @@
|
|||
uni.navigateTo({
|
||||
url: "/pagesA/activeManage/qdList?type=" + type + '&activityId=' + this.id
|
||||
})
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.img
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
this.http.request('/auth/logout', {}, "GET").then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.redirectTo({
|
||||
// url: "/pages/pageHome/shwxLogin", //h5
|
||||
url: '/pagesC/Login/Login' //小程序
|
||||
url: "/pages/pageHome/shwxLogin", //h5
|
||||
// url: '/pagesC/Login/Login' //小程序
|
||||
})
|
||||
}
|
||||
}).catch(e => {
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<image style="width: 100%;" :src="cover" mode="widthFix"></image>
|
||||
</view> -->
|
||||
<!-- 轮播图 -->
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px">
|
||||
<view slot="indicator" class="indicator-num" imgMode="aspectFit">
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" imgMode="aspectFit" @click="previewImage">
|
||||
<view slot="indicator" class="indicator-num" >
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
</u-swiper>
|
||||
|
@ -214,6 +214,14 @@
|
|||
this.androidOpenPdf(this.contractUrl);
|
||||
break;
|
||||
}
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</view>
|
||||
<view class="pageImg">
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current"
|
||||
indicatorStyle="right: 20px" height='440rpx' imgMode="aspectFit">
|
||||
indicatorStyle="right: 20px" height='440rpx' imgMode="aspectFit" @click="previewImage">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
|
@ -230,6 +230,14 @@
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</view>
|
||||
<view class="pageImg">
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current"
|
||||
indicatorStyle="right: 20px" height='440rpx' imgMode="aspectFit">
|
||||
indicatorStyle="right: 20px" height='440rpx' imgMode="aspectFit" @click="previewImage">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
|
@ -168,6 +168,14 @@
|
|||
if(aaa > 100){
|
||||
this.value = '100'
|
||||
}
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
</view> -->
|
||||
|
||||
<!-- 轮播图 -->
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="200">
|
||||
<view slot="indicator" class="indicator-num" imgMode="aspectFit">
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="200" imgMode="aspectFit" @click="previewImage">
|
||||
<view slot="indicator" class="indicator-num" >
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
</u-swiper>
|
||||
|
@ -322,6 +322,14 @@
|
|||
});
|
||||
})
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
<view class="workDetail" v-if="load == false">
|
||||
<u-swiper :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="300px" imgMode="aspectFit">
|
||||
<u-swiper :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="300px" imgMode="aspectFit" @click="previewImage">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
|
@ -88,6 +88,14 @@
|
|||
});
|
||||
})
|
||||
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-swiper :list="list" indicator indicatorMode="dot" circular height="240" imgMode="aspectFit"></u-swiper>
|
||||
<u-swiper :list="list" indicator indicatorMode="dot" circular height="240" imgMode="aspectFit" @click="previewImage"></u-swiper>
|
||||
<view class="layout">
|
||||
<!-- 文创展厅(功能不明,先隐藏) -->
|
||||
<view class="activityColumn">
|
||||
|
@ -221,6 +221,14 @@
|
|||
uni.navigateTo({
|
||||
url: "/pagesC/AwardWinningWork/AwardDetail?id=" + String(id)
|
||||
})
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
},
|
||||
// 下拉刷新
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</view>
|
||||
<view class="pageImg">
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current"
|
||||
indicatorStyle="right: 20px" height='440rpx' imgMode="aspectFit">
|
||||
indicatorStyle="right: 20px" height='440rpx' imgMode="aspectFit" @click="previewImage">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
|
@ -223,6 +223,14 @@
|
|||
icon: "none",
|
||||
});
|
||||
})
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<view class="help_bg_box">
|
||||
<view class=" bg_img_box">
|
||||
<u-swiper :list="img" indicator indicatorMode="line" circular height="200" imgMode="aspectFit"></u-swiper>
|
||||
<u-swiper :list="img" indicator indicatorMode="line" circular height="200" imgMode="aspectFit" @click="previewImage"></u-swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="header">
|
||||
|
@ -345,6 +345,14 @@
|
|||
icon: "none",
|
||||
});
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.img
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
<view class="workDetail" v-if="load == false">
|
||||
<u-swiper :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="300px" imgMode="aspectFit">
|
||||
<u-swiper :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="300px" imgMode="aspectFit" @click="previewImage">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
|
@ -83,6 +83,14 @@
|
|||
});
|
||||
})
|
||||
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
:duration="duration">
|
||||
<swiper-item v-for="(v,i) in img" :key="i">
|
||||
<view class="swiper_box">
|
||||
<image class="swiper_img" :src='img[i]' mode="aspectFit"></image>
|
||||
<image class="swiper_img" :src='img[i]' mode="aspectFit" @click="previewImage(i)"></image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
@ -407,6 +407,14 @@
|
|||
url: "/pagesA/msg/chat/chat?name=" + this.orderDet[0].userName + '&linkId=' + '' + '&toUser=' +
|
||||
this.orderDet[0].id + '&toUserImg=' + this.orderDet[0].userImg
|
||||
})
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.img
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<view class="page" v-if="load == false">
|
||||
<view class="pageImg" v-if="list.length > 0">
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="(e) => (currentNum = e.current)"
|
||||
indicatorStyle="right: 20px" height="440rpx" imgMode="aspectFit">
|
||||
indicatorStyle="right: 20px" height="440rpx" imgMode="aspectFit" @click="previewImage">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
|
@ -74,6 +74,14 @@
|
|||
});
|
||||
})
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<view class="page" v-if="load == false">
|
||||
<view class="pageImg" v-if="list.length > 0">
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="(e) => (currentNum = e.current)"
|
||||
indicatorStyle="right: 20px" height="440rpx" imgMode="aspectFit">
|
||||
indicatorStyle="right: 20px" height="440rpx" imgMode="aspectFit" @click="previewImage">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
|
@ -96,6 +96,14 @@
|
|||
});
|
||||
})
|
||||
},
|
||||
previewImage(index) {
|
||||
let photoList = this.list
|
||||
uni.previewImage({
|
||||
current: index, // 当前显示图片的索引值
|
||||
urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
|
||||
loop: true, // 是否可循环预览
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
export default {
|
||||
config: {
|
||||
baseUrl: "http://192.168.2.48:8080/h5/api", //俞燕红-小程序不能配跨域
|
||||
// baseUrl: "http://192.168.2.48:8080/h5/api", //俞燕红-小程序不能配跨域
|
||||
// baseUrl: "/pre", //俞燕红-跨域
|
||||
// baseUrl: "https://yxx.ydool.net/h5/api", //线上
|
||||
// baseUrl: "/h5/api", //h5
|
||||
baseUrl: "/h5/api", //h5
|
||||
header: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
// 'Content-Type':'application/x-www-form-urlencoded'
|
||||
|
@ -104,8 +104,8 @@ export default {
|
|||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Login/Login' //小程序跳转
|
||||
// url: '/pages/pageHome/shwxLogin' //h5-山海万象跳转
|
||||
// url: '/pagesC/Login/Login' //小程序跳转
|
||||
url: '/pages/pageHome/shwxLogin' //h5-山海万象跳转
|
||||
})
|
||||
}, 1200)
|
||||
|
||||
|
|
Loading…
Reference in New Issue