userInfo.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view class="page-bg container">
  3. <view class="back-container">
  4. <navigator url="/pages/index/index">
  5. <uni-icons type="back" size="40" color="#FFFFFF"></uni-icons>
  6. </navigator>
  7. </view>
  8. <view class="login-container">
  9. <view class="avator-container">
  10. <uni-icons type="person" size="130" color="#FFFFFF"></uni-icons>
  11. </view>
  12. <view class="btn-container" @click="logout">注销</view>
  13. </view>
  14. </view>
  15. </template>
  16. <script setup>
  17. const logout = () => {
  18. uni.removeStorageSync("token");
  19. uni.reLaunch({
  20. url: "/pages/index/index"
  21. });
  22. }
  23. </script>
  24. <style lang="scss" scoped>
  25. .container {
  26. width: 100vw;
  27. height: 100vh;
  28. padding: 16rpx;
  29. .back-container {
  30. left: 16rpx;
  31. top: 39px;
  32. width: 90rpx;
  33. height: 90rpx;
  34. border-radius: 50%;
  35. background-color: rgba(0, 0, 0, 0.1);
  36. display: flex;
  37. justify-content: center;
  38. align-items: center;
  39. }
  40. .login-container {
  41. width: 100%;
  42. height: 100%;
  43. display: flex;
  44. justify-content: center;
  45. align-items: center;
  46. flex-direction: column;
  47. .avator-container {
  48. left: 222rpx;
  49. top: 254rpx;
  50. width: 307rpx;
  51. height: 307rpx;
  52. background: #D2EFF3;
  53. border-radius: 50%;
  54. box-shadow: 0px 2px 2px 0px #DBDBDB;
  55. display: flex;
  56. justify-content: center;
  57. align-items: center;
  58. }
  59. .btn-container {
  60. margin-top: 57rpx;
  61. width: 500rpx;
  62. height: 100rpx;
  63. border-radius: 20rpx;
  64. background: #FA2525;
  65. font-size: 48rpx;
  66. font-weight: 700;
  67. letter-spacing: 0rpx;
  68. line-height: 69.5rpx;
  69. color: #FFFFFF;
  70. display: flex;
  71. justify-content: center;
  72. align-items: center;
  73. }
  74. }
  75. }
  76. </style>