优化我的页面
This commit is contained in:
parent
172f5cefcd
commit
e539c5da61
@ -15,7 +15,8 @@
|
|||||||
<view class="personage">
|
<view class="personage">
|
||||||
<view class="my_msg flex_a_c_j_sb">
|
<view class="my_msg flex_a_c_j_sb">
|
||||||
<view class="flex_a_c">
|
<view class="flex_a_c">
|
||||||
<u--image :showLoading="true" :src="oaUserInfo.avatar||'../../static/img/public/avatar.png'" width="112.28rpx" height="112.28rpx" shape="circle">
|
<u--image :showLoading="true" :src="oaUserInfo.avatar||'../../static/img/public/avatar.png'"
|
||||||
|
width="112.28rpx" height="112.28rpx" shape="circle">
|
||||||
</u--image>
|
</u--image>
|
||||||
<view v-if="!$store.state.app.token" @click="login" class="name_work">
|
<view v-if="!$store.state.app.token" @click="login" class="name_work">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
@ -31,8 +32,8 @@
|
|||||||
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
|
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="work">
|
<view class="work">
|
||||||
电话:{{oaUserInfo.account}}
|
电话:{{oaUserInfo.account}}
|
||||||
|
|
||||||
<!-- 所属公司:<text class="omit" v-if="oaUserInfo.admin.company">{{ oaUserInfo.admin.company.company_name }}</text> -->
|
<!-- 所属公司:<text class="omit" v-if="oaUserInfo.admin.company">{{ oaUserInfo.admin.company.company_name }}</text> -->
|
||||||
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
|
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
|
||||||
</view>
|
</view>
|
||||||
@ -112,34 +113,34 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.getOaUserInfo();
|
this.getOaUserInfo();
|
||||||
},
|
},
|
||||||
computed:{
|
computed: {
|
||||||
eyeType(){
|
eyeType() {
|
||||||
return this.$store.state.config.eyeType;
|
return this.$store.state.config.eyeType;
|
||||||
},
|
},
|
||||||
oaUserInfo(){
|
oaUserInfo() {
|
||||||
return this.$store.state.app.userInfo||{avatar:'',admin:{company:{company_name:''}}};
|
return this.$store.state.app.userInfo || { avatar: '', admin: { company: { company_name: '' } } };
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['getWxLogin']),
|
...mapActions(['getWxLogin']),
|
||||||
login() {
|
login() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/oaLogin/oaLogin'
|
url: '/pages/oaLogin/oaLogin'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
logout(){
|
logout() {
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
content:'确定要退出登录吗',
|
content: '确定要退出登录吗',
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
if(e.confirm){
|
if (e.confirm) {
|
||||||
that.$store.commit('SET_USERINFO',{
|
that.$store.commit('SET_USERINFO', {
|
||||||
user: null,
|
user: null,
|
||||||
token: null
|
token: null
|
||||||
})
|
})
|
||||||
that.$store.commit('LOGOUT');
|
that.$store.commit('LOGOUT');
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/oaLogin/oaLogin'
|
url: '/pages/oaLogin/oaLogin'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,17 +227,20 @@
|
|||||||
.name_work {
|
.name_work {
|
||||||
margin-left: 31.58rpx;
|
margin-left: 31.58rpx;
|
||||||
font-size: 28.07rpx;
|
font-size: 28.07rpx;
|
||||||
.name{
|
|
||||||
.nickname{
|
.name {
|
||||||
|
.nickname {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.work {
|
.work {
|
||||||
margin-top: 14.04rpx;
|
margin-top: 14.04rpx;
|
||||||
}
|
}
|
||||||
.omit{
|
|
||||||
|
.omit {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
/* 禁止换行 */
|
/* 禁止换行 */
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -298,12 +302,12 @@
|
|||||||
font-size: 28.07rpx;
|
font-size: 28.07rpx;
|
||||||
margin-left: 20.56rpx;
|
margin-left: 20.56rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left{
|
.left {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
image{
|
image {
|
||||||
width: 42rpx;
|
width: 42rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user