【修改】 点击头像去登录

This commit is contained in:
fengachen
2021-12-28 19:37:30 +08:00
parent 4074f0a21b
commit 3600215106
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -120,6 +120,12 @@ Page({
url: '../login/login',
})
},
// 点击头像去登录
goLoginByImg(){
isLogin( () => {
console.log('12');
})
},
// 退出登录
logout() {
wx.showModal({
+1 -1
View File
@@ -5,7 +5,7 @@
<!-- 顶部选项栏 -->
<view class="select-box">
<view class="avator">
<image wx:if="{{!avatarUrl}}" src="../../assets/images/tx.png"></image>
<image wx:if="{{!avatarUrl}}" bindtap="goLoginByImg" src="../../assets/images/tx.png"></image>
<image wx:if="{{avatarUrl}}" src="{{avatarUrl}}"></image>
<view class="info">
<text wx:if="{{!name}}" bindtap="goLogin">未登录</text>