info.vue 989 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view class="container">
  3. <navBar :show-title="true" title="模式说明" url="/pages/index/index"></navBar>
  4. <view class="text-center">
  5. <image class="contentImg" src="../../static/img/indexInfo.png" mode="widthFix"></image>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. import {
  11. mapMutations
  12. } from "vuex";
  13. import {
  14. getUserInfo
  15. } from '@/api/user.js';
  16. import navBar from "@/components/nav/nav.vue"
  17. export default {
  18. data() {
  19. return {}
  20. },
  21. components: {
  22. navBar
  23. },
  24. onLoad(option) {
  25. this.getUserInfo();
  26. },
  27. methods: {
  28. ...mapMutations('user', ['setUserInfo']),
  29. // 获取更新用户信息
  30. getUserInfo() {
  31. getUserInfo().then((res) => {
  32. this.setUserInfo(res.data);
  33. }).catch((res) => {
  34. console.log(res);
  35. })
  36. },
  37. },
  38. }
  39. </script>
  40. <style lang="scss">
  41. .contentImg {
  42. margin: 0 auto;
  43. width: 686rpx;
  44. }
  45. .container {
  46. width: 100%;
  47. line-height: 1;
  48. background-color: rgb(12, 8, 21);
  49. min-height: 100vh;
  50. }
  51. </style>