index.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view>
  3. <view class="wrapper" @click="handlePersonalInfo">
  4. <text class="text">个人信息</text>
  5. <up-icon name="arrow-right" class="icon"></up-icon>
  6. <up-divider></up-divider>
  7. </view>
  8. <!-- <view class="wrapper">
  9. <text class="text">绑定</text>
  10. <up-icon name="arrow-right" class="icon"></up-icon>
  11. <up-divider></up-divider>
  12. </view> -->
  13. <!-- <view class="wrapper" @click="handlServiceAddress">
  14. <text class="text">被服务地址</text>
  15. <up-icon name="arrow-right" class="icon"></up-icon>
  16. <up-divider></up-divider>
  17. </view> -->
  18. <view class="wrapper" @click="logoOut">
  19. <text class="text">退出登陆</text>
  20. <up-icon name="arrow-right" class="icon"></up-icon>
  21. <up-divider></up-divider>
  22. </view>
  23. </view>
  24. </template>
  25. <script setup>
  26. import {
  27. ref
  28. } from 'vue'
  29. import { showConfirm } from '@/utils/common'
  30. import store from '@/store'
  31. const handlServiceAddress = () => {
  32. uni.navigateTo({
  33. url: '/pages_mine/pages/setupUser/Address'
  34. })
  35. }
  36. const handlePersonalInfo = () => {
  37. uni.navigateTo({
  38. url: '/pages_mine/pages/setupUser/personalInfo'
  39. })
  40. }
  41. const logoOut = () => {
  42. showConfirm('确认退出登陆吗?').then((res) => {
  43. if (res.confirm) {
  44. store.dispatch('LogOut').then((res) => {
  45. uni.reLaunch({
  46. url: '/pages/index',
  47. })
  48. })
  49. }
  50. })
  51. }
  52. </script>
  53. <style scoped>
  54. .wrapper {
  55. display: flex;
  56. justify-content: space-between;
  57. align-items: center;
  58. padding: 24rpx 32rpx;
  59. }
  60. .text {
  61. flex: 1;
  62. /* 文字占据剩余空间 */
  63. font-size: 28rpx;
  64. color: #333;
  65. }
  66. .icon {
  67. margin-left: 16rpx;
  68. /* 图标与文字的间距 */
  69. color: #999;
  70. /* 图标颜色 */
  71. font-size: 28rpx;
  72. /* 与文字大小匹配 */
  73. }
  74. /* 分隔线样式调整 */
  75. .up-divider {
  76. margin: 0 32rpx;
  77. /* 与内容对齐 */
  78. }
  79. </style>