<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="./doorlockUser.css">
    <style type="text/css">
        [v-cloak]{
            display: none;
        }
    </style>
    <!--<script type="text/javascript" src="../../lib/js/start.js"></script>-->
    <script type="text/javascript" src="../../lib/js/p.js"></script>
    <script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="">

    <div id="app" v-cloak>
        <div class="header">
            <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
            <p>{{ $t('title.doorlockUser') }}</p>
        </div>
        <div class="content">  
            <ul class="userInfoLink">
                <li class="userInfo" >
                    <img class="userInfo-image" v-if="userInfo.image && userInfo.role == 0" v-bind:src="userInfo.image">
                    <div>
                        <v-touch tag="p" class="userInfo-title" v-bind:class="{'userInfo-title-disabled': role}" v-on:tap="onEditNameTap">{{ userInfo.title == (null || '') ? $t('doorlockUser.defaultName') : userInfo.title}}</v-touch>
                        <p class="userInfo-subtitle">
                            <img class="userInfo-subimage" v-if="userInfo.image && userInfo.role != 0" v-bind:src="userInfo.image">
                            {{ $t('doorlockUser.name') }}<span class="userInfo-name" v-if="userInfo.subtitle">{{ userInfo.subtitle }}</span>
                            <v-touch tag="span" class="userInfo-toBind" v-show="bindShowFlag && !role" v-on:tap="onBindTap">{{ $t('doorlockUser.inviteBind') }}</v-touch>
                            <u-button :init-param="componentsConfig.unbindButton.initParam" v-on:u-button-tap="onUnbindButtonTap" v-show="(unbindShowFlag && !role && userInfo.role != 0)"></u-button>
                        </p>
                    </div>
                </li>
                <v-touch tag="li" v-on:tap="onBindUnlockInfoTap">{{ $t('doorlockUser.bindUnlockInfo') }}</v-touch>
                <v-touch tag="li" v-on:tap="onOpendoorRecordTap">{{ $t('doorlockUser.opendoorRecord') }}</v-touch>
            </ul>
            <u-button :init-param="componentsConfig.deleteUserButton.initParam" v-on:u-button-tap="onDeleteUserButtonTap" v-show="!role && userInfo.role != 0"></u-button>
        </div>  
        <transition name="fade">
            <v-touch tag="div" class="unbindState-dialog" v-show="stateShowFlag" v-on:tap="onUnbindStateDialogTap">
                <div>
                    <img :src="imageSrc">{{ textBindTip }}
                </div>
            </v-touch>
        </transition>  
        <transition name="fade">
            <div class="guide-dialog" v-show="guideShowFlag">
                <transition name="fade">
                    <div class="guideStep1" v-show="guideStep1ShowFlag">
                        <div class="guideStep1Cont">
                            <p>我是个用户</p>
                            <p><img src="../../resources/image/gray_unbindHead_icon.png">{{ $t('doorlockUser.name') }}<span>{{ $t('doorlockUser.inviteBind') }}</span></p>
                        </div>
                        <div class="guideStep1Tip">
                            <p>{{ $t('doorlockUser.guideStep1Tip1') }}</p>
                            <p v-html="$t('doorlockUser.guideStep1Tip2')"></p>
                        </div>
                    </div>
                </transition> 
                <transition name="fade">
                    <div class="guideStep2" v-show="guideStep2ShowFlag">
                        <u-button :init-param="componentsConfig.nextButton.initParam" v-on:u-button-tap="onNextButtonTap"></u-button>
                    </div>
                </transition> 
                <transition name="fade">
                    <div class="guideStep3" v-show="guideStep3ShowFlag">
                        <div class="guideStep3Cont">
                            <p>{{ $t('doorlockUser.bindUnlockInfo') }}</p>
                        </div>
                        <div class="guideStep3Tip" v-html="$t('doorlockUser.guideStep3Tip')"></div>
                    </div>
                </transition>
                <transition name="fade">
                    <div class="guideStep4" v-show="guideStep4ShowFlag">
                        <u-button :init-param="componentsConfig.iSeeButton.initParam" v-on:u-button-tap="onISeeButtonTap"></u-button>
                    </div>
                </transition>                                                                                     
            </div>
        </transition>             
        <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
        <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
    </div>

    <script type="text/javascript" src="./doorlockUser.js" defer async></script>
    
</body>
</html>