system_popup.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="system_content column-justify-sb center">
  3. <view :style="{marginTop:`${$tools.topHeight()}px`}">
  4. <view class="column justify-center avatar r-100">
  5. <view class="avatar r-100" style="background-color: rgba(0, 0, 0, 0.1);"></view>
  6. <view class="row-c avatar_name m-l20">
  7. <image class="wh-100 r-circle" v-if="!memberData.head_img"
  8. src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-avatar.png"
  9. mode="aspectFill"></image>
  10. <image class="wh-100 r-circle" v-else :src="memberData.head_img" mode="aspectFill"></image>
  11. <view class="column m-l20 flex">
  12. <view class="size-30 text-color-333 ellipsis" style="width: 160rpx;">
  13. {{ memberData.name ? memberData.name : memberData.nickname }}
  14. </view>
  15. <view class="size-26 text-color-666 ellipsis" style="width: 160rpx;">
  16. {{memberData.position_name?memberData.position_name:'无'}}
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="system_item">
  22. <view class="row-c p-tb25" v-for="(item,index) in systemList" :key="index" @click="onGoSetting(item)">
  23. <image class="m-r20" :src="item.icon" mode=""></image>
  24. <text class="size-28 text-color-333">{{item.name}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="system-button m-b50">
  29. <view class="system-quit">
  30. </view>
  31. <view class="system-button button-text size-28 button-color sys-weight-600" @click="exitAccount">
  32. 退出登录
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import {
  39. logout
  40. } from "@/api/user";
  41. export default {
  42. props: {
  43. memberData: {
  44. default: {
  45. position_name: "",
  46. head_img: "",
  47. id: 5,
  48. name: "",
  49. nickname: "",
  50. phone: "",
  51. }
  52. }
  53. },
  54. data() {
  55. return {
  56. topNavHeight: null,
  57. systemList: [{
  58. icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-info.png",
  59. name: '个人信息',
  60. id: 1
  61. }, {
  62. icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-lock.png",
  63. name: '修改密码',
  64. id: 2
  65. }, {
  66. icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-phone.png",
  67. name: '修改手机号',
  68. id: 3
  69. }, {
  70. icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-phone.png",
  71. name: '邀请二维码',
  72. id: 4
  73. }, ]
  74. }
  75. },
  76. created() {
  77. this.topNavHeight = getApp().globalData.topNavHeight
  78. },
  79. mounted() {},
  80. methods: {
  81. moveHandle() {
  82. return false
  83. },
  84. exitAccount() {
  85. uni.showModal({
  86. title: '提示',
  87. content: '是否退出当前账户?',
  88. success: (res) => {
  89. if (res.confirm) {
  90. logout()
  91. uni.clearStorageSync()
  92. uni.reLaunch({
  93. url: `/pages/login/index`
  94. })
  95. }
  96. }
  97. });
  98. },
  99. onGoSetting(item) {
  100. if (item.id === 1) {
  101. return uni.navigateTo({
  102. url: `/page_subpack/personal_details/personal_details`
  103. })
  104. } else if (item.id === 4) {
  105. // uni.navigateTo({
  106. // url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
  107. // })
  108. } else {
  109. uni.navigateTo({
  110. url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
  111. })
  112. }
  113. }
  114. }
  115. }
  116. </script>
  117. <style lang="scss" scoped>
  118. .system_content {
  119. width: 375rpx;
  120. height: 100vh;
  121. background-image: url("https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/popup_bg.png");
  122. background-repeat: no-repeat;
  123. background-size: 100% 100%;
  124. }
  125. .avatar {
  126. width: 315rpx;
  127. height: 140rpx;
  128. }
  129. .avatar_name {
  130. position: absolute;
  131. }
  132. .system_item {
  133. width: 315rpx;
  134. margin-top: 50rpx;
  135. image {
  136. width: 30rpx;
  137. height: 32rpx;
  138. }
  139. }
  140. .system-button {
  141. width: 335rpx;
  142. height: 90rpx;
  143. line-height: 90rpx;
  144. text-align: center;
  145. position: relative;
  146. }
  147. .system-quit {
  148. width: 335rpx;
  149. height: 90rpx;
  150. line-height: 90rpx;
  151. background: #3ABF7D;
  152. opacity: 0.3;
  153. border-radius: 30rpx;
  154. .quit-active {
  155. opacity: 1;
  156. }
  157. }
  158. .button-text {
  159. position: absolute;
  160. top: 0;
  161. }
  162. </style>