setting.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="setting">
  3. <view class="header-bg"></view>
  4. <view class="block b1">
  5. <view class="row portrait">
  6. <image class="image" src="../../static/images/login/logo.png" mode="scaleToFill"></image>
  7. </view>
  8. <view class="row">
  9. <view class="label">
  10. 昵称
  11. </view>
  12. <view class="option">
  13. 修改
  14. </view>
  15. </view>
  16. </view>
  17. <view class="block b2">
  18. <view class="row">
  19. <view class="label">支付宝绑定</view>
  20. <view class="option">未绑定</view>
  21. </view>
  22. <view class="line"></view>
  23. <view class="row">
  24. <view>微信绑定</view>
  25. <view class="option">未绑定</view>
  26. </view>
  27. </view>
  28. <view class="block b3">
  29. <view class="row">
  30. <view class="label">修改手机号 <text class="info">18111897865</text></view>
  31. <view class="option">已绑定</view>
  32. </view>
  33. <view class="line"></view>
  34. <view class="row">
  35. <view class="label">修改密码</view>
  36. <view class="option"></view>
  37. </view>
  38. </view>
  39. <view class="block b4">
  40. <view class="row">
  41. <view class="label">清除缓存 <text class="info">18.20MB</text></view>
  42. <view class="option"><button class="clear-cache-btn" type="default">清除缓存</button></view>
  43. </view>
  44. </view>
  45. <view class="logout-block">
  46. <button class="logout-btn" type="default" @tap="logout()">退出登录</button>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. }
  55. },
  56. methods: {
  57. logout() {
  58. uni.navigateBack({
  59. delta: 999,
  60. animationType:'none'
  61. })
  62. uni.navigateTo({
  63. url: '/pages/user/login'
  64. })
  65. this.$store.dispatch("user/logout")
  66. }
  67. }
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .setting {
  72. overflow: hidden;
  73. position: relative;
  74. }
  75. .header-bg {
  76. background-color: $primary-color;
  77. height: 120upx;
  78. position: absolute;
  79. top: 0;
  80. width: 100%;
  81. z-index: 1;
  82. }
  83. .portrait {
  84. justify-content: center !important;
  85. margin-top: 20upx;
  86. .image {
  87. width: 168upx;
  88. height: 168upx;
  89. border: 10upx solid $primary-color;
  90. border-radius: 100upx;
  91. }
  92. }
  93. .block {
  94. border-radius: 20upx;
  95. background-color: white;
  96. margin: 20upx;
  97. position: relative;
  98. overflow: hidden;
  99. z-index: 2;
  100. .row {
  101. display: flex;
  102. justify-content: space-between;
  103. padding: 20upx 40upx;
  104. align-items: center;
  105. font-size: 28upx;
  106. .info {
  107. color: #999999;
  108. font-size: 24upx;
  109. display: inline-block;
  110. margin-left: 20upx;
  111. }
  112. .option {
  113. color: #999999;
  114. }
  115. }
  116. }
  117. .logout-block {
  118. margin: 20upx;
  119. }
  120. .clear-cache-btn {
  121. line-height: normal;
  122. padding: 4upx 20upx;
  123. background: white;
  124. border: 2upx solid $primary-color;
  125. font-size: 24upx;
  126. border-radius: 50upx;
  127. color: $primary-color;
  128. }
  129. .logout-btn {
  130. background: $primary-color;
  131. color: white;
  132. font-size: 30upx;
  133. line-height: 80upx;
  134. }
  135. .line {
  136. border: 2upx solid #EEEEEE;
  137. transform: scale(0.9, 0.5);
  138. }
  139. </style>