2024-06-04 14:45:34 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="AppMy">
|
2024-06-07 15:22:53 +08:00
|
|
|
|
<u-navbar title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false"></u-navbar>
|
2024-06-04 14:45:34 +08:00
|
|
|
|
<div class="my-bg"></div>
|
|
|
|
|
|
<div class="my-content">
|
|
|
|
|
|
<div class="user-info">
|
|
|
|
|
|
<div class="user-left">
|
2024-06-12 14:03:51 +08:00
|
|
|
|
<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>
|
2024-06-04 14:45:34 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="user-right">
|
2024-06-12 14:03:51 +08:00
|
|
|
|
<p>{{user.nickName || '微信用户'}}</p>
|
|
|
|
|
|
<div>{{user.departmentName || ''}}</div>
|
2024-06-04 14:45:34 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2024-06-07 15:22:53 +08:00
|
|
|
|
<!-- <div class="app-list">
|
2024-06-04 14:45:34 +08:00
|
|
|
|
<div class="item">
|
|
|
|
|
|
<div class="item-left">
|
2024-06-17 17:58:05 +08:00
|
|
|
|
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/icon1.png" alt="" class="icon-img">应用1
|
2024-06-04 14:45:34 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item-right">
|
2024-06-17 17:58:05 +08:00
|
|
|
|
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/right-icon.png" alt="" class="right-img">
|
2024-06-04 14:45:34 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
<div class="item-left">
|
2024-06-17 17:58:05 +08:00
|
|
|
|
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/icon2.png" alt="" class="icon-img">应用2
|
2024-06-04 14:45:34 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item-right">
|
2024-06-17 17:58:05 +08:00
|
|
|
|
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/right-icon.png" alt="" class="right-img">
|
2024-06-04 14:45:34 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2024-06-07 15:22:53 +08:00
|
|
|
|
</div> -->
|
2024-06-12 14:03:51 +08:00
|
|
|
|
<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>
|
2024-06-04 14:45:34 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {mapActions, mapState} from 'vuex'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'AppDialogue',
|
|
|
|
|
|
appName: 'Copilot小助理(个人中心)',
|
|
|
|
|
|
customNavigation: true,
|
|
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
backgroundNavbar: {
|
|
|
|
|
|
background: 'url(https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/header-bg.jpeg) no-repeat',
|
|
|
|
|
|
backgroundSize: 'cover',
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
...mapState(['user', 'token']),
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
onLoad() {
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
2024-06-12 14:03:51 +08:00
|
|
|
|
...mapActions(['autoLogin', 'getUserInfo']),
|
|
|
|
|
|
handleAdminLogin({detail: {code: phoneCode}}) {
|
|
|
|
|
|
if (!this.token) {
|
|
|
|
|
|
this.autoLogin({loginWay: 'admin', phoneCode}).then(() => {
|
|
|
|
|
|
this.getUserInfo()
|
2024-06-18 09:53:21 +08:00
|
|
|
|
this.$u.toast('登录成功')
|
2024-06-12 14:03:51 +08:00
|
|
|
|
})
|
2024-06-18 09:53:21 +08:00
|
|
|
|
}
|
2024-06-12 14:03:51 +08:00
|
|
|
|
},
|
|
|
|
|
|
onLogout() {
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
|
title: '提示',
|
|
|
|
|
|
content: "是否要退出登录",
|
|
|
|
|
|
success: res => {
|
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
|
this.$store.commit('logout')
|
|
|
|
|
|
this.$toast('退出成功');
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
this.getAuth();
|
|
|
|
|
|
}, 500)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2024-06-04 14:45:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
.AppMy {
|
|
|
|
|
|
.my-bg {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 420px;
|
|
|
|
|
|
background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png");
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
background-size: 100vw;
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
}
|
|
|
|
|
|
.my-content {
|
|
|
|
|
|
.user-info {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
padding: 76px 0 56px 48px;
|
|
|
|
|
|
.user-left {
|
|
|
|
|
|
.user-img {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 96px;
|
|
|
|
|
|
height: 96px;
|
|
|
|
|
|
border: 4px solid #FFF;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
margin-right: 26px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.user-right {
|
|
|
|
|
|
padding-top: 4px;
|
|
|
|
|
|
p {
|
|
|
|
|
|
height: 48px;
|
|
|
|
|
|
font-family: PingFangSC-SNaNpxibold;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
font-size: 34px;
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
margin-bottom: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
div {
|
|
|
|
|
|
height: 36px;
|
|
|
|
|
|
font-family: PingFangSC-Regular;
|
|
|
|
|
|
font-size: 26px;
|
|
|
|
|
|
color: #8A929F;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.app-list {
|
|
|
|
|
|
width: calc(100% - 64px);
|
|
|
|
|
|
margin: 0 0 0 32px;
|
|
|
|
|
|
padding: 20px 32px;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
|
.item {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
padding: 26px 0 28px 0;
|
|
|
|
|
|
.item-left {
|
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
|
font-family: PingFangSC-Regular;
|
|
|
|
|
|
font-size: 30px;
|
|
|
|
|
|
color: #222;
|
|
|
|
|
|
.icon-img {
|
|
|
|
|
|
width: 40px;
|
|
|
|
|
|
height: 40px;
|
|
|
|
|
|
margin-right: 24px;
|
|
|
|
|
|
vertical-align: bottom;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.item-right {
|
|
|
|
|
|
.right-img {
|
|
|
|
|
|
width: 28px;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-06-12 14:03:51 +08:00
|
|
|
|
.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;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-06-04 14:45:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|