This commit is contained in:
zhangmanman
2021-08-09 15:57:37 +08:00
parent c661dd0e16
commit 540d76bdb8
158 changed files with 4914 additions and 788 deletions

View File

@@ -159,7 +159,7 @@ Page({
},
/**
* 处理未登录时的转跳
* 处理权益未登录时的转跳
*/
userNav(e){
let user_lng = this.data.longitude, //经度
@@ -181,6 +181,23 @@ Page({
})
},
/**
* 处理未登录时的转跳
*/
userUrl(e){
let pageUrl = e.currentTarget.dataset.url
if(this.data.isUser){
wx.navigateTo({
url: pageUrl
})
}else{
// 去登录
wx.navigateTo({
url: "/pages/login/login"
})
}
},
/**
* 点击轮播图片
*/
@@ -364,7 +381,7 @@ Page({
wx.hideLoading();
}, 1000)
})
}).catch(err => {});
}
},
fail: err => {

View File

@@ -38,7 +38,6 @@
<i class="light"></i>
</swiper-item>
</swiper>
</view>
</view>
@@ -147,4 +146,14 @@
</view>
</view>
</view>
</block>
</block>
<!-- 漂浮窗 -->
<view class="indexFloat">
<view bindtap="userUrl" data-url="/pages/favour/favour" class="indexFloat-img">
<image src="https://lifetest.ysd-bs.com/storage/materials/2021/08/06/index_float_00.png" mode="aspectFill" class="indexFloat-animation"></image>
</view>
<view bindtap="userUrl" data-url="/pages/code/code" class="indexFloat-img">
<image src="/static/img/index_float_01.png" mode="aspectFill"></image>
</view>
</view>

View File

@@ -686,3 +686,36 @@ page {
25% {opacity: 0;transform: translateX(-3px);}
75% {opacity: 1;transform: translateX(3px);}
}
/* 漂浮弹出层 */
.indexFloat {
position: fixed;
right: 20rpx;
bottom: 30rpx;
z-index: 99;
}
.indexFloat-img image {
width: 130rpx;
height: 130rpx;
margin-bottom: 20rpx;
}
.indexFloat-animation {
animation: shake 3s linear infinite;
}
@keyframes shake {
70%, 80% {
transform: rotate(7deg);
}
75% {
transform: rotate(-7deg);
}
65%,
85% {
transform: rotate(0);
}
}