|
@@ -24,58 +24,63 @@
|
|
|
<!-- -->
|
|
<!-- -->
|
|
|
<!-- 加载图片会闪屏 双if避免 -->
|
|
<!-- 加载图片会闪屏 双if避免 -->
|
|
|
<template v-if="currentIndex + visible >= index && currentIndex <= index">
|
|
<template v-if="currentIndex + visible >= index && currentIndex <= index">
|
|
|
- <view class="tantan-slide-img-box" :animation="animationData" :style="{height: winHeight + 'px'}">
|
|
|
|
|
- <scroll-view :enhanced="true" :bounces="false" :show-scrollbar="false" refresher-default-style="none" class="tantan-slide-img-scroll-box" @scroll="endScroll" :scroll-y="!ifLongTap" :style="{height: item.boxHeight + 'px',width:item.boxWidth+'px'}">
|
|
|
|
|
- <view class="img-list tantan-slide-img">
|
|
|
|
|
- <swiper :style="{height: item.boxHeight + 'px',width:item.boxWidth+'px'}" class="swiper" :current="item.imgIndex" :indicator-dots="false" :autoplay="false" :interval="0"
|
|
|
|
|
- :duration="0">
|
|
|
|
|
- <swiper-item v-for="(img,imgIndex) in item.images">
|
|
|
|
|
- <image :style="{height: item.boxHeight + 'px',width:item.boxWidth+'px'}" mode="aspectFill" :src="img" ></image>
|
|
|
|
|
- </swiper-item>
|
|
|
|
|
|
|
|
|
|
- </swiper>
|
|
|
|
|
-
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="user-authentication">
|
|
|
|
|
- <image class="authentication-img" mode="aspectFill" src="/static/img/index/authentication.png" ></image>
|
|
|
|
|
- <view class="authentication-text sys-color-white sys-weight-600">真实头像</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="slide-img-click">
|
|
|
|
|
- <view class="slide-img-click-item" @click.stop="setImgKey(item,0)"></view>
|
|
|
|
|
- <view class="slide-img-click-item" @click.stop="setImgKey(item,1)"></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="img-num-list" >
|
|
|
|
|
- <view class="num-item" :class="{'num-item-default':imgIndex===item.imgIndex}" v-for="(img,imgIndex) in item.images"></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="slide-data">
|
|
|
|
|
- <!-- 用户个性消息-->
|
|
|
|
|
- <view class="on-line-box">
|
|
|
|
|
- <image class="on-line-img" mode="aspectFill" src="/static/img/index/on-line.png" ></image>
|
|
|
|
|
- <view class="on-line-text sys-color-black-0 sys-weight-400">当前在线</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="user-data">
|
|
|
|
|
- <text class="user-item sys-color-white sys-weight-600">Maple</text>
|
|
|
|
|
- <text class="user-item sys-color-white sys-weight-600">,</text>
|
|
|
|
|
- <text class="user-item sys-color-white sys-weight-600">19</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="user-city">
|
|
|
|
|
- <text class="city-item sys-color-yellow sys-weight-600">17.16</text>
|
|
|
|
|
- <text class="city-item sys-color-white sys-weight-400">km</text>
|
|
|
|
|
- <text class="city-item sys-color-white sys-weight-600">重庆市九龙坡</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="open-wechat">
|
|
|
|
|
- <image class="open-wechat-img" mode="aspectFill" src="/static/img/index/wechat.png" ></image>
|
|
|
|
|
- <view class="open-wechat-text sys-color-white sys-weight-400">yxk********</view>
|
|
|
|
|
- <image class="lock-wechat-img" mode="aspectFill" src="/static/img/index/lock.png" ></image>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="tantan-slide-bg" :animation="currentIndex===index?animationData:{}">
|
|
|
|
|
+ <view class="tantan-slide-img-box" :style="{height: winHeight + 'px'}">
|
|
|
|
|
+ <scroll-view :enhanced="true" :bounces="false" :show-scrollbar="false" refresher-default-style="none" class="tantan-slide-img-scroll-box" @scroll="endScroll" :scroll-y="!ifLongTap" :style="{height: item.boxHeight + 'px',width:item.boxWidth+'px'}">
|
|
|
|
|
+ <view class="img-list tantan-slide-img">
|
|
|
|
|
+ <!-- <swiper :style="{height: item.boxHeight + 'px',width:item.boxWidth+'px'}" class="swiper" :current="item.imgIndex" :indicator-dots="false" :autoplay="false" :interval="0"-->
|
|
|
|
|
+ <!-- :duration="0">-->
|
|
|
|
|
+ <!-- <swiper-item v-for="(img,imgIndex) in item.images">-->
|
|
|
|
|
+ <!-- <image :style="{height: item.boxHeight + 'px',width:item.boxWidth+'px'}" mode="aspectFill" :src="img" ></image>-->
|
|
|
|
|
+ <!-- </swiper-item>-->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- </swiper>-->
|
|
|
|
|
+ <image :style="{height: item.boxHeight + 'px',width:item.boxWidth+'px'}" mode="aspectFill" :src="item.image" ></image>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="user-authentication">
|
|
|
|
|
+ <image class="authentication-img" mode="aspectFill" src="/static/img/index/authentication.png" ></image>
|
|
|
|
|
+ <view class="authentication-text sys-color-white sys-weight-600">真实头像</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="slide-img-click">
|
|
|
|
|
+ <view class="slide-img-click-item" @click.stop="setImgKey(item,0)"></view>
|
|
|
|
|
+ <view class="slide-img-click-item" @click.stop="setImgKey(item,1)"></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="img-num-list" >
|
|
|
|
|
+ <view class="num-item" :class="{'num-item-default':imgIndex===item.imgIndex}" v-for="(img,imgIndex) in item.images"></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="slide-data">
|
|
|
|
|
+ <!-- 用户个性消息-->
|
|
|
|
|
+ <view class="on-line-box">
|
|
|
|
|
+ <image class="on-line-img" mode="aspectFill" src="/static/img/index/on-line.png" ></image>
|
|
|
|
|
+ <view class="on-line-text sys-color-black-0 sys-weight-400">当前在线</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="user-data">
|
|
|
|
|
+ <text class="user-item sys-color-white sys-weight-600">Maple</text>
|
|
|
|
|
+ <text class="user-item sys-color-white sys-weight-600">,</text>
|
|
|
|
|
+ <text class="user-item sys-color-white sys-weight-600">19</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="user-city">
|
|
|
|
|
+ <text class="city-item sys-color-yellow sys-weight-600">17.16</text>
|
|
|
|
|
+ <text class="city-item sys-color-white sys-weight-400">km</text>
|
|
|
|
|
+ <text class="city-item sys-color-white sys-weight-600">重庆市九龙坡</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="open-wechat">
|
|
|
|
|
+ <image class="open-wechat-img" mode="aspectFill" src="/static/img/index/wechat.png" ></image>
|
|
|
|
|
+ <view class="open-wechat-text sys-color-white sys-weight-400">yxk********</view>
|
|
|
|
|
+ <image class="lock-wechat-img" mode="aspectFill" src="/static/img/index/lock.png" ></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="user-content">
|
|
|
|
|
+ <user-content></user-content>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </scroll-view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="user-content">
|
|
|
|
|
- <user-content></user-content>
|
|
|
|
|
- </view>
|
|
|
|
|
- </scroll-view>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
<view v-if="index === currentIndex">
|
|
<view v-if="index === currentIndex">
|
|
|
<view class="tantan-slide-box-icon tantan-slide-box-dislike"
|
|
<view class="tantan-slide-box-icon tantan-slide-box-dislike"
|
|
|
:style="{
|
|
:style="{
|
|
@@ -165,11 +170,11 @@
|
|
|
this.list[index].boxWidth=this.winWidth-18
|
|
this.list[index].boxWidth=this.winWidth-18
|
|
|
this.list[index].boxHeight=this.winHeight
|
|
this.list[index].boxHeight=this.winHeight
|
|
|
}else if(type===2){
|
|
}else if(type===2){
|
|
|
- this.list[index].boxWidth=this.winWidth-23
|
|
|
|
|
|
|
+ this.list[index].boxWidth=this.winWidth-26
|
|
|
this.list[index].boxHeight=this.winHeight-20
|
|
this.list[index].boxHeight=this.winHeight-20
|
|
|
}else {
|
|
}else {
|
|
|
- this.list[index].boxWidth=this.winWidth-28
|
|
|
|
|
- this.list[index].boxHeight=this.winHeight-30
|
|
|
|
|
|
|
+ this.list[index].boxWidth=this.winWidth-32
|
|
|
|
|
+ this.list[index].boxHeight=this.winHeight-32
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -217,13 +222,13 @@
|
|
|
}
|
|
}
|
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
|
this.animationData=null
|
|
this.animationData=null
|
|
|
- },101)
|
|
|
|
|
|
|
+ },120)
|
|
|
console.log('item.imgIndex:'+item.imgIndex)
|
|
console.log('item.imgIndex:'+item.imgIndex)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
setOverturnImg(item){
|
|
setOverturnImg(item){
|
|
|
tools.vibrate()
|
|
tools.vibrate()
|
|
|
- return true;
|
|
|
|
|
|
|
+ item.image=item.images[item.imgIndex]
|
|
|
let animation = uni.createAnimation({
|
|
let animation = uni.createAnimation({
|
|
|
duration: 100,
|
|
duration: 100,
|
|
|
timingFunction: 'ease',
|
|
timingFunction: 'ease',
|
|
@@ -241,6 +246,8 @@
|
|
|
// tools.error('two')
|
|
// tools.error('two')
|
|
|
// return;
|
|
// return;
|
|
|
tools.vibrate()
|
|
tools.vibrate()
|
|
|
|
|
+ // this.animationData=true
|
|
|
|
|
+ // return true
|
|
|
let animation = uni.createAnimation({
|
|
let animation = uni.createAnimation({
|
|
|
duration: 100,
|
|
duration: 100,
|
|
|
timingFunction: 'ease',
|
|
timingFunction: 'ease',
|
|
@@ -420,7 +427,7 @@
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
-@import 'animate.css';
|
|
|
|
|
|
|
+
|
|
|
.tantan-slide {
|
|
.tantan-slide {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
@@ -470,6 +477,9 @@
|
|
|
.tantan-slide-box-dislike {
|
|
.tantan-slide-box-dislike {
|
|
|
right: 50rpx;
|
|
right: 50rpx;
|
|
|
}
|
|
}
|
|
|
|
|
+ .tantan-slide-bg{
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ }
|
|
|
.tantan-slide-img-box {
|
|
.tantan-slide-img-box {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
will-change: transform;
|
|
will-change: transform;
|