<!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-bind:src="userInfo.image">
                    <!--<img class="userInfo-image" v-if="userInfo.image && userInfo.role == 0" v-bind:src="userInfo.image">
                    <img class="userInfo-subimage" v-if="userInfo.image && userInfo.role != 0" v-bind:src="userInfo.image">-->
                	<span class="userInfo-title">{{ userInfo.title == (null || '') ? $t('doorlockUser.defaultName') : userInfo.title}}</span>
                	<u-button :init-param="componentsConfig.bindButton.initParam" class="userInfo-toBind" v-on:u-button-tap="onBindButtonTap" v-show="bindShowFlag && !role"></u-button>
                    <u-button :init-param="componentsConfig.unbindButton.initParam" v-on:u-button-tap="onUnbindButtonTap" v-show="(unbindShowFlag && !role && userInfo.role != 0)"></u-button>
                </li>
                <v-touch tag="li" v-on:tap="onBindUnlockInfoTap" v-show="!role">{{ $t('doorlockUser.bindUnlockInfo') }}</v-touch>
                <v-touch tag="li" v-bind:class="[{disabled: isFirstAddUser}]" v-on:tap="onEditNameTap" v-show="!role">{{ $t('doorlockUser.editUsername') }}</v-touch>
                <v-touch tag="li" v-bind:class="[{disabled: isFirstAddUser}]" v-on:tap="onOpendoorRecordTap">{{ $t('doorlockUser.opendoorRecord') }}</v-touch>
            </ul>
            <u-button :disabled="isFirstAddUser" :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">
                            <img class="userInfo-image" v-bind:src="userInfo.image">
		                	<span class="userInfo-title">{{ userInfo.title == (null || '') ? $t('doorlockUser.defaultName') : userInfo.title}}</span>
		                	<u-button :init-param="componentsConfig.bindButton.initParam" class="userInfo-toBind" v-on:u-button-tap="onBindButtonTap" v-show="bindShowFlag && !role"></u-button>
		                    <u-button :init-param="componentsConfig.unbindButton.initParam" v-on:u-button-tap="onUnbindButtonTap" v-show="(unbindShowFlag && !role && userInfo.role != 0)"></u-button>
                        </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>