mine.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <view>
  3. <img src="../../static/mine/banner.png" class="banner" />
  4. <div class="info">
  5. <div class="headerandwelcome">
  6. <img src="../../static/mine/head.png" alt="" class="header" />
  7. <div class="weltxt">
  8. {{ getUserLocalStorageInfo.user.truename }},欢迎您!
  9. </div>
  10. </div>
  11. <div class="labelpage">
  12. <div class="labelpage_row">
  13. <img height="44rpx" src="../../static/mine/versionicon.png" alt="" />
  14. <div class="labelpage_text">
  15. <div class="labelpage_name">当前版本号</div>
  16. <div class="labelpage_value">v1.0.1</div>
  17. <div class="border"></div>
  18. </div>
  19. </div>
  20. <div
  21. class="labelpage_row"
  22. style="margin-top: 48rpx"
  23. @click="editPassWord()"
  24. >
  25. <img height="44rpx" src="../../static/mine/editpassword.png" alt="" />
  26. <div class="labelpage_text">
  27. <div class="labelpage_name">密码修改</div>
  28. <div class="labelpage_value">
  29. <img
  30. src="../../static/mine/youjiantou.png"
  31. style="width: 44rpx; height: 44rpx"
  32. alt=""
  33. />
  34. </div>
  35. <div class="border"></div>
  36. </div>
  37. </div>
  38. <div
  39. class="labelpage_row"
  40. style="margin-top: 48rpx"
  41. @click="outLogin()"
  42. >
  43. <img height="44rpx" src="../../static/mine/outicon.png" alt="" />
  44. <div class="labelpage_text">
  45. <div class="labelpage_name">退出账号</div>
  46. <div class="labelpage_value">
  47. <img
  48. src="../../static/mine/youjiantou.png"
  49. style="width: 44rpx; height: 44rpx"
  50. alt=""
  51. />
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </view>
  58. </template>
  59. <script>
  60. import { getUserInfo, getUserLocalStorageInfo } from "@/js_sdk/http";
  61. export default {
  62. data() {
  63. return {
  64. userInfo: {},
  65. getUserLocalStorageInfo: getUserLocalStorageInfo(),
  66. };
  67. },
  68. onLoad() {
  69. //option为object类型,会序列化上个页面传递的参数
  70. // this.getUserInfo(); //打印出上个页面传递的参数。
  71. },
  72. methods: {
  73. outLogin() {
  74. wx.showModal({
  75. title: "提示!",
  76. content: "是否确认退出登录?",
  77. success: function (res) {
  78. if (res.confirm) {
  79. uni.clearStorageSync();
  80. uni.reLaunch({
  81. url: "/pages/login/login",
  82. });
  83. }
  84. },
  85. });
  86. },
  87. editPassWord() {
  88. uni.navigateTo({
  89. url: "/pages/subPackages/password/index",
  90. });
  91. },
  92. async getUserInfo() {
  93. let data = await getUserInfo();
  94. this.userInfo = data.data;
  95. },
  96. },
  97. };
  98. </script>
  99. <style scoped lang="scss">
  100. .banner {
  101. width: 100%;
  102. height: 424rpx;
  103. position: absolute;
  104. z-index: 1;
  105. }
  106. .headerandwelcome {
  107. margin-bottom: 60rpx;
  108. height: 120rpx;
  109. width: 100%;
  110. }
  111. .info {
  112. position: absolute;
  113. width: calc(100% - 64rpx);
  114. margin: 60rpx 32rpx 0 32rpx;
  115. z-index: 2;
  116. }
  117. .header {
  118. height: 120rpx;
  119. width: 120rpx;
  120. margin-left: 15rpx;
  121. border-radius: 50%;
  122. float: left;
  123. }
  124. .weltxt {
  125. height: 120rpx;
  126. line-height: 120rpx;
  127. color: #ffffff;
  128. margin-left: 32rpx;
  129. float: left;
  130. }
  131. .labelpage {
  132. width: calc(100% - 96rpx);
  133. height: 308rpx;
  134. padding: 96rpx 48rpx;
  135. border-radius: 12rpx 12rpx 12rpx 12rpx;
  136. background: #ffffff;
  137. }
  138. .labelpage_row {
  139. height: 83rpx;
  140. width: 100%;
  141. img {
  142. height: 44rpx;
  143. width: 44rpx;
  144. float: left;
  145. margin-right: 12rpx;
  146. }
  147. .labelpage_text {
  148. width: calc(100% - 64rpx);
  149. height: 44rpx;
  150. line-height: 44rpx;
  151. float: left;
  152. }
  153. .labelpage_name {
  154. height: 44rpx;
  155. line-height: 44rpx;
  156. float: left;
  157. font-size: 28rpx;
  158. color: #081640;
  159. font-weight: 400;
  160. }
  161. .labelpage_value {
  162. height: 44rpx;
  163. line-height: 44rpx;
  164. float: right;
  165. font-size: 28rpx;
  166. color: #1d18bc;
  167. font-weight: 400;
  168. }
  169. .border {
  170. margin-top: 48rpx;
  171. width: 100%;
  172. height: 1rpx;
  173. border-bottom: 2rpx solid #e6e6e6;
  174. float: left;
  175. }
  176. }
  177. </style>