mine.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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="changeUserType"
  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. userType: true,
  85. };
  86. },
  87. onLoad() {
  88. //option为object类型,会序列化上个页面传递的参数
  89. // this.getUserInfo(); //打印出上个页面传递的参数。
  90. },
  91. methods: {
  92. changeUserType() {
  93. uni.navigateTo({
  94. url: "/pages/login2/login",
  95. success: function (e) {
  96. // uni.$emit('userType', 'OK')
  97. },
  98. });
  99. },
  100. outLogin() {
  101. wx.showModal({
  102. title: "提示!",
  103. content: "是否确认退出登录?",
  104. success: function (res) {
  105. if (res.confirm) {
  106. uni.clearStorageSync();
  107. uni.reLaunch({
  108. url: "/pages/login/login",
  109. });
  110. }
  111. },
  112. });
  113. },
  114. editPassWord() {
  115. uni.navigateTo({
  116. url: "/pages/subPackages/password/index",
  117. });
  118. },
  119. async getUserInfo() {
  120. let data = await getUserInfo();
  121. this.userInfo = data.data;
  122. },
  123. },
  124. };
  125. </script>
  126. <style scoped lang="scss">
  127. .banner {
  128. width: 100%;
  129. //height: 424rpx;
  130. position: absolute;
  131. z-index: 1;
  132. }
  133. .headerandwelcome {
  134. margin-bottom: 60rpx;
  135. height: 120rpx;
  136. width: 100%;
  137. }
  138. .info {
  139. position: absolute;
  140. width: calc(100% - 64rpx);
  141. margin: 60rpx 32rpx 0 32rpx;
  142. z-index: 2;
  143. }
  144. .header {
  145. height: 120rpx;
  146. width: 120rpx;
  147. margin-left: 15rpx;
  148. border-radius: 50%;
  149. float: left;
  150. }
  151. .weltxt {
  152. height: 120rpx;
  153. line-height: 120rpx;
  154. color: #ffffff;
  155. margin-left: 32rpx;
  156. float: left;
  157. }
  158. .labelpage {
  159. width: calc(100% - 96rpx);
  160. height: 388rpx;
  161. padding: 96rpx 48rpx;
  162. border-radius: 12rpx 12rpx 12rpx 12rpx;
  163. background: #ffffff;
  164. }
  165. .labelpage_row {
  166. height: 83rpx;
  167. width: 100%;
  168. img {
  169. height: 44rpx;
  170. width: 44rpx;
  171. float: left;
  172. margin-right: 12rpx;
  173. }
  174. .labelpage_text {
  175. width: calc(100% - 64rpx);
  176. height: 44rpx;
  177. line-height: 44rpx;
  178. float: left;
  179. }
  180. .labelpage_name {
  181. height: 44rpx;
  182. line-height: 44rpx;
  183. float: left;
  184. font-size: 28rpx;
  185. color: #081640;
  186. font-weight: 400;
  187. }
  188. .labelpage_value {
  189. height: 44rpx;
  190. line-height: 44rpx;
  191. float: right;
  192. font-size: 28rpx;
  193. color: #1d18bc;
  194. font-weight: 400;
  195. }
  196. .border {
  197. margin-top: 48rpx;
  198. width: 100%;
  199. height: 1rpx;
  200. border-bottom: 2rpx solid #e6e6e6;
  201. float: left;
  202. }
  203. }
  204. </style>