user.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. console.log(template.value)
  24. const isLogin = computed(() => sheep.$store('user').isLogin);
  25. onShow(() => {
  26. sheep.$store('user').updateUserData();
  27. });
  28. onPullDownRefresh(() => {
  29. sheep.$store('user').updateUserData();
  30. setTimeout(function () {
  31. uni.stopPullDownRefresh();
  32. }, 800);
  33. });
  34. onPageScroll(() => {});
  35. </script>
  36. <style></style>