<!--pages/deviceWake/deviceWake.wxml-->
<view class="deviceWake">
  <nav-bar bind:goBack="_goBack" nav-bgc-class="ex-nav-bgc-class" nav-title-class="ex-nav-title-class" ex-back-pre="ex-back-pre" navbar-data='{{nvabarData}}'>
  </nav-bar>
  <view class="content">
    <view class="tip">
      <image src="./../../img/gt.png" mode="heightFix"></image>
      <text>唤醒功能仅在设备进入休眠后生效，请保持设备网络通畅并且电量充足</text>
    </view>
    <view class="waskList">
      <view class="swicth">
        <image src="./../../img/wk1.png" mode="heightFix"></image>
        <text>倒计时休眠</text>
        <view class="swicth-view">
          <switch color="#6D00FF" checked="{{switch1Checked}}" bindchange="switch1Change" />
        </view>
      </view>
      <view class="page__bd" style="border: none; opacity: {{switch1Checked ? 1 : 0.4}};">
        <text>设置休眠时间</text>
        <view class="choice">
          <view class="mode" wx:if="{{!switch1Checked}}"></view>
          <picker mode="time" bindchange="bindTimeChange0" value="{{alarm_id_0_time}}">
            <view class="picker">
              <text>{{alarm_id_0_time}}</text>
            </view>
          </picker>
          <image src="./../../img/b.png" mode="heightFix"></image>
        </view>
      </view>
      <view class="page__bd" style="opacity: {{switch1Checked ? 1 : 0.4}};">
        <text>设置重复</text>
        <view class="choice">
          <view class="mode" wx:if="{{!switch1Checked}}"></view>
          <text data-index="0" bindtap="gorepeat">{{repeat0}}</text>
          <image src="./../../img/b.png" mode="heightFix"></image>
        </view>
      </view>
    </view>
    <view class="hr"></view>
    <view class="waskList">
      <view class="swicth">
        <image src="./../../img/wk2.png" mode="heightFix"></image>
        <text>定时唤醒</text>
        <view class="swicth-view">
          <switch color="#6D00FF" checked="{{switch2Checked}}" bindchange="switch2Change" />
        </view>
      </view>
      <view class="page__bd" style="opacity: {{switch2Checked ? 1 : 0.4}};">
        <text>设置唤醒时间</text>
        <view class="choice">
          <view class="mode" wx:if="{{!switch2Checked}}"></view>
          <picker mode="time" bindchange="bindTimeChange" value="{{time}}">
            <view class="picker">
              <text>{{time}}</text>
            </view>
          </picker>
          <image src="./../../img/b.png" mode="heightFix"></image>
        </view>
      </view>
      <view class="page__bd" style="opacity: {{switch2Checked ? 1 : 0.4}};">
        <text>设置重复</text>
        <view class="choice">
          <view class="mode" wx:if="{{!switch2Checked}}"></view>
          <text data-index="1" bindtap="gorepeat">{{repeat}}</text>
          <image src="./../../img/b.png" mode="heightFix"></image>
        </view>
      </view>
      <view class="page__bd" style="opacity: {{switch2Checked ? 1 : 0.4}};">
        <text>唤醒音</text>
        <view class="choice">
          <view class="mode" wx:if="{{!switch2Checked}}"></view>
          <text bindtap="goWakeList">{{wakeName}}</text>
          <image src="./../../img/b.png" mode="heightFix"></image>
        </view>
      </view>
    </view>
  </view>
  <Toast visible="{{toast_visible}}" toast-data='{{toastData}}' twoButCallback="{{twoButCallback}}"></Toast>
</view>