liuyg
2021-07-04 db9cf0e24e4d0a3953a98eb222a643eece4a6748
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: &nbsp;4120552252</view>
               <view class="user-name">{{name}}</view>
               <view class="user-id">ID: &nbsp;{{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">所属组织:&nbsp;**派出所--**警务站</view>
               <view class="dept-name">所属组织:&nbsp;{{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;
               }
            }
         }