set.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <view class="center">
  3. <view class="tt">
  4. <view class="tt-box" @click="nav('/pages/user/approve')">
  5. <image src="../../static/img/real_name.png" class="tt-icon1" mode=""></image>
  6. <view class="tt-txt">实名认证</view>
  7. <image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
  8. </view>
  9. <view class="tt-box" @click="nav('/pages/set/password')">
  10. <image src="../../static/img/pwd.png" class="tt-icon1" mode=""></image>
  11. <view class="tt-txt">登录密码</view>
  12. <image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
  13. </view>
  14. <view class="tt-box" @click="nav('/pages/money/payment')">
  15. <image src="../../static/img/zfpwd.png" class="tt-icon4" mode=""></image>
  16. <view class="tt-txt">交易密码</view>
  17. <image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
  18. </view>
  19. </view>
  20. <view class="out" @click="toLogout">退出登录</view>
  21. </view>
  22. </template>
  23. <script>
  24. import { logout } from '@/api/set.js';
  25. export default {
  26. methods: {
  27. toLogout() {
  28. let obj = this;
  29. uni.showModal({
  30. content: '确定要退出登录么',
  31. success: e => {
  32. if (e.confirm) {
  33. logout({})
  34. .then(e => {
  35. uni.navigateBack();
  36. })
  37. .catch(e => {
  38. console.log(e);
  39. });
  40. obj.logout();
  41. }
  42. }
  43. });
  44. },
  45. nav(url) {
  46. uni.navigateTo({
  47. url
  48. });
  49. }
  50. }
  51. };
  52. </script>
  53. <style lang="scss">
  54. .center,
  55. page {
  56. background: #f7f7fb;
  57. }
  58. .tt {
  59. width: 750rpx;
  60. padding: 40rpx 70rpx 0;
  61. border-radius: 10rpx;
  62. background-color: #ffffff;
  63. .tt-box:last-child {
  64. border-bottom: none;
  65. }
  66. .tt-box {
  67. height: 100rpx;
  68. display: flex;
  69. align-items: center;
  70. border-bottom: 1px solid #f0f0f0;
  71. .tt-icon1 {
  72. width: 42rpx;
  73. height: 42rpx;
  74. }
  75. .tt-icon2 {
  76. width: 49rpx;
  77. height: 38rpx;
  78. }
  79. .tt-icon3 {
  80. width: 46rpx;
  81. height: 40rpx;
  82. }
  83. .tt-icon4 {
  84. width: 40rpx;
  85. height: 42rpx;
  86. }
  87. .tt-icon5 {
  88. width: 44rpx;
  89. height: 40rpx;
  90. }
  91. .tt-txt {
  92. margin-left: 36rpx;
  93. font-size: 32rpx;
  94. font-family: PingFang SC;
  95. font-weight: 500;
  96. color: #333333;
  97. flex: 1;
  98. }
  99. .next-icon {
  100. width: 16rpx;
  101. height: 25rpx;
  102. }
  103. }
  104. .border-b {
  105. border-bottom: 1px solid #f1f1f1;
  106. }
  107. }
  108. .out {
  109. display: flex;
  110. align-items: center;
  111. justify-content: center;
  112. margin: 158rpx auto 30rpx;
  113. width: 560rpx;
  114. height: 80rpx;
  115. background: linear-gradient(90deg, #58bab0, #60bab0, #45969b);
  116. border-radius: 40px;
  117. color: #ffffff;
  118. }
  119. </style>