From db9cf0e24e4d0a3953a98eb222a643eece4a6748 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sun, 04 Jul 2021 08:32:29 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
---
pages/myself/myself.vue | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/pages/myself/myself.vue b/pages/myself/myself.vue
index 4af6745..78f056a 100644
--- a/pages/myself/myself.vue
+++ b/pages/myself/myself.vue
@@ -4,8 +4,8 @@
<view class="m-top">
<view class="my-user-info">
<view class="user-name-id">
- <view class="user-name">{{userName}}</view>
- <view class="user-id">ID: 4120552252</view>
+ <view class="user-name">{{name}}</view>
+ <view class="user-id">ID: {{id}}</view>
</view>
<view class="userImg">
<img class="img" :src="useimg" @click="ChooseImage">
@@ -13,7 +13,7 @@
</view>
<view class="my-dept-info">
<view class="dept-info">
- <view class="dept-name">所属组织: **派出所--**警务站</view>
+ <view class="dept-name">所属组织: {{tenantName}}</view>
</view>
</view>
</view>
@@ -94,7 +94,10 @@
},
],
- tabbar:this.$store.state.tabbar
+ tabbar:this.$store.state.tabbar,
+ name:'',
+ id:'',
+ tenantName:''
}
},
components: {
@@ -109,6 +112,10 @@
}
},
onLoad() {
+ if(this.$store.state.puserID){
+ //获取个人信息
+ this.getOneselfInFo();
+ }
if(this.$store.state.avatar!=null && this.$store.state.avatar!=''){
this.useimg = this.$store.state.avatar;
}
@@ -166,6 +173,20 @@
animationType: 'slide-in-top',
animationDuration: 20000
});
+ },
+ //登录成功后,获取个人信息
+ getOneselfInFo(){
+ var that = this;
+ //保安信息查询
+ uni.request({
+ url:'http://s16s652780.51mypc.cn/api/blade-user/details?id='+this.$store.state.puserID,
+ method:'POST',
+ success(resdata) {
+ that.name = resdata.data.data.realName;
+ that.id = resdata.data.data.id;
+ that.tenantName = resdata.data.data.tenantName;
+ }
+ })
},
operation(e) {
let that = this;
@@ -392,7 +413,6 @@
font-weight: 550;
}
}
-
}
--
Gitblit v1.9.3