You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
1.7 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
  1. <template>
  2. <view class="main">
  3. <view :style="{height:iSMT+'px'}"></view>
  4. <view style="height:1.5vh;" />
  5. <view class="top">
  6. <!-- <view class="top-list" @click="goToBindPhone">
  7. <text class="label">手机号</text>
  8. <view class="right">
  9. <text style="font-size: 28rpx;">
  10. {{ userStore.userInfo?.phone || '未绑定' }}
  11. </text>
  12. <uni-icons type="arrowright" size="16" />
  13. </view>
  14. </view> -->
  15. <view class="top-list" @click="goToBindEmail">
  16. <text class="label">邮箱</text>
  17. <view class="right">
  18. <text style="font-size: 28rpx;">
  19. {{ userStore.userInfo?.email || '未绑定' }}
  20. </text>
  21. <uni-icons type="arrowright" size="16" />
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script setup>
  28. import {
  29. ref,
  30. onMounted
  31. } from 'vue'
  32. import { useUserStore } from "../../stores/modules/userInfo"
  33. const userStore = useUserStore()
  34. const iSMT = ref(0)
  35. const goToBindPhone = () =>{
  36. uni.navigateTo({
  37. url:'../setting/phone'
  38. })
  39. }
  40. const goToBindEmail = () =>{
  41. uni.navigateTo({
  42. url:'../setting/email'
  43. })
  44. }
  45. onMounted(() => {
  46. // 状态栏高度
  47. iSMT.value = uni.getSystemInfoSync().statusBarHeight;
  48. console.log('看看高度', iSMT.value)
  49. console.log('看看用户信息',userStore.userInfo)
  50. })
  51. </script>
  52. <style>
  53. .top {
  54. height: 14vh;
  55. background-color: white;
  56. display: flex;
  57. flex-direction: column;
  58. align-items: center;
  59. justify-content: center;
  60. }
  61. .top-list {
  62. width: 630rpx;
  63. height: 7vh;
  64. margin: 0rpx 40rpx;
  65. display: flex;
  66. align-items: center;
  67. border-bottom: 1rpx solid #eee;
  68. }
  69. .top-list:last-child {
  70. border: none;
  71. }
  72. .label {
  73. font-size: 28rpx;
  74. flex: 1;
  75. }
  76. .right{
  77. display: flex;
  78. align-items: center;
  79. justify-content: center;
  80. }
  81. </style>