#
whycq
2023-10-10 155f2b80f2a9b6f900c73f6e4461e9cebb7cd028
pages/user/user_detail/userDetail.vue
@@ -1,6 +1,6 @@
<template>
   <view>
      <view style="background-color: #fff;">
      <view style="background-color: #fff;" @click="clickk">
         <view class="item">
            <view>角色</view><view class="item-right">{{detail.roleName}}</view>
            <view class="user-icons">
@@ -38,7 +38,7 @@
            </view>
         </view>
         <view class="item">
            <view>密码</view><view class="item-right">{{detail.roleName}}</view>
            <view>密码</view><view class="item-right"></view>
            <view class="user-icons">
               <uni-icons type="right" color="#c1c1c1"></uni-icons>
            </view>
@@ -75,13 +75,40 @@
               method: 'POST',
               success(res) {
                  res = res.data
                  that.detail = res.data
                  console.log(res.data);
                  if (res.code === 200) {
                     that.detail = res.data
                  } else if (res.code === 403) {
                     uni.showToast({title: res.msg, icon: "none", position: 'top'})
                     setTimeout(() => {
                        uni.reLaunch({
                           url: '../../login/login'
                        });
                     }, 1000);
                  } else {
                     uni.showToast({title: res.msg, icon: "none",position: 'top'})
                  }
               }
            })
         },
         clickk() {
            uni.showToast({
               icon:'error',
               title: '暂不支持修改',
               duration: 2000
            })
         },
         logOut() {
            uni.showToast({
               title: '退出成功',
               duration: 1000
            })
            setTimeout(() => {
               uni.removeStorageSync('token');
               uni.removeStorageSync('password');
               uni.reLaunch({
                   url:"/pages/login/login"
               });
            }, 1000);
         }
         
      }
@@ -89,6 +116,9 @@
</script>
<style>
   * {
      font-weight: 700;
   }
   .item {
      background-color: #FFF;
      min-height: 90rpx;
@@ -104,6 +134,7 @@
   .item-right {
      text-align: end;
      color: #6f6f6f;
      font-weight: 400;
   }
   .user-icons {
      text-align: center;