mine.vue 4.8 KB

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