user.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!-- 个人中心:支持装修 -->
  2. <template>
  3. <s-layout title="我的" tabbar="/pages/index/user" navbar="custom" :bgStyle="template.page"
  4. :navbarStyle="template.navigationBar" onShareAppMessage>
  5. <view v-for="(item, index) in template.components" :key="index" :styles="item.property.style">
  6. <s-block-item :type="item.id" :data="item.property" :styles="item.property.style" />
  7. </view>
  8. </s-layout>
  9. </template>
  10. <script setup>
  11. import { computed } from 'vue';
  12. import { onShow, onPageScroll, onPullDownRefresh } from '@dcloudio/uni-app';
  13. import sheep from '@/sheep';
  14. // 隐藏原生tabBar
  15. uni.hideTabBar();
  16. const template = computed(() => sheep.$store('app').template.user);
  17. const isLogin = computed(() => sheep.$store('user').isLogin);
  18. onShow(() => {
  19. sheep.$store('user').updateUserData();
  20. });
  21. onPullDownRefresh(() => {
  22. sheep.$store('user').updateUserData();
  23. setTimeout(function () {
  24. uni.stopPullDownRefresh();
  25. }, 800);
  26. });
  27. onPageScroll(() => { });
  28. </script>
  29. <style lang="scss" scoped>
  30. :deep(.page-body) {
  31. margin-top: -44px !important;
  32. position: relative !important;
  33. z-index: 20000 !important;
  34. // #ifdef MP-WEIXIN
  35. padding-top: 44px !important;
  36. // #endif
  37. }
  38. </style>