mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-18 00:15:54 +08:00
配置微信小程序返回首页按钮
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user