system_popup.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. icon: "/static/img/index/to_excel.png",
  76. name: '转换工具',
  77. id: 5
  78. },]
  79. }
  80. },
  81. created() {
  82. this.topNavHeight = getApp().globalData.topNavHeight
  83. },
  84. mounted() {},
  85. methods: {
  86. moveHandle() {
  87. return false
  88. },
  89. exitAccount() {
  90. uni.showModal({
  91. title: '提示',
  92. content: '是否退出当前账户?',
  93. success: (res) => {
  94. if (res.confirm) {
  95. logout()
  96. uni.clearStorageSync()
  97. uni.reLaunch({
  98. url: `/pages/login/index`
  99. })
  100. }
  101. }
  102. });
  103. },
  104. onGoSetting(item) {
  105. if (item.id === 1) {
  106. return uni.navigateTo({
  107. url: `/page_subpack/personal_details/personal_details`
  108. })
  109. } else if (item.id === 4) {
  110. // uni.navigateTo({
  111. // url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
  112. // })
  113. } else if (item.id === 5) {
  114. uni.navigateTo({
  115. url: `/page_subpack/transition/to_excel`
  116. })
  117. } else {
  118. uni.navigateTo({
  119. url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
  120. })
  121. }
  122. }
  123. }
  124. }
  125. </script>
  126. <style lang="scss" scoped>
  127. .system_content {
  128. width: 375rpx;
  129. height: 100vh;
  130. background-image: url("https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/popup_bg.png");
  131. background-repeat: no-repeat;
  132. background-size: 100% 100%;
  133. }
  134. .avatar {
  135. width: 315rpx;
  136. height: 140rpx;
  137. }
  138. .avatar_name {
  139. position: absolute;
  140. }
  141. .system_item {
  142. width: 315rpx;
  143. margin-top: 50rpx;
  144. image {
  145. width: 30rpx;
  146. height: 32rpx;
  147. }
  148. }
  149. .system-button {
  150. width: 335rpx;
  151. height: 90rpx;
  152. line-height: 90rpx;
  153. text-align: center;
  154. position: relative;
  155. }
  156. .system-quit {
  157. width: 335rpx;
  158. height: 90rpx;
  159. line-height: 90rpx;
  160. background: #3ABF7D;
  161. opacity: 0.3;
  162. border-radius: 30rpx;
  163. .quit-active {
  164. opacity: 1;
  165. }
  166. }
  167. .button-text {
  168. position: absolute;
  169. top: 0;
  170. }
  171. </style>