mall-uniapp/pages/index/user.vue

41 lines
989 B
Vue
Raw Normal View History

2023-12-11 01:24:16 +00:00
<template>
2023-12-12 08:13:27 +00:00
<s-layout title="我的" tabbar="/pages/index/user" navbar="custom" :bgStyle="template.page"
:navbarStyle="template.style?.navbar" onShareAppMessage>
<s-block v-for="(item, index) in template.components" :key="index" :styles="item.property.style">
<s-block-item :type="item.id" :data="item.property" :styles="item.property.style" />
</s-block>
</s-layout>
2023-12-11 01:24:16 +00:00
</template>
<script setup>
2023-12-12 08:13:27 +00:00
import {
computed
} from 'vue';
import {
onShow,
onPageScroll,
onPullDownRefresh
} from '@dcloudio/uni-app';
import sheep from '@/sheep';
2023-12-11 01:24:16 +00:00
2023-12-12 08:13:27 +00:00
// 隐藏原生tabBar
uni.hideTabBar();
2023-12-11 01:24:16 +00:00
2023-12-12 08:13:27 +00:00
const template = computed(() => sheep.$store('app').template.user);
const isLogin = computed(() => sheep.$store('user').isLogin);
2023-12-11 01:24:16 +00:00
2023-12-12 08:13:27 +00:00
onShow(() => {
sheep.$store('user').updateUserData();
});
2023-12-11 01:24:16 +00:00
2023-12-12 08:13:27 +00:00
onPullDownRefresh(() => {
sheep.$store('user').updateUserData();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 800);
});
2023-12-11 01:24:16 +00:00
2023-12-12 08:13:27 +00:00
onPageScroll(() => {});
2023-12-11 01:24:16 +00:00
</script>
2023-12-12 08:13:27 +00:00
<style></style>