system_popup.vue 4.0 KB

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