<template>
    <div class="page">
        <ul class="list">
            <!-- <li class="item" v-for="item of menuList" :key="item.id" @click="jump(item.url)">
                <div class="name">{{item.name}}</div>
                <my-image
                    class="arrow"
                    src="/static/common/arrows_left.png"
                ></my-image>
            </li> -->
            <li class="item" @click="jump('/pages/manage/user/info')">
                <div class="name">账号信息</div>
                <my-image
                    class="arrow"
                    src="/static/common/arrows_left.png"
                ></my-image>
            </li>
            <li class="item" @click="jump('/pages/manage/user/password')">
                <div class="name">修改密码</div>
                <my-image
                    class="arrow"
                    src="/static/common/arrows_left.png"
                ></my-image>
            </li>
            <li class="item" @click="jump('/pages/manage/user/phone')">
                <div class="name">修改手机号</div>
                <my-image
                    class="arrow"
                    src="/static/common/arrows_left.png"
                ></my-image>
            </li>
            <!-- <button open-type="share" class="item" id="2">
                <div class="name">邀请团长</div>
                <my-image
                    class="arrow"
                    src="/static/common/arrows_left.png"
                ></my-image>
            </button>
            <button open-type="share" class="item" id="1">
                <div class="name">邀请区区购团长</div>
                <my-image
                    class="arrow"
                    src="/static/common/arrows_left.png"
                ></my-image>
            </button> -->
        </ul>
        <button class="btn" @click="layout">退出登录</button>
    </div>
</template>

<script>
import MyImage from "../../../components/image/index";
export default {
    name: "",
    components: { MyImage },

    // 数据
    data() {
        return {
            curShop: {},
            menuList: [],
        };
    },

    onLoad() {
        let appMenuList = this.$store.state.user.menuList;
        for (let item of appMenuList) {
            if (item.id === "mobile_statistic") {
                this.menuList = item.children;
            }
        }
    },
    async onShow() {},
    // 函数
    methods: {
        layout() {
            this.$store.commit("user/logout", null);
            this.router.push({
                path: "/pages/index/login",
                isTabBar: true,
            });
        },
    },

    onShareAppMessage(res) {
        if (res.from === "menu") {
            return {};
        } else {
            if (res.target.id === "2") {
                return {
                    title: "开通群助理",
                    path: "pages/index/register2",
                    imageUrl:
                        "https://oss.ixiaokejia.com/images/common/share_login.jpg",
                };
            } else {
                return {
                    title: "开通群助理",
                    path: "pages/index/register",
                    imageUrl:
                        "https://oss.ixiaokejia.com/images/common/share_login.jpg",
                };
            }
        }
    },

    // 数据计算
    computed: {
        user() {
            return this.$store.state.user.user;
        },
    },

    // 数据监听
    watch: {},
};
</script>

<style lang="scss" scoped>
.page {
    min-height: 100vh;
    background-color: #fff;
}
.list {
    border-top: 1px solid #f1f1f1;
    .item {
        height: px(120);
        padding: 0 px(35);
        font-size: px(44);
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f1f1f1;
    }
    .arrow {
        width: px(40);
        height: px(40);
        flex-shrink: 0;
        transform: rotate(180deg);
        /deep/ img {
            width: px(40);
            height: px(40);
        }
    }
}
.btn {
    position: fixed;
    bottom: 2rem;
    left: px(30);
    right: px(30);
    z-index: 10;
    color: #333;
    background-color: #f3f3f3;
    font-size: px(44);
}
button.item {
    background-color: #fff;
    border: none;
    border-bottom: 1px solid #f1f1f1;
    border-radius: 0;
    &::after,
    &::before {
        display: none;
    }
}
</style>