mine.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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="editPassWord()"
  42. >
  43. <img height="44rpx" src="../../static/mine/editpassword.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 class="border"></div>
  54. </div>
  55. </div>
  56. <div
  57. class="labelpage_row"
  58. style="margin-top: 48rpx"
  59. @click="outLogin()"
  60. >
  61. <img height="44rpx" src="../../static/mine/outicon.png" alt="" />
  62. <div class="labelpage_text">
  63. <div class="labelpage_name">退出账号</div>
  64. <div class="labelpage_value">
  65. <img
  66. src="../../static/mine/youjiantou.png"
  67. style="width: 44rpx; height: 44rpx"
  68. alt=""
  69. />
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </view>
  76. </template>
  77. <script>
  78. import { getUserInfo, getUserLocalStorageInfo } from "@/js_sdk/http";
  79. export default {
  80. data() {
  81. return {
  82. userInfo: {},
  83. getUserLocalStorageInfo: getUserLocalStorageInfo(),
  84. };
  85. },
  86. onLoad() {
  87. //option为object类型,会序列化上个页面传递的参数
  88. // this.getUserInfo(); //打印出上个页面传递的参数。
  89. },
  90. methods: {
  91. outLogin() {
  92. wx.showModal({
  93. title: "提示!",
  94. content: "是否确认退出登录?",
  95. success: function (res) {
  96. if (res.confirm) {
  97. uni.clearStorageSync();
  98. uni.reLaunch({
  99. url: "/pages/login/login",
  100. });
  101. }
  102. },
  103. });
  104. },
  105. editPassWord() {
  106. uni.navigateTo({
  107. url: "/pages/subPackages/password/index",
  108. });
  109. },
  110. async getUserInfo() {
  111. let data = await getUserInfo();
  112. this.userInfo = data.data;
  113. },
  114. },
  115. };
  116. </script>
  117. <style scoped lang="scss">
  118. .banner {
  119. width: 100%;
  120. //height: 424rpx;
  121. position: absolute;
  122. z-index: 1;
  123. }
  124. .headerandwelcome {
  125. margin-bottom: 60rpx;
  126. height: 120rpx;
  127. width: 100%;
  128. }
  129. .info {
  130. position: absolute;
  131. width: calc(100% - 64rpx);
  132. margin: 60rpx 32rpx 0 32rpx;
  133. z-index: 2;
  134. }
  135. .header {
  136. height: 120rpx;
  137. width: 120rpx;
  138. margin-left: 15rpx;
  139. border-radius: 50%;
  140. float: left;
  141. }
  142. .weltxt {
  143. height: 120rpx;
  144. line-height: 120rpx;
  145. color: #ffffff;
  146. margin-left: 32rpx;
  147. float: left;
  148. }
  149. .labelpage {
  150. width: calc(100% - 96rpx);
  151. height: 388rpx;
  152. padding: 96rpx 48rpx;
  153. border-radius: 12rpx 12rpx 12rpx 12rpx;
  154. background: #ffffff;
  155. }
  156. .labelpage_row {
  157. height: 83rpx;
  158. width: 100%;
  159. img {
  160. height: 44rpx;
  161. width: 44rpx;
  162. float: left;
  163. margin-right: 12rpx;
  164. }
  165. .labelpage_text {
  166. width: calc(100% - 64rpx);
  167. height: 44rpx;
  168. line-height: 44rpx;
  169. float: left;
  170. }
  171. .labelpage_name {
  172. height: 44rpx;
  173. line-height: 44rpx;
  174. float: left;
  175. font-size: 28rpx;
  176. color: #081640;
  177. font-weight: 400;
  178. }
  179. .labelpage_value {
  180. height: 44rpx;
  181. line-height: 44rpx;
  182. float: right;
  183. font-size: 28rpx;
  184. color: #1d18bc;
  185. font-weight: 400;
  186. }
  187. .border {
  188. margin-top: 48rpx;
  189. width: 100%;
  190. height: 1rpx;
  191. border-bottom: 2rpx solid #e6e6e6;
  192. float: left;
  193. }
  194. }
  195. </style>