<script>
export default {
    onLaunch: async function (option) {
        console.log(option,'onLaunch');
        const self = this;

        self.$store.commit("user/update", {
            init: false,
        });
        // 调试开关
        uni.setEnableDebug({
            enableDebug: process.env.VUE_APP_ENV === "develop",
        });

        // 开发版设置
        if (process.env.VUE_APP_ENV === "develop") {
            // 打印接收参数
            console.log(option);
        }

        uni.getSystemInfo({
            success: function (res) {
                if (res.model.indexOf("iPhone X") > -1) {
                    self.$store.commit("common/update", {
                        iphoneX: true,
                    });
                } else {
                    self.$store.commit("common/update", {
                        iphoneX: false,
                    });
                }
            },
        });

    },

    onShow: async function (option) {
        const self = this;
        // 登录处理
        await self.fn.login(option);
    },

    onHide: function () {
        const self = this;

        self.$store.commit("user/update", {
            init: false,
        });
    },
};
</script>

<style lang="scss">
@import "common/scss/main";
@import "common/iconfont/iconfont.css";

page {
    background-color: #f8f8f8;
}
.page--iphoneX {
    padding-bottom: px(30);
}
.shop-cart-page {
    padding-bottom: px(220);
    box-sizing: border-box;
}
.web-support {
    text-align: center;
    font-size: px(36);
    line-height: 1.5;
    margin-top: px(30);
    padding-bottom: px(20);
    .text {
        color: #999;
    }
    .num {
        color: #0085ff;
    }
}
.iconarrow{
    transform: rotate(180deg);
}
.tabbar-page{
    padding-bottom: 3rem;
}
</style>
