user.vue 1.0 KB

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