<template>
    <view class="list-index">
        <view class="li-header">
            <input-bar></input-bar>
            <check-status-bar @click="accountCheck"></check-status-bar>
        </view>
        <view class="li-list">
            <list-item
                @click:message="messageSubscription"
                @click:account="accountAuthority"
                @click:delete="itemDeleteBtn"
            ></list-item>
        </view>
    </view>
</template>

<script>
import inputBar from './modules/input_bar.vue';
import checkStatusBar from './modules/check_status_bar.vue';
import listItem from './modules/item.vue';
import { routeTo, showModal } from "@/utils/util.js";
export default {
    components: {
        'input-bar': inputBar,
        'check-status-bar': checkStatusBar,
        'list-item': listItem
    },
    data(){
        return {
            brand_id: '',    
        }
    },
    onLoad(options){
        this.brand_id =  options?.brand_id || '';
    },
    methods: {
        messageSubscription(){
            routeTo(`/subpackage/account/pages/message/info?brand_id=${this.brand_id}`, 'nT');
        },
        accountAuthority(){
            routeTo(`/subpackage/account/pages/permission/info?brand_id=${this.brand_id}`, 'nT');
        },
        accountCheck(){
            routeTo(`/subpackage/account/pages/manage/check?brand_id=${this.brand_id}`, 'nT');
        },
        itemDeleteBtn(){
            showModal({ content: '是否删除该账号？', });
        }
    }
}
</script>

<style lang="scss">
    .li-list{
        padding: 24upx;
    }
</style>