UNIAPP模版页

<template>
    <view class="">
    </view>
</template>

<script>
    import {
        mapState,
        mapMutations
    } from 'vuex';
    var that = this;
    export default {
        components: {},
        data() {
            return {
                title: 'xubo'
            }
        },
        computed: mapState(['userData', 'hasLogin']),
        onLoad(e) {
            // this.initdata();
        },
        onShow() {
            that = this;
            //that.mescroll.triggerDownScroll();
        },
        onReachBottom() {},
        onPageScroll(e) {},
        methods: {
            ...mapMutations(['userlogin','userquit']),
            initdata() {
                let that = this;
                that.$ajax.post('mall/banner', { type: 0 }, res => {
                    console.log(res);
                    if (res.status == 200) {
                        that.$common.successToShow(res.message, function() {
                        });
                    } else {
                        that.$common.errorToShow(res.message, function() {});
                    }
                });
            }
        },
        onPullDownRefresh() {uni.stopPullDownRefresh();},
        onNavigationBarButtonTap(e) {},
        onHide() {},
        onUnload() {},
        onBackPress() {},
        onShareAppMessage() {}
        
    }
</script>

<style>

</style>

发表评论

电子邮件地址不会被公开。 必填项已用*标注