配置微信小程序返回首页按钮

This commit is contained in:
lemon橪
2021-08-16 10:35:12 +08:00
parent eb11f9dbae
commit 885ccb5006
4 changed files with 19 additions and 48 deletions

View File

@@ -20,6 +20,7 @@
</view>
<view class="btns">
<button type="primary" bindtap="getUserProfile" @click="getUserProfile()" class="btn-auth">使用微信授权</button>
<button @click="backToHome" class="btn-callback">暂不登录</button>
</view>
</div>
</view>
@@ -74,6 +75,11 @@ export default {
back() {
whetherNavigate("wx");
},
backToHome(){
uni.switchTab({
url: `/pages/tabbar/home/index`
});
},
//获取用户信息
getUserProfile(e) {
let that = this;
@@ -229,8 +235,8 @@ text.shop {
.btn-auth {
width: 92%;
margin: 0 auto 100rpx;
border-radius: 100px;
margin: 0 auto 40rpx;
// border-radius: 100px;
animation: mymove 5s infinite;
-webkit-animation: mymove 5s infinite; /*Safari and Chrome*/
animation-direction: alternate; /*轮流反向播放动画。*/
@@ -240,10 +246,15 @@ text.shop {
-webkit-animation-direction: alternate; /*轮流反向播放动画。*/
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
}
.btn-callback {
width: 92%;
margin: 0 auto 100rpx;
}
.btns {
margin-top: 100rpx;
display: flex;
flex-direction: column;
width: 100%;
justify-content: center;
}