<template>
  <view class="info">
    <uni-title type="h3" title="配送站点营业时间 00:00-24:00" />
    <view>● 门店营业时间需在配送站点营业时间内才会有骑手配送</view>
    <view>● 如需在此时间范围外营业，请咨询业务经理调整配送方式</view>
    <view>● 第二段营业时间需要在第一段营业时间之后</view>
    <!-- <view>● 淘先达仅使用营业时间一</view> -->
  </view>

  <view class="time-root">
    <uni-title type="h3" title="营业时间一" />
    <view class="time one">
      <view
        class="left"
        :class="{ 'time-active': timeActive == 1 }"
        @tap="setTime(1)"
      >
        {{ businessTime.timer1 }}
      </view>
      <text class="middle">至</text>
      <view
        class="right"
        :class="{ 'time-active': timeActive == 2 }"
        @tap="setTime(2)"
      >
        {{ businessTime.timer2 }}
      </view>
    </view>
    <uni-title type="h2" title="营业时间二(非必选)" />
    <view class="tip">提示:不需要第二段时间设置为【00:00至00:00】即可</view>
    <view class="time two">
      <view
        class="left"
        :class="{ 'time-active': timeActive == 3 }"
        @tap="setTime(3)"
      >
        {{ businessTime.timer3 }}
      </view>
      <text class="middle">至</text>
      <view
        class="right"
        :class="{ 'time-active': timeActive == 4 }"
        @tap="setTime(4)"
      >
        {{ businessTime.timer4 }}
      </view>
    </view>
  </view>

  <view class="button" @tap="saveBusinessTime">
    <view>确认修改</view>
  </view>

  <uv-datetime-picker
    :title="timeTitle"
    confirmColor="#4eb331"
    v-model="timeIng"
    ref="dateTimePicker"
    mode="time"
    @confirm="confirm"
  />
</template>

<script lang="ts" src="./setBusinessTime" >
</script>

<style lang="scss" scoped>
@import './setBusinessTime.scss';
</style>

<style>
page {
  background-color: #fff;
}
</style>