system_popup.vue 4.3 KB

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