登录
This commit is contained in:
@@ -52,6 +52,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="login-btn">
|
||||||
|
|
||||||
|
<img src="./img/question-icon.png" alt="">登录
|
||||||
|
</div> -->
|
||||||
|
<button class="login-btn" open-type="getPhoneNumber" @getphonenumber="handleAdminLogin">
|
||||||
|
<img src="./img/question-icon.png" alt="">登录
|
||||||
|
</button>
|
||||||
<AiLogin ref="login"/>
|
<AiLogin ref="login"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -282,7 +289,14 @@ export default {
|
|||||||
innerAudioContext.onStop(() => {
|
innerAudioContext.onStop(() => {
|
||||||
this.messageList[index].isPlay = false
|
this.messageList[index].isPlay = false
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
handleAdminLogin({detail: {code: phoneCode}}) {
|
||||||
|
if (!this.token) {
|
||||||
|
this.autoLogin({loginWay: 'admin', phoneCode}).then(() => {
|
||||||
|
this.getUserInfo()
|
||||||
|
})
|
||||||
|
} else this.$u.toast("已登录,无需重新登录!")
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -438,7 +452,6 @@ page {
|
|||||||
left: -12px;
|
left: -12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-bottom {
|
.fixed-bottom {
|
||||||
@@ -502,5 +515,31 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.login-btn {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 500px;
|
||||||
|
left: 0;
|
||||||
|
width: 144px;
|
||||||
|
height: 64px;
|
||||||
|
background: #B8B8B8;
|
||||||
|
border-top-right-radius: 44px;
|
||||||
|
border-bottom-right-radius: 44px;
|
||||||
|
padding: 12px 16px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 40px;
|
||||||
|
font-family: PingFangSC-Medium;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28px;
|
||||||
|
color: #FFF;
|
||||||
|
z-index: 999;
|
||||||
|
img {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
vertical-align: bottom;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
BIN
src/project/baiduAI/AppDialogue/img/question-icon.png
Normal file
BIN
src/project/baiduAI/AppDialogue/img/question-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -5,11 +5,12 @@
|
|||||||
<div class="my-content">
|
<div class="my-content">
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<div class="user-left">
|
<div class="user-left">
|
||||||
<img src="./img/header-bg.png" alt="" class="user-img">
|
<img :src="user.avatarUrl" alt="" class="user-img" v-if="user.avatarUrl">
|
||||||
|
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" class="user-img" v-else>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-right">
|
<div class="user-right">
|
||||||
<p>张总</p>
|
<p>{{user.nickName || '微信用户'}}</p>
|
||||||
<div>党委书记</div>
|
<div>{{user.departmentName || ''}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="app-list">
|
<!-- <div class="app-list">
|
||||||
@@ -30,6 +31,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
<div class="login" v-if="!token">
|
||||||
|
<button class="login-btn" open-type="getPhoneNumber" @getphonenumber="handleAdminLogin">授权手机号登录</button>
|
||||||
|
</div>
|
||||||
|
<div class="login" v-else @click="onLogout">
|
||||||
|
<div class="login-btn">退出登录</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -55,11 +62,32 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['autoLogin']),
|
...mapActions(['autoLogin', 'getUserInfo']),
|
||||||
|
handleAdminLogin({detail: {code: phoneCode}}) {
|
||||||
|
if (!this.token) {
|
||||||
|
this.autoLogin({loginWay: 'admin', phoneCode}).then(() => {
|
||||||
|
this.getUserInfo()
|
||||||
|
})
|
||||||
|
} else this.$u.toast("已登录,无需重新登录!")
|
||||||
|
},
|
||||||
|
onLogout() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: "是否要退出登录",
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.$store.commit('logout')
|
||||||
|
this.$toast('退出成功');
|
||||||
|
setTimeout(() => {
|
||||||
|
this.getAuth();
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -141,5 +169,23 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.login {
|
||||||
|
width: 100%;
|
||||||
|
height: 96px;
|
||||||
|
padding: 0 32px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 96px;
|
||||||
|
text-align: center;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 120px;
|
||||||
|
left: 0;
|
||||||
|
.login-btn {
|
||||||
|
background: #4181FF;
|
||||||
|
border-radius: 16px;
|
||||||
|
font-size: 34px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user