mine.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <view>
  3. <cu-custom heighten="94" ref="Dustom"
  4. bgImage="https://yostest175549.obs.cn-east-2.myhuaweicloud.com:443/202306151686796745663B52544232.png">
  5. <view slot="head" class="head" :style="{ 'height': headHeight, 'top': posTop }">
  6. <view class="custom-bar" :style="{ 'height': customBar }">
  7. <navigator class="iconfont icon-wode-xuanzhong" url="#">
  8. </navigator>
  9. </view>
  10. <navigator class="user" url="#">
  11. <view class="profile-photo">
  12. <view class="substitution">
  13. <text class="iconfont icon-wode-xuanzhong" />
  14. </view>
  15. </view>
  16. <view class="text">
  17. <view class="name u-line-1">
  18. {{ userMsg.name }}
  19. </view>
  20. <view class="replenish">
  21. <text class="iconfont icon-daka" />
  22. {{ userMsg.phonenumber || '未填写' }}
  23. <text style="margin: 0 10px;">
  24. |
  25. </text>
  26. {{ userMsg.hr.position || '未知职位' }}
  27. </view>
  28. </view>
  29. </navigator>
  30. </view>
  31. </cu-custom>
  32. <view class="nav-box">
  33. <navigator class="nav-item" url="#">
  34. <text class="iconfont icon-wode-xuanzhong" />
  35. <view class="view">
  36. 修改登录密码
  37. </view>
  38. <text class="iconfont icon-wode-xuanzhong" />
  39. </navigator>
  40. <navigator class="nav-item" url="#">
  41. <text class="iconfont icon-wode-xuanzhong" />
  42. <view class="view">
  43. 修改登录手机号
  44. </view>
  45. <text class="iconfont icon-wode-xuanzhong" />
  46. </navigator>
  47. <navigator class="nav-item" url="#">
  48. <text class="iconfont icon-wode-xuanzhong" />
  49. <view class="view">
  50. 绑定微信
  51. </view>
  52. <text class="iconfont icon-wode-xuanzhong" />
  53. </navigator>
  54. </view>
  55. <upload>
  56. </upload>
  57. <u-button :customStyle="butStyle" @click="logOut()">退出登录</u-button>
  58. </view>
  59. </template>
  60. <script>
  61. import upload from "../../../components/my-upload.vue";
  62. export default {
  63. name: 'Mine',
  64. components: { upload },
  65. data() {
  66. return {
  67. posTop: this.tovw(this.StatusBar),
  68. headHeight: this.tovw(this.CustomBar - this.StatusBar),
  69. customBar: this.tovw(this.CustomBar - this.StatusBar),
  70. butStyle: {
  71. position: "fixed",
  72. bottom: '32vw',
  73. left: "2.667vw",
  74. width: "94.667vw",
  75. height: "12vw",
  76. background: "rgba(255,255,255,0.1)",
  77. borderRadius: "1.067vw",
  78. border: "0.267vw solid rgba(255,255,255,0.5)",
  79. fontSize: "4vw",
  80. color: "#FFFFFF"
  81. },
  82. userMsg: {}
  83. };
  84. },
  85. created() {
  86. this.getUserMsg()
  87. },
  88. methods: {
  89. // 获取用户信息
  90. getUserMsg() {
  91. this.$Http.basic({
  92. id: 20230608105102,
  93. content: {
  94. nocache: true
  95. }
  96. }).then(res => {
  97. if (this.cutoff(res.msg)) return;
  98. this.userMsg = res.data;
  99. })
  100. },
  101. logOut() {
  102. uni.showModal({
  103. title: '提示',
  104. content: '是否确认退出登录',
  105. success: ({ confirm }) => {
  106. if (confirm) uni.reLaunch({
  107. url: "/pages/login/login"
  108. })
  109. },
  110. })
  111. },
  112. },
  113. }
  114. </script>
  115. <style lang="scss">
  116. .head {
  117. position: fixed;
  118. width: 100vw;
  119. z-index: 99991;
  120. .custom-bar {
  121. width: 100vw;
  122. position: relative;
  123. .iconfont {
  124. position: absolute;
  125. bottom: 14px;
  126. font-size: 16px;
  127. color: #FFFFFF;
  128. margin-left: 10px;
  129. }
  130. }
  131. .user {
  132. display: flex;
  133. height: 84px;
  134. width: 100vw;
  135. padding: 10px;
  136. box-sizing: border-box;
  137. .profile-photo {
  138. width: 64px;
  139. height: 64px;
  140. border-radius: 50%;
  141. overflow: hidden;
  142. flex-shrink: 0;
  143. margin-right: 10px;
  144. .substitution {
  145. width: 64px;
  146. line-height: 64px;
  147. text-align: center;
  148. background: #EFF4FA;
  149. .iconfont {
  150. font-size: 32px;
  151. color: #7C98BB;
  152. }
  153. }
  154. }
  155. .text {
  156. flex: 1;
  157. height: 64px;
  158. width: 0;
  159. .name {
  160. height: 24px;
  161. line-height: 24px;
  162. font-size: 17px;
  163. color: #FFFFFF;
  164. margin-top: 5px;
  165. }
  166. .replenish {
  167. margin-top: 10px;
  168. line-height: 20px;
  169. font-size: 14px;
  170. color: #FFFFFF;
  171. .iconfont {
  172. font-size: 14px;
  173. margin-right: 5px;
  174. }
  175. }
  176. }
  177. }
  178. }
  179. .nav-box {
  180. width: 355px;
  181. margin: 10px auto 0;
  182. border-radius: 4px;
  183. overflow: hidden;
  184. background: rgba($color: #fff, $alpha: 0.1);
  185. .nav-item {
  186. display: flex;
  187. align-items: center;
  188. width: 100%;
  189. height: 45px;
  190. padding: 0 10px;
  191. box-sizing: border-box;
  192. color: #fff;
  193. font-size: 14px;
  194. .view {
  195. flex: 1;
  196. margin-left: 10px;
  197. }
  198. .iconfont {
  199. font-size: 14px;
  200. flex-shrink: 0;
  201. }
  202. }
  203. }
  204. .cu-bar .content {
  205. overflow: auto !important;
  206. }
  207. </style>