|
@@ -42,6 +42,7 @@ const router = useRouter()
|
|
const dictStore = useDictStore()
|
|
const dictStore = useDictStore()
|
|
const { getOptionLabel } = dictStore
|
|
const { getOptionLabel } = dictStore
|
|
const id = ref()
|
|
const id = ref()
|
|
|
|
+const currentImg = ref(0)
|
|
const isShared = ref(false)
|
|
const isShared = ref(false)
|
|
const commeentRef = ref<InstanceType<typeof WdInput>>()
|
|
const commeentRef = ref<InstanceType<typeof WdInput>>()
|
|
const commentItemRef = ref<InstanceType<typeof CommentItem>[]>()
|
|
const commentItemRef = ref<InstanceType<typeof CommentItem>[]>()
|
|
@@ -68,6 +69,8 @@ const isVideo = ref(false)
|
|
const reviewId = ref()
|
|
const reviewId = ref()
|
|
const refreshIndex = ref<number>()
|
|
const refreshIndex = ref<number>()
|
|
const handleChange = ({ detail: { current } }) => {
|
|
const handleChange = ({ detail: { current } }) => {
|
|
|
|
+ // console.log(current)
|
|
|
|
+ currentImg.value = current;
|
|
// swiperStyle.value = {
|
|
// swiperStyle.value = {
|
|
// height: swiperSizes.value[current].height + 'px',
|
|
// height: swiperSizes.value[current].height + 'px',
|
|
// }
|
|
// }
|
|
@@ -87,7 +90,7 @@ const setSwiperStyle = async () => {
|
|
height:
|
|
height:
|
|
height > width
|
|
height > width
|
|
? addUnit(500)
|
|
? addUnit(500)
|
|
- : addUnit(
|
|
|
|
|
|
+ : height === width?addUnit(screenWidth):addUnit(
|
|
screenWidth / width > 1
|
|
screenWidth / width > 1
|
|
? height / (screenWidth / width)
|
|
? height / (screenWidth / width)
|
|
: height * (screenWidth / width),
|
|
: height * (screenWidth / width),
|
|
@@ -192,11 +195,12 @@ onShareAppMessage(async ({ from, target }) => {
|
|
</div> -->
|
|
</div> -->
|
|
<template v-if="data.circleType === '1'">
|
|
<template v-if="data.circleType === '1'">
|
|
<template v-if="!isVideo">
|
|
<template v-if="!isVideo">
|
|
- <div>
|
|
|
|
- <swiper class="" :style="swiperStyle" @change="handleChange">
|
|
|
|
|
|
+ <div class="pos-relative">
|
|
|
|
+ <div class="currentImg">{{ currentImg + 1 }}/{{data?.bannerUrls.length}}</div>
|
|
|
|
+ <swiper :current="currentImg" :style="swiperStyle" @change="handleChange" :indicator-dots="true">
|
|
<template v-for="it of data?.bannerUrls" :key="it">
|
|
<template v-for="it of data?.bannerUrls" :key="it">
|
|
<swiper-item>
|
|
<swiper-item>
|
|
- <wd-img width="100%" height="100%" :src="it" mode="aspectFill"></wd-img>
|
|
|
|
|
|
+ <wd-img width="100%" height="100%" :src="it" mode="aspectFill" :enable-preview="true"></wd-img>
|
|
</swiper-item>
|
|
</swiper-item>
|
|
</template>
|
|
</template>
|
|
</swiper>
|
|
</swiper>
|
|
@@ -400,3 +404,16 @@ onShareAppMessage(async ({ from, target }) => {
|
|
</BottomAppBar>
|
|
</BottomAppBar>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
+<style lang="scss" scope>
|
|
|
|
+ .currentImg{
|
|
|
|
+ position:absolute;
|
|
|
|
+ z-index:2;
|
|
|
|
+ color:#fff;
|
|
|
|
+ background-color: rgba(0,0,0,.5);
|
|
|
|
+ top:10rpx;
|
|
|
|
+ right:10rpx;
|
|
|
|
+ padding:4rpx 20rpx;
|
|
|
|
+ font-size:24rpx;
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
+ }
|
|
|
|
+</style>
|